From 3d0e7e4671bb5e3ed49f28bd9c11c6eceb436608 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Sun, 5 Jul 2020 00:26:12 +0300 Subject: app: Use waylandsink for all platforms Bug-AGL: SPEC-3382 Signed-off-by: Marius Vlad Change-Id: I7bbb34a377921bc5f741495f14951a0df70694cb --- app/main.cpp | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/app/main.cpp b/app/main.cpp index 796bcdb..b68aeac 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -186,32 +186,11 @@ int main(int argc, char *argv[]) exit(1); } - // NOTES: - // (1) For reference, the pipeline used is based on the gst-launch-1.0 command in the ad hoc unit - // file in the previous hand-rolled CES demo: - // - // udpsrc port=5005 ! application/x-rtp,media=video,encoding-name=H264 ! queue ! rtph264depay ! h264parse config-interval=1 disable-passthrough=true ! decodebin ! vaapisink - // - // (2) waylandsink is a bit broken, as it needs a RGB format, but its caps include non-RGB formats - // This results in crashes when videoconvert doesn't end up in the pipeline, so care must be taken - // if it is used, e.g. for testing: - // - // videotestsrc pattern=smpte ! video/x-raw,format=BGRx,width=384,height=368 ! waylandsink - // - std::string pipeline_str = \ - "rtpbin name=rtpbin udpsrc caps=\"application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=JPEG,payload=26\" port=5005 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtpjpegdepay ! jpegdec ! "; - //"rtpbin name=rtpbin udpsrc caps=\"application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=JPEG,payload=26\" port=5005 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtpjpegdepay ! jpegdec"; - GstPlugin *plugin = gst_registry_find_plugin(gst_registry_get(), "vaapisink"); - - if (plugin) { - std::cout << "Using va api sink" << std::endl; - pipeline_str += "vaapisink"; - gst_object_unref(plugin); - } else { - std::cout << "Using wayland sink" << std::endl; - pipeline_str += "waylandsink"; - } + "rtpbin name=rtpbin udpsrc " + "caps=\"application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=JPEG,payload=26\" " + "port=5005 ! rtpbin.recv_rtp_sink_0 rtpbin. ! " + "rtpjpegdepay ! jpegdec ! waylandsink"; gst_init(&gargc, &gargv); -- cgit 1.2.3-korg