Skip to content

Commit e644e15

Browse files
committed
[*] clean codes
1 parent 47cc130 commit e644e15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1721
-10363
lines changed

lib/wrtc/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ byteorder = "1.5"
1818
async-trait = "0.1"
1919
audiopus = "0.3.0-rc.0"
2020

21-
xflv = { path = "lib/flv" }
2221
bytesio = { path = "lib/bytesio" }
2322
commonlib = { path = "lib/common" }
24-
streamhub = { path = "lib/streamhub" }
23+
24+
[dev-dependencies]
25+
env_logger = "0.11"

lib/wrtc/README.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

lib/wrtc/data/test.h264

11 KB
Binary file not shown.

lib/wrtc/examples/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
A WebRTC server implementation that streams H264 video files to WHEP clients.
2+
3+
### Basic Usage
4+
5+
```bash
6+
# Run with default settings (creates test file if needed)
7+
cargo run --example whep_demo
8+
```
9+
10+
### Advanced Usage
11+
12+
```bash
13+
# With custom H264 file
14+
H264_FILE_PATH=/path/to/your/video.h264 cargo run --example whep_demo
15+
16+
# With custom settings
17+
WRTC_SERVER_ADDRESS=0.0.0.0:9090 \
18+
H264_FPS=25 \
19+
WRTC_APP_NAME=live \
20+
WRTC_STREAM_NAME=my_stream \
21+
cargo run --example whep_demo
22+
```
23+
24+
### Environment Variables
25+
26+
- `WRTC_SERVER_ADDRESS`: Server bind address (default: `127.0.0.1:8080`)
27+
- `H264_FILE_PATH`: Path to H264 file (default: `./test_video.h264`)
28+
- `H264_FPS`: Frames per second for playback (default: `30`)
29+
- `WRTC_APP_NAME`: WebRTC app name (default: `live`)
30+
- `WRTC_STREAM_NAME`: WebRTC stream name (default: `test_stream`)
31+
32+
```bash
33+
RUST_LOG=debug WRTC_SERVER_ADDRESS=0.0.0.0:9090 H264_FILE_PATH=/home/blue/Code/rust/wayshot/lib/wrtc/data/test.h264 cargo run --example whep_demo
34+
```

0 commit comments

Comments
 (0)