Version written is 3.0
Base times are left empty for now.
Content-Type should be the MIME type of the stream. It is set to
the GStreamer media type for now, which is probably the same for
the streams oggmux supports.
https://bugzilla.gnome.org/show_bug.cgi?id=563251
This decreases the number of buffers held on each pad by one,
eliminating next_buffer. Simplifies the logic by relying solely
on CollectPads to let us know when a pad is in EOS. As a side
benefit, the collect pads related code is structured more like
other CollectPad users.
The previous code would occasionally mark the wrong pad as EOS,
causing the code to get in a state where all the streams were
finished, but EOS hadn't been sent to the source pad.
Ogg mandates the first header packet must determine a stream's type.
However, some streams (such as VP8) do not include such a header
when muxed in other containers, and thus do not include this header
as a buffer, but only in caps. We thus use headers from caps when
available to determine a new stream's type.
https://bugzilla.gnome.org/show_bug.cgi?id=647856
gcc on OSX complains about ret being used uninitialized in
this function, and it is right. Don't leak element ref
when returning early because newsegment event is not in
TIME format.
Also initialize it always in TIME format. We require TIME segments
in oggmux anyway and drop newsegment events in other formats and
assume an open-ended segment starting at 0.
Theora and vorbis use running time (which is correct) for calculating
the granulepos for their ogg packets. Oggmux, however, used
timestamps to order the received buffers.
This patch makes it use the running time to compare buffer times
and also to timestamp pushed buffers.
Some bits of the code still use timestamps, but they are only
used to calculate durations, so it should be fine.
https://bugzilla.gnome.org/show_bug.cgi?id=643775
In case the ogg mapper doesn't handle all the accepted input formats
(although it really should). Saves us error handling for that case
though. Also log caps properly.
https://bugzilla.gnome.org/show_bug.cgi?id=629196
Using the IN_CAPS flag for this is brittle, and will fail if either
vorbisparse or vorbistag (which is itself based on vorbisparse) is
inserted between oggdemux and oggmux. Possibly other elements too
(eg, theoraparse, etc).
Using oggstream ensures we Get It Right More Often Than Not.
https://bugzilla.gnome.org/show_bug.cgi?id=629196
Discontinuities are automatically signalled by oggdemux at the start
of a new stream. When oggmux is yet to output actual data pages,
do not signal these discontinuities in the ogg stream.
This patch may miss some actual discontinuities at the very start of
a stream, but avoids the spurious missing pages when encoding happens
normally.
A better fix might involve finding a way to distinguish between actual
data discontinuities and discontinuities merely marking the start of
a new stream.
Fixes an issue with ogg page numbering (would skip a number for no
reason, which then looks like a packet was lost somewhere) when
re-muxing an ogg stream, e.g. when re-tagging in rhythmbox.
https://bugzilla.gnome.org/show_bug.cgi?id=629196
Revert previous 'fix' for bug #588717 and fix it properly, whilst
maintaining the streamheader field on the output caps. Also make
sure we don't leak header buffers we couldn't push when downstream
is unlinked. Add unit test for the presence of the streamheader
field on the output caps and for the issue from bug #588717.
Fix caps warning when there's no element linked downstream, and pass
not-linked flow return value correctly up the chain, so we error out
correctly. Fixes#588717.
Original commit message from CVS:
Patch by: Daniel Drake <dsd at laptop dot org>
* ext/ogg/gstoggmux.c: (gst_ogg_mux_clear_collectpads):
Unref all buffers when clearing collectpads. Fixes bug #546955.
Original commit message from CVS:
* ext/ogg/gstoggmux.c: (gst_ogg_mux_sink_event),
(gst_ogg_mux_request_new_pad):
* ext/ogg/gstoggmux.h:
Don't pretend to support NEWSEGMENT events, instead override the
GstCollectPads event function to return FALSE on NEWSEGMENT events
and do the normal work for other events.
This prevents elements like flacenc to seek to the start and rewrite
some data which then results in a broken Ogg packet.