Hi there,
I am trying to build a dynamic pipeline using the Imxg2dcompositor. The following is the gst-launch command inside a shell file. ---------------------------------------------------------------------------------------------------- MARGIN=2 JPEGPIPE="caps="application/x-rtp,encoding-name=JPEG,payload=26" ! rtpjpegdepay ! jpegparse ! queue max-size-time=0 max-size-buffers=0 ! imxvpudec" gst-launch-1.0 imxg2dcompositor name=comp background-color=0xff0000 \ sink_0::alpha=1 sink_0::fill_color=0x99999999 sink_0::rotation=0 sink_0::keep-aspect-ratio=false \ sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=800 \ sink_0::left-margin=0 sink_0::right-margin=$MARGIN sink_0::top-margin=0 sink_0::bottom-margin=0 \ sink_1::alpha=1 sink_1::fill_color=0x99999999 sink_1::rotation=0 sink_1::keep-aspect-ratio=false \ sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=800 \ sink_1::left-margin=$MARGIN sink_1::right-margin=0 sink_1::top-margin=0 sink_1::bottom-margin=0 \ ! imxg2dvideosink sync=false async=false use-vsync=true \ udpsrc port=5004 $JPEGPIPE ! comp.sink_0 \ udpsrc port=5005 $JPEGPIPE ! comp.sink_1 ---------------------------------------------------------------------------------------------------- Now I want to build the elements one by one and finally link the pipeline. I managed to build the dynamic pipeline in C++ without the compositor (only one udpsource). But there is not a single example for the Imxg2dcompositor in C/C++. So how can I "convert" the gst-launch command to C/C++ code, to be able to (e.g.) change the position of every element during runtime ? Thanks in advance! -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Thu, 2017-10-26 at 01:57 -0700, chrisplus3 wrote:
Hi Chris, > So how can I "convert" the gst-launch command to C/C++ code Can't help you with that, sorry :) I'm sure you can find code examples using "compositor" or "glvideomixer" somewhere though. > to be able to (e.g.) change the position of every element during > runtime ? You can do that in code by 1) getting the input/sink pad from the mixer: pad = gst_element_get_static_pad (mixer, "sink_0"); ... gst_object_unref (pad); 2) It has properties for position/zorder/alpha: g_object_set (pad, "xpos", 10, "ypos", 10, NULL); Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Tim,
thank you for your response. > Can't help you with that, sorry :) I'm sure you can find code examples > using "compositor" or "glvideomixer" somewhere though. I did, indeed find something after quite a long search. "GStreamer/gst-plugins-bad/blob/master/tests/check/elements/compositor.c" Regards Chris -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |