GNOME Bugzilla – Bug 758385
[PATCH] souphttpclientsink: add "aggregate-gops" property to process GOPs as a whole
Last modified: 2018-01-28 21:27:52 UTC
Created attachment 315951 [details] [review] souphttpclientsink: add "aggregate-gops" property to process GOPs as a whole This property can be used to make sure that each file part starts cleanly with a key frame and the appropriate headers. In order for this property to work correctly, upstream elements should make sure than any headers that need to be written in a standalone file are: 1) in the streamheader caps field 2) and/or in the stream as one or more buffers marked with GST_BUFFER_FLAG_HEADER that are just before the keyframe buffer This is useful for MPEG-TS/MPEG-PS file segmenting in combination with mpegtsmux or mpegpsmux. Based on original patch for multifilesink: http://lists.freedesktop.org/archives/gstreamer-commits/2015-May/087077.html
Could you explain the use case for this? Why are there multiple "file parts" here?
I can't explain it, no. You can find the explanation in the original commit for multifilesink described above: http://lists.freedesktop.org/archives/gstreamer-commits/2015-May/087077.html This patch is required as a prerequisite for support for using souphttpclient as a sink for HLS, see this bug for further information: https://bugzilla.gnome.org/show_bug.cgi?id=758453
Let's just continue discussion of this in the other bug then :) *** This bug has been marked as a duplicate of bug 758453 ***
This bug isn't a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=758453, this is a completely separate patch. Would it be possible to clarify why you would like to combine them?
My understanding was that both patches work towards the same use case you want to enable. Both patches are basically 'move multifilesink functionality into souphttpclientsink', no? I'm inclined to reject both patches in favour of a different approach, as mentioned in the other bug. It's a bit curious that you can't explain the use case for a patch you propose, but perhaps I misunderstood what you meant :)
The patches are separate to make them easier to review. I can combine them, but it will be a big patch.
There's no need to combine them, you can just attach it as a separate patch to the other bug.
The patch in 758453 has been withdrawn, reopening this one.
Having pulled this functionality apart, what the aggregate-gops option does is ensure that all attempts to write to the sink (in this case a PUT request, in the filesink's case a disk write) are written as complete group-of-pictures, and you don't get partial writes of parts of a gop.
Comment on attachment 315951 [details] [review] souphttpclientsink: add "aggregate-gops" property to process GOPs as a whole Thanks for the patch, but I'm not too keen on duplicating this code everywhere, there are lots of other sink elements where someone might ask for the same thing. I'd rather see a gopaggregate element or such that accumulates GOPs and puts them into a single buffer list or merged buffer, or alternatively perhaps something in the base sink class (not sure about option 2).
Is there a practical way of passing a buffer list to a sink generically?
yes, gst_pad_push_list()