summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2024-06-05 13:44:47 -0400
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-07-25 12:11:48 +0100
commitb7225c887a5e81229afba5fb7d5778403ae8d6af (patch)
tree362d544a186063fe7ddbd3e9cfff463012a83027
parenta1549129d3e75ddf67074cbc070c9798063dcc6c (diff)
gst: Document libcamerasrc multi stream usage
This adds documentation and an example using gst-launch-1.0. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--README.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 30ec3f6b..92f16502 100644
--- a/README.rst
+++ b/README.rst
@@ -178,6 +178,22 @@ Which can be received on another device over the network with:
gst-launch-1.0 tcpclientsrc host=$DEVICE_IP port=5000 ! \
multipartdemux ! jpegdec ! autovideosink
+The GStreamer element also supports multiple streams. This is achieved by
+requesting additional source pads. Downstream caps filters can be used
+to choose specific parameters like resolution and pixel format. The pad
+property ``stream-role`` can be used to select a role.
+
+The following example displays a 640x480 view finder while streaming JPEG
+encoded 800x600 video. You can use the receiver pipeline above to view the
+remote stream from another device.
+
+.. code::
+
+ gst-launch-1.0 libcamerasrc name=cs src::stream-role=view-finder src_0::stream-role=video-recording \
+ cs.src ! queue ! video/x-raw,width=640,height=480 ! videoconvert ! autovideosink \
+ cs.src_0 ! queue ! video/x-raw,width=800,height=600 ! videoconvert ! \
+ jpegenc ! multipartmux ! tcpserversink host=0.0.0.0 port=5000
+
.. section-end-getting-started
Troubleshooting