Commit graph

35 commits

Author SHA1 Message Date
Sebastian Dröge
a135868262 oggdemux: Add GstAudioClippingMeta for Opus for accurate start/end clipping
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Sebastian Dröge
8a3be7323a oggdemux: Allow start clipping for Opus
The granulepos does not have the pre-skip subtracted while timestamps do,
and the last granulepos will be shorter by the number of samples that should
be dropped because of padding in the end.

As such, extrapolating the granule of the beginning of the first frame will
lead to a negative value, which is not a problem but intentional.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Thiago Santos
a2633b7cf1 oggmux: implement vp8 granulepos function
Add an extra function to the oggstream map to inform it about
the incoming buffers. This way oggmux can keep a count on the
vp8 invisible frames and calculate the granulepos correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=722682
2014-03-11 12:28:49 -03:00
Thiago Santos
e00c306571 oggmux: create vp8 header data if not provided in caps
vp8 stream header shouldn't be assumed to be provided in caps always
as this would repeat the same code in all demuxers/encoders. Instead,
make oggmux generate them if they are not supplied.

https://bugzilla.gnome.org/show_bug.cgi?id=722682
2014-03-11 12:28:49 -03:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Vincent Penquerc'h
ba967d285a oggstream: add a flag to say whether start granule clamping is to be done 2012-06-06 17:49:13 +01:00
Vincent Penquerc'h
078dd2e896 oggstream: reject Ogg/Opus streams with nonsensical preskip/granpos setup
As the spec mandates.
2012-06-06 11:05:53 +01:00
Tim-Philipp Müller
657fe5efff oggdemux: don't expose Annodex CMML streams any more
This never really took off - it's hardly used anywhere
and deprecated in favour of Kate. Exposing pads just
leads to confusing 'you are missing a plug-in' messages
when people come across such streams. We could still post
the data on the bus for applications to parse.
2012-05-13 18:39:06 +01:00
Vincent Penquerc'h
b4d6263f38 oggdemux: fix granpos interpolation violating max keyframe distance
In case many packets fit on a page, we may not see a granpos for
a while, and granpos interpolation can wrap the 'frames since last
keyframe' part of the granpos, generating a granpos which is smaller
than what it should be.

This is fixed by detecting keyframe packets (at least for Theora),
and updating the last keyframe granpos from this.

This may still be generating potentially wrong granpos for streams
which have a Theora like granpos (keyframes, a max keyframe distance
and a count of frames since last keyframe), and which allow implicit
granules on packets. For these streams, a custom keyframe detection
routine should be plugged into their GstOggStream mapper.

https://bugzilla.gnome.org/show_bug.cgi?id=669164
2012-02-02 13:06:29 +00:00
Vincent Penquerc'h
e05f1df04b oggstream: account for opus pre-skip in granpos/time mapping 2011-11-22 11:59:54 +00:00
Vincent Penquerc'h
96e7bf53e9 oggstream: new convenience function to get a stream's media type
This will make logging a lot clearer, both in code and in output.

https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:17:15 +02:00
Vincent Penquerc'h
8304b7b40d ogg: move the "always flush page" to oggstream
It avoids checking for specific media types in the muxer.

https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:16:50 +02:00
Vincent Penquerc'h
5bbf7109ec ogg: rationalize serialno type to guint32
It is a 32 bit unsigned number.
Sure, the libogg API uses a long, but that's an unfortunate oversight.

https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:15:51 +02:00
Vincent Penquerc'h
55e767b632 oggmux: prefer headers from caps to determine stream type
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
2011-04-16 11:55:27 +01:00
David Schleef
15e23414d3 oggparse: better detection of delta unit flag 2011-02-17 18:29:56 -08:00
Mark Nauwelaerts
d5055a9f23 oggstream: use separate tag extraction vfunction 2010-12-03 13:54:06 +01:00
Mark Nauwelaerts
515f33bd3b oggstream: streamline tag extraction and prevent some leaks 2010-12-03 13:53:59 +01:00
Sreerenj Balachandran
2319c85f46 oggdemux: perform more (vorbis comment header) tag extractions
In particular, move comment header parsing to gstoggstrem.c.
Thanks to Felipe Contreras.

