Skip to content

Commit 39acd8c

Browse files
consumer does viz
1 parent 0d5abe1 commit 39acd8c

6 files changed

Lines changed: 236 additions & 355 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,4 @@ add_subdirectory(simple_joystick_sender)
9393
add_subdirectory(simple_joystick_receiver)
9494
add_subdirectory(ping_pong_ping)
9595
add_subdirectory(ping_pong_pong)
96-
<<<<<<< Updated upstream
97-
=======
98-
add_subdirectory(user_timestamped_video)
9996
add_subdirectory(encoded-video-ingest)
100-
>>>>>>> Stashed changes

encoded-video-ingest/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ livekit_copy_windows_runtime_dlls(EncodedVideoIngestProducer)
2323

2424
add_executable(EncodedVideoIngestConsumer
2525
consumer.cpp
26+
../simple_room/sdl_video_renderer.cpp
27+
../simple_room/sdl_video_renderer.h
2628
)
2729

28-
target_include_directories(EncodedVideoIngestConsumer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
29-
target_link_libraries(EncodedVideoIngestConsumer PRIVATE ${LIVEKIT_CORE_TARGET})
30-
if(WIN32)
31-
target_link_libraries(EncodedVideoIngestConsumer PRIVATE ws2_32)
32-
endif()
30+
target_include_directories(EncodedVideoIngestConsumer PRIVATE
31+
${CMAKE_CURRENT_SOURCE_DIR}
32+
${CMAKE_CURRENT_SOURCE_DIR}/../simple_room
33+
)
34+
target_link_libraries(EncodedVideoIngestConsumer PRIVATE ${LIVEKIT_CORE_TARGET} SDL3::SDL3)
3335

3436
livekit_copy_windows_runtime_dlls(EncodedVideoIngestConsumer)

encoded-video-ingest/README.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ quick local check.
2727

2828
That is only for this camera-validation hop. In the full LiveKit demo below,
2929
**port 5005** is reserved for **TCP** from the camera pipeline into the
30-
producer, and **port 5006** is where the consumer serves **decoded I420** to a
31-
separate GStreamer visualizer.
30+
producer. The consumer renders the subscribed track directly with SDL, so no
31+
separate GStreamer visualizer terminal is needed.
3232

3333
### Send - camera to RTP/UDP 5005
3434

@@ -129,22 +129,10 @@ The producer starts `EncodedTcpIngest`, publishes a camera track named
129129
```bash
130130
LIVEKIT_URL=ws://localhost:7880 LIVEKIT_TOKEN="$CONSUMER_TOKEN" \
131131
./build/encoded-video-ingest/EncodedVideoIngestConsumer \
132-
--tcp-port 5006 \
133-
--from encoded-sender
132+
--from encoded-sender \
133+
--track-name encoded-video
134134
```
135135

136-
The consumer subscribes to `encoded-sender` and serves decoded I420 frames on
137-
TCP port 5006.
138-
139-
## 4. View the consumer output
140-
141-
```bash
142-
gst-launch-1.0 -v \
143-
tcpclientsrc host=127.0.0.1 port=5006 ! \
144-
rawvideoparse width=640 height=480 format=i420 framerate=30/1 ! \
145-
videoconvert ! autovideosink sync=false
146-
```
147-
148-
`rawvideoparse` needs the exact width and height that the producer declared.
149-
The consumer output is raw I420, not H.265, so do not pipe port 5006 through
150-
`h265parse`.
136+
The consumer subscribes to `encoded-sender` and renders the decoded video track
137+
directly in an SDL window. If your producer token uses a different identity,
138+
pass that value to `--from`.

0 commit comments

Comments
 (0)