[gst-devel] tee src pad buffers

Ron McOuat rmcouat at smartt.com
Mon Mar 2 04:53:14 CET 2009


Hi Josep,

As Tim-Philipp Muller commented in the same thread it isn't really valid 
to poke new times into the buffer without calling 
gst_buffer_make_writable but even if you do make this call the new 
buffer can't be returned on a buffer probe. In my case I do care about 
the timestamps changing in the other branches of the tee. It appears in 
record.py you are changing buffer timestamps in both the video and audio 
branch (lines 184 and 380) as well as sending the new segment message. 
At least in your case the adjusting is occurring in the audio and video 
portions of the map which are independent until you get to the muxer. 
With what I was doing I had two branches after a tee doing the timestamp 
adjusting and destructively interfering with each other with some 
bizarre results.

I will try your example at some point tomorrow and see if I can spot 
anything.

Ron

Josep Torra wrote:
> Hi Ron,
>
> If the timestamps on the other branches are not really important you 
> can also send a newsegment to the tee element to notify it on all 
> branches.
>
> This is what I did in the small experimental project attached to this 
> mail.
>
> It's not completely working, there's some strange issue with the 
> theora encoder when I try to generate keyframes at each 10 frames/1 
> second   of recording.
>
> Could someone give me some help in fix the issues?
>
> It could be added to gst-python set of examples if you believe that 
> it's interesting.
>
> Thanks in advance.
>
> Josep
>
> Ron McOuat wrote:
>> I am using the tee element to replicate a stream. In seems the buffer 
>> passed in from gst_tee_chain() to gst_tee_handle_buffer() and then 
>> gst_tee_do_push() has an extra ref placed on it as it is pushed out 
>> each src pad. From this I presume tee replicates references and not 
>> actual contents. I see a function gst_tee_buffer_alloc() and if the 
>> alloc fails gst_tee_find_buffer_alloc() but do not see where they are 
>> called.
>>
>> My issue is using a live source, downstream from the tee I offset 
>> time stamps using a buffer probe handler for when recording is turned 
>> on or off in one of the branches. The time offset changes bleed into 
>> the other tee branches because of what I think is buffer reference 
>> copying instead of content copying. Since most users would not want 
>> to do this I don't feel it is appropriate to treat  his as a defect.
>>
>> I probably missed something, still learning this great library. Could 
>> I please get confirmation of my understanding of tee pad buffers? 
>> Where is gst_tee_buffer_alloc used?
>>
>> As an alternate I could feed the front end into a multifdsink and 
>> then pull the data out for the different purposes by connecting to 
>> that element using a UNIX socket. I would prefer to not do this for 
>> efficiency reasons but the system use is minimal for moving data 
>> around so maybe not a good reason to avoid this approach.
>>
>> Thanks
>>
>> Ron McOuat
>>
>> ------------------------------------------------------------------------------ 
>>
>> Open Source Business Conference (OSBC), March 24-25, 2009, San 
>> Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the 
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source 
>> participation
>> -Receive a $600 discount off the registration fee with the source 
>> code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list