aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-07-05 00:26:12 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-07-10 00:35:36 +0300
commit3d0e7e4671bb5e3ed49f28bd9c11c6eceb436608 (patch)
tree1dd5deae3cbacfb943f185ce41d752bb758ccc11
parent3ac1a25bcfa27594ffd44f5255017322d517cb40 (diff)
app: Use waylandsink for all platforms
Bug-AGL: SPEC-3382 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7bbb34a377921bc5f741495f14951a0df70694cb
-rw-r--r--app/main.cpp29
1 files 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);