GStreamer gst_pad_get_offset and gst_pad_set_offset not working
Hello everyone !
First of all I want to clarify that I do not speak English very well, so please apologize in advance if I do not express myself well.
According to the command gst-inspect-1.0 --gst-version, I have version 1.14.5 of gstreamer.
I started a dynamic gstreamer project whose simplified pipeline structure looks like this (obviously I specify that I use a programming language and not gst-launch):
AnElementNoMatterWhich ! videomixer ! AnElementNoMatterWhich ! tee ! queue ! AnElementNoMatterWhich
Now imagine that after 10 seconds I want to add an element, no matter witch, to the videomixer sink. Or let's say I want to add an item to the tee src (this is the same as with the videomixer, except that I would add a tail between the tee and the element so as not to block other branches).
It will take about 10 seconds before the stream passes into the sink pad of the videomixer . Likewise for the src pad of the tee. By analogy, the time spent before adding an element in a pipeline (and connecting it to the videomixer or to the tee) is around the same time that the videomixer and/or tee pads must wait before passing the stream.
This is all explained by the difference in execution of the pipeline compared to the newly created videomixer and / or tee pads.
This is where the two methods gst_pad_get_offset() and gst_pad_set_offset() come in.
First of all I can not understand what the offset unit (gint64) is. Is it a unit of time ? Millisecond ? Microsecond ? Nanosecond ? Or is it something else ?
Also I can't understand why gst_pad_get_offset() always returns 0. However, I have to get the offset if I want to be able to set the right offset with the gst_pad_set_offset() method. According to the documentation I have to do it on a src pad, but where ?
And finally I don't understand why gst_pad_set_offset() is not working. I obviously run it on the sink pad of the newly created videomixer or on the src pad of the tee (whatever). It doesn't change anything. Besides, if I have the idea of giving the value 10 (for example) to gst_pad_set_offset () and that I then run gst_pad_get_offset () on the same pad, I should theoretically have the value 10. However, I get always 0. It is as if gst_pad_get_offset () and gst_pad_set_offset () had not been implemented.
I followed all the gstreamer tutorials and spent several days on the forums. I do not know what to do. However, I know that without the proper functioning of these two methods, my project is blocked. What can I do ? Do you have an idea ?