Fixes #629349 (partially).
2010-12-03 13:53:54 +01:00
David Schleef
2b91bd1bad oggparse: Set DELTA_UNIT on buffers 2010-12-02 17:36:26 -08:00
David Schleef
5ae2f04856 oggdemux: move is_sparse into stream map 2010-10-12 16:06:56 +02:00
Sebastian Dröge
cba98e05cf oggdemux: Add parsing of Skeleton 4.0 indexes 2010-06-08 12:01:15 +02:00
Sebastian Dröge
aa8daa862e oggdemux: Parse Skeleton stream major/minor version 2010-06-08 11:31:35 +02:00
Sebastian Dröge
5fc1309703 ogg: Implement Ogg VP8 mapping 2010-05-19 19:23:07 +02:00
Wim Taymans
549bc3c80e oggdemux: use index to estimate bitrate
When we have an index, use it to much more accurately estimate the total stream
bitrate.
2010-05-06 10:58:01 +02:00
Wim Taymans
5c770a17db oggstream: parse duration from 3.3 skeleton 2010-05-04 13:02:19 +02:00
Wim Taymans
ff4479f00a oggdemux: more index parsing work 2010-05-04 12:11:18 +02:00
Wim Taymans
97319a6276 oggdemux: clean up fishead/fisbone parsing
Remove some redundant code for parsing fishead streams. Actually use the data we
parsed (mostly start_time).
2010-05-04 12:05:15 +02:00
Wim Taymans
f9ca4f6097 oggdemux: use bitrate to estimate length in pushmode
Parse the bitrate from the various streams.
Use the bitrate and the upstream length in bytes to estimate the total stream
duration in push mode.
2010-04-30 17:43:06 +02:00
Wim Taymans
e4b68a3658 oggdemux: use right type for the serialno
Use a consistent type for the serialno to avoid problems when comparing between
signed and unsigned variants.

Fixes #607926
2010-01-25 15:14:56 +01:00
Wim Taymans
0201326db1 oggdemux: push headers when activating chains
Keep a list of headers for each stream of a chain. When a chain is activated,
push the headers before pushing the data so that decoders can sync.
Fix seeking in chains, take the chain start time into account when comparing
timestamps.

See #606382
2010-01-08 16:57:40 +01:00
David Schleef
8bbe0d126a oggdemux: reimplement OGM support
OGM demuxing no longer requires helper elements.  It's done internally
in oggdemux.  Vorbis comments are still not handled because I don't
have anything to test with.
2009-12-03 20:05:29 -08:00
David Schleef
d2c9d7fc1c oggdemux: handle theora streams with 0 keyoffset 2009-11-26 14:16:28 -08:00
David Schleef
8c202593c6 oggdemux: Fix timestamp generation for theora
Timestamp generation was broken by the last commit for formats
with a non-zero granule shift.  Also keep track of the last keyframe
so that we can regenerate granulepos for theora.
2009-11-24 22:08:09 -08:00
David Schleef
78aad52cbf oggdemux: Fix vorbis parsing
Add a granule to granulepos conversion function.  Fix the duration
function for vorbis.  Handle timestamps on header packets differently
and be more careful about calculating OFFSET and OFFSET_END.  After
this change, timestamps for vorbis don't exactly match up with the
timestamps that vorbisparse outputs, but it's unclear if vorbisparse
is actually correct and it would add a lot more code to make oggdemux
match vorbisparse.  Fixes #602790.
2009-11-24 21:22:03 -08:00
David Schleef
72edd1467b ogg: Add ogg stream parsing
Adds code that parses headers of various formats encapsulated in
Ogg in order to calculate timestamps and durations of each buffer.
Removes the creation of helper decoder elements to do this calculation
via conversion queries.

Fixes: #344013, #568014.
2009-11-21 19:40:42 +01:00