GStreamer videobox not works

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer videobox not works

Johan Basore
I am working with GStreamer iOS SDK now and have a problem with videobox element.
I have created a videobox element and put the parameters required, but it doesn't works at all.
Here are source codes.

/**************************************************************************/

    g_object_set(videobox1,"border-alpha", 0, "top", 0, "left", -100 , NULL);

    gst_bin_add_many(GST_BIN (pipeline), source1, decodebin1, clrspace1, videobox1, videomixer, clrspace, h264enc, mpegtsmux, sink,
                      source2, decodebin2, clrspace2, filter1, filter2, videoscale1, videoscale2, nil);

    gst_element_link(source1, decodebin1);
    gst_element_link_many(clrspace1, videoscale1, filter1, videomixer, nil);
    gst_element_link(source2, decodebin2);
    gst_element_link_many(clrspace2, videoscale2, filter2, videobox1, videomixer, nil);
    gst_element_link_many(videomixer, clrspace, h264enc, mpegtsmux, sink, nil);

/**************************************************************************/

As you can see, I created "videobox1" and set parameters as "top= 0, left=-100".
So I thought that "source2" must be placed at (100, 0), but it is placed at (0, 0) now. Videobox1 didn't work at all.

Does anyone can help me?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer videobox not works

Arjen Veenhuizen
You have to set the pad properties (e.g. xpos and ypos) on the videomixer to adjust the position of video, see [1]. If using GStreamer 1.x, I would suggest to use the compositor element which is an improved version of the videomixer element. The videobox element is for cropping video only.

[1] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-videomixer.html
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer videobox not works

Johan Basore
Thanks a lot,
I added pad to videomixer.
That works well.