Tee element is corrupting data?
Tim-Philipp Müller
t.i.m at zen.co.uk
Thu Aug 29 05:34:41 PDT 2013
On Thu, 2013-08-29 at 14:12 +0200, Peter Velky wrote:
Hi Peter,
> I have 2 pipes and I am dynamically adding elements (queue and
> shout2send) at the end of these pipes to a tee element. First pipe
> works OK
> * http://tinyurl.com/WorkingPipe (demonstrating it's possible to
> do it this way)
>
> But the second pipe
>
>
> * http://tinyurl.com/NotWorkingPipe
>
> The second pipe with the same code (dynamic adding part) doesn't
> work.
>
>
> After adding e.g. bin8 element to the tee while pipe is playing, data
> is coming from tee element, but they are corrupted. It looks like tee
> element is corrupting data.
>
>
> So, I recorded whole recording http://tinyurl.com/ojycb7u (bin2) and
> also corrupted one (bin8) http://tinyurl.com/pwo2a47
>
> When I set pipe to NULL state and then set to PLAYING, all tees are
> sending data OK, but all shout2send are disconnected and listeners are
> also disconnected, so this isn't way to go.
>
>
> I cannot find out why this is happening. Could you please point me on
> the right direction?
The tee element is most certainly not corrupting data. It doesn't even
modify the data.
What's happening in your case is that when you dynamically add a branch
to the tee, you will be missing the header packets, which are essential
to make sense of the stream. These header packets are however in the
"streamheader" field in the caps.
I think shout2send could/should be modified to grab the headers from the
caps (if any) if the first buffer it receives is not marked as a header
buffer. Feel free to file an enhancement bug for that. Patch would also
be great of course.
Cheers
-Tim
More information about the gstreamer-devel
mailing list