GNOME Bugzilla – Bug 578118
[multifdsink] add option to not resend the streamheader when it changes in the caps
Last modified: 2009-04-14 15:06:43 UTC
The attached patch adds a new property in multifdsink, resend-streamheader. If this property is false, the multifdsink will not send the streamheader if there's already one set for a particular client. There are some formats in which every stream needs to start with a certain blob, but you can't inject this blob at leisure. If the producer wants to change the blob in question and sets in as the streamheader on the outgoing buffers' caps, new clients of multifdsink will get the new streamheader, but old clients will break, because they'll see the blob in the middle of the stream. The property is true by default, so existing code will not see any difference.
Created attachment 132177 [details] [review] patch to implement the feature
Actually, a better idea might be to invent a new buffer flag, something like DONT_SEND_IN_STREAMHEADER_IF_CHANGED. multifdsink would then look at that flag and not send buffers that have it. The producer can then change the streamheader safely - new clients will get the new header, old clients won't get broken. That shifts the responsibility to the producer, which is good, and adds flexibility.
The streamheader flag is hard to implement without breaking ABI for 0.10. I guess the patch is acceptable.
commit 63108730a59c270e5ddce051722755ca1596ef14 Author: Jan Urbanski <j.urbanski at students.mimuw.edu.pl> Date: Tue Apr 14 17:04:06 2009 +0200 multifdsink: add property to resend streamheaders Adds a new property in multifdsink, resend-streamheader. If this property is false, the multifdsink will not send the streamheader if there's already one set for a particular client. There are some formats in which every stream needs to start with a certain blob, but you can't inject this blob at leisure. If the producer wants to change the blob in question and sets in as the streamheader on the outgoing buffers' caps, new clients of multifdsink will get the new streamheader, but old clients will break, because they'll see the blob in the middle of the stream. The property is true by default, so existing code will not see any difference. Fixes #578118.