From 04ce70141d9114e8b17adf5f9568319479c35b0c Mon Sep 17 00:00:00 2001 From: jdelapla Date: Wed, 27 Mar 2024 13:07:46 -0700 Subject: [PATCH] Add videoscale and videorate (#1951) * Add videoscale and videorate in case supported video src does not support specified format * Clang --------- Co-authored-by: Divya Sampath Kumar --- samples/kvsWebRTCClientMasterGstSample.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/samples/kvsWebRTCClientMasterGstSample.c b/samples/kvsWebRTCClientMasterGstSample.c index 2cd75ba181..56656db17f 100644 --- a/samples/kvsWebRTCClientMasterGstSample.c +++ b/samples/kvsWebRTCClientMasterGstSample.c @@ -157,7 +157,8 @@ PVOID sendGstreamerAudioVideo(PVOID args) switch (pSampleConfiguration->srcType) { case TEST_SOURCE: { pipeline = - gst_parse_launch("videotestsrc is-live=TRUE ! queue ! videoconvert ! video/x-raw,width=1280,height=720,framerate=25/1 ! " + gst_parse_launch("videotestsrc is-live=TRUE ! queue ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! " + "videorate ! video/x-raw,framerate=25/1 ! " "x264enc bframes=0 speed-preset=veryfast bitrate=512 byte-stream=TRUE tune=zerolatency ! " "video/x-h264,stream-format=byte-stream,alignment=au,profile=baseline ! appsink sync=TRUE emit-signals=TRUE " "name=appsink-video", @@ -165,7 +166,8 @@ PVOID sendGstreamerAudioVideo(PVOID args) break; } case DEVICE_SOURCE: { - pipeline = gst_parse_launch("autovideosrc ! queue ! videoconvert ! video/x-raw,width=1280,height=720,framerate=25/1 ! " + pipeline = gst_parse_launch("autovideosrc ! queue ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! " + "videorate ! video/x-raw,framerate=25/1 ! " "x264enc bframes=0 speed-preset=veryfast bitrate=512 byte-stream=TRUE tune=zerolatency ! " "video/x-h264,stream-format=byte-stream,alignment=au,profile=baseline ! appsink sync=TRUE " "emit-signals=TRUE name=appsink-video", @@ -207,7 +209,8 @@ PVOID sendGstreamerAudioVideo(PVOID args) } case DEVICE_SOURCE: { pipeline = - gst_parse_launch("autovideosrc ! queue ! videoconvert ! video/x-raw,width=1280,height=720,framerate=25/1 ! " + gst_parse_launch("autovideosrc ! queue ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! " + "videorate ! video/x-raw,framerate=25/1 ! " "x264enc bframes=0 speed-preset=veryfast bitrate=512 byte-stream=TRUE tune=zerolatency ! " "video/x-h264,stream-format=byte-stream,alignment=au,profile=baseline ! appsink sync=TRUE emit-signals=TRUE " "name=appsink-video autoaudiosrc ! "