Commit graph

137 commits

Author SHA1 Message Date
Vincent Penquerc'h
ceee36195a oggstream: early out on headers when determining packet duration 2011-11-22 12:00:58 +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
9d2a2750c2 ogg: add opus support 2011-11-19 16:06:09 +00:00
Tim-Philipp Müller
5ee51e47a1 ext, gst, gst-libs, tests: update for tag list API changes 2011-10-31 14:22:39 +00:00
Wim Taymans
06311362e9 fix compilation 2011-10-27 17:26:58 +02:00
Edward Hervey
17bfba09f1 Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggdemux.c
	ext/pango/gsttextoverlay.c
	gst-libs/gst/audio/gstaudioencoder.c
	gst-libs/gst/audio/gstbaseaudiosrc.c
	gst/playback/gstsubtitleoverlay.c
	gst/videorate/gstvideorate.c
2011-09-23 18:27:11 +02:00
Vincent Penquerc'h
c956c5fd00 oggstream: only use information from skeleton if we have nothing better
The codec setup headers are a lot more likely to have correct information,
especially as it's easy to remux a skeleton in a file where streams don't
have the same parameters (I've even seen a file with two skeletons).

Still, this is useful in the case we have a codec we can't decode, so we
can at least (theoretically) convert granpos to time, so we discard this
information if the codec setup has already provided it.

This fixes playback on (at lesat) the original archive.org encoding of
"The Night of the Living Dead" (now replaced by another encoding).

https://bugzilla.gnome.org/show_bug.cgi?id=612443
2011-09-19 23:21:23 +01:00
Wim Taymans
33196cdd2c audio: change audio format syntax a little
Remove the _ in front of the endianness prefix.
Remove the _3 postfix for the 24 bits formats.
Add a _32 postfix after the formats that occupy extra space beyond their
natural size.
The result is that the GST_AUDIO_NE() macro can simply append the endianness
after all formats and that we only specify a different sample width when it is
different from the natural size of the sample. This makes things more consistent
and follows the pulseaudio conventions instead of the alsa ones.
2011-09-06 12:06:39 +02:00
Wim Taymans
232a5a3d0a Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggmux.c
	ext/vorbis/gstvorbisenc.c
2011-08-24 11:04:53 +02:00
Vincent Penquerc'h
1e606c0456 oggstream: correctly identify skeleton EOS packet
It is 0 byte, and was triggering the "bad packet" logic.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:31:51 +02:00
Vincent Penquerc'h
67a882afe7 oggstream: include stream type in warnings
It makes it easier to work out what's going on.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:30:30 +02:00
Vincent Penquerc'h
43cb76b1d8 oggstream: set skeleton stream media type to application/x-ogg-skeleton
This is to match the typefinder, and to make logs clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:30:17 +02:00
Wim Taymans
c81c62d03a fourcc: remove fourcc
Remove fourcc in caps.
Fix pbutils descriptions.
Add more video macros
Fix some unit test
2011-08-22 12:22:02 +02:00
Wim Taymans
8023f49d19 more audio caps porting 2011-08-19 17:41:22 +02:00
Wim Taymans
ba41bb5ca7 Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggmux.c
	gst/playback/gstplaysink.c
2011-08-18 19:36:50 +02:00
Vincent Penquerc'h
cf370e0219 oggstream: vorbis has a preroll of 2
https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:17:28 +02: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
Wim Taymans
33467d9629 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	ext/pango/gsttextoverlay.c
	ext/theora/gsttheoradec.c
	gst/adder/gstadder.c
	gst/adder/gstadder.h
	gst/audioresample/gstaudioresample.c
	gst/encoding/gstencodebin.c
	gst/playback/gstdecodebin.c
	gst/playback/gstdecodebin2.c
	tests/check/elements/decodebin2.c
	tests/check/elements/playbin-compressed.c
	win32/common/libgsttag.def
2011-08-16 18:01:14 +02:00
Jonathan Liu
8bd3bdaf37 oggstream: Fix crashes with 0-byte vorbis packets
Fixes bug #655574.
2011-08-03 10:18:29 +02:00
Sebastian Dröge
dce40847a8 ogg: Update new code for 0.11 buffer API 2011-04-16 16:14:26 +02:00
Sebastian Dröge
c8792778f8 Merge branch 'master' into 0.11 2011-04-16 16:06:26 +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
Sebastian Dröge
352edd1dd9 Merge branch 'master' into 0.11 2011-04-16 09:12:31 +02:00
Tim-Philipp Müller
be59789664 ogg: fix unused-but-set-variable warnings with gcc 4.6
https://bugzilla.gnome.org/show_bug.cgi?id=647294
2011-04-13 23:57:56 +01:00
Wim Taymans
f379a5dacb plugins: more porting to new memory API 2011-03-27 18:30:24 +02:00
Vincent Penquerc'h
b03b223fb1 oggstream: when the last keyframe position is not known, do not use -1
Instead, use either 0 or 1, depending on bitstream version, which give
the correct result for streams which aren't cut off at start.
This allows that function to not return negative granpos.

https://bugzilla.gnome.org/show_bug.cgi?id=638276
2011-01-06 12:34:32 -08:00
Tim-Philipp Müller
542256fd55 ogg: fix typo in comment 2010-12-29 11:51:42 +00:00
Vincent Penquerc'h
a5533c21d9 oggstream: fix interpretation of Theora granule position
The offset part of the granpos is not a sign of the newer encoding.
Use the version number instead.

This fixes the criticals thrown by theoraparse, and (at last) the
remaining part of #553244.
2010-12-29 12:40:25 +01:00
Vincent Penquerc'h
85cafac6af oggstream: implement tag extraction for Kate streams
This will mainly allow Totem to know the language of those streams,
so the subtitle selection menu gets properly filled out.

https://bugzilla.gnome.org/show_bug.cgi?id=638005
2010-12-27 10:53:24 +00:00
David Schleef
0c4820914c oggstream: Fix parsing of theora size 2010-12-22 15:30:36 -08:00
Vincent Penquerc'h
22aa87e98f ogg: implement packet duration query for kate streams
https://bugzilla.gnome.org/show_bug.cgi?id=637519
2010-12-18 20:33:09 +01:00
Mark Nauwelaerts
524b7c60f2 oggstream: additional tag extraction
... supporting theora, flac, speex, celt.

Fixes #629349.
2010-12-03 13:54:08 +01:00
Mark Nauwelaerts
d5055a9f23 oggstream: use separate tag extraction vfunction 2010-12-03 13:54:06 +01:00
Mark Nauwelaerts
cc3dfd31d0 oggstream: refactor vorbis comment tag extraction 2010-12-03 13:54:04 +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
d421ccb440 oggstream: fix incorrect warning on skeleton headers 2010-12-02 17:36:33 -08:00
David Schleef
2b91bd1bad oggparse: Set DELTA_UNIT on buffers 2010-12-02 17:36:26 -08:00
Wim Taymans
6c14f6c970 ogg: add some more debug statements 2010-10-29 11:47:53 +01:00
David Schleef
5ae2f04856 oggdemux: move is_sparse into stream map 2010-10-12 16:06:56 +02:00
Sebastian Dröge
5fd9fc13d5 oggstream: static forward declarations are forbidden by the C standard
...and actually cause compiler errors on VC++. Change it to an extern
forward declaration and non-static definition.
2010-08-08 17:42:04 +02:00
Tim-Philipp Müller
0f3ea721e4 ogg: fix debug message printf format some more
Just cast the pointer diff, so it works everywhere without
warnings. Can't use %tu, because that modifier is C99. Warning
was: "format '%li' expects type 'long int', but argument 8 has
type 'int'".
2010-06-14 00:33:04 +01:00
Philippe Normand
c25bf9777a oggdemux: Fix format string compiler warning on OS X 2010-06-12 13:04:43 +02:00
Sebastian Dröge
7bade30f5e oggstream: Implement latest version of the Skeleton 4.0 spec
Fixes bug #620939.
2010-06-09 16:34:05 +02:00
Sebastian Dröge
3f3691085a oggdemux: Implement correct parsing of Skeleton 4.0 index packets 2010-06-08 13:11:05 +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
f213c8ebe3 oggdemux: Parse segment length and content offset from fishead
And print them for debugging purposes. Not sure if we can do anything useful
with this information.
2010-06-08 11:40:32 +02:00
Sebastian Dröge
aa8daa862e oggdemux: Parse Skeleton stream major/minor version 2010-06-08 11:31:35 +02:00
Sebastian Dröge
7eea3c25c9 oggdemux: Use binary search for searching in the index 2010-06-08 11:26:26 +02:00
Sebastian Dröge
bf9d573cd1 oggdemux: Fix size checks 2010-05-20 13:58:14 +02:00
Sebastian Dröge
8fd69f2cb7 oggdemux: Drop all other Ogg VP8 header packets and make VP8 mapping check a bit more strict 2010-05-20 10:19:29 +02:00
Sebastian Dröge
563a96ef1a ogg: Some more minor adjustments for the VP8 Ogg mapping 2010-05-20 08:52:49 +02:00
Sebastian Dröge
838c96fe8f ogg: Update to the latest VP8 mapping 2010-05-19 21:35:19 +02:00
Sebastian Dröge
ac2d0170a8 oggdemux: Fix granulepos->key granule calculation for Dirac 2010-05-19 19:23:07 +02:00
Sebastian Dröge
d6b6d0cdad oggdemux: Add support for mapping specific granulepos to key granule mapping 2010-05-19 19:23:07 +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
7b3f9aa504 oggdemux: handle corrupt indexes
Make sure we handle and receover from corrupt indexes.
2010-05-04 17:38:50 +02:00
Wim Taymans
50e556cc84 oggstream: avoild division by 0 2010-05-04 13:51:07 +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
Sebastian Dröge
482dd1e56a oggdemux: Provide packet duration function for old FLAC mapping too
Fixes bug #613809.
2010-03-26 15:57:39 +01:00
Benjamin Otte
43b1683421 Add -Wmissing-declarations -Wmissing-prototypes to warning flags
Includes all the fixes necessary to make stuff compile again.
2010-03-11 13:50:31 +01:00
Wim Taymans
6eef04c1cb oggstream: mark skeleton streams correctly
Mark skeleton streams because we need to ignore them for calculating the
duration of the stream.

Fixes #611227
2010-03-01 12:17:40 +01:00
Tim-Philipp Müller
466894d2f4 ogg: theora PAR of 0:N, N:0 or 0:0 is allowed and maps to 1:1
See #609252.
2010-02-15 00:14:03 +00:00
Vincent Penquerc'h
6b8175d96a oggdemux: use the default granpos functions for kate streams
Set timestamps on kate packets. See bug #600929.
2010-02-07 10:16:28 +01:00
Vincent Penquerc'h
25873a050f oggdemux: properly set up the media type for kate streams
See #600929.
2010-01-25 23:49:53 +00:00
Wim Taymans
06e2d2791b oggstream: don't call NULL setup functions
If we find a known mapper but it doesn't have a setup function, simply skip it
instead of crashing.
2010-01-21 17:39:51 +01:00
Wim Taymans
4ed58b5882 oggstream: avoid division by 0 on bad annodex streams 2010-01-21 17:39:51 +01:00
Mark Nauwelaerts
3f4820d6c2 oggdemux: decide flac header packet by content rather than count 2010-01-06 14:03:44 +01:00
Mark Nauwelaerts
8fb183c7c9 oggdemux: enhance flac packet duration calculation 2010-01-05 16:44:58 +01:00
Wim Taymans
e897373a0a ogg: ogm video has constant packet duration 2009-12-11 12:20:13 +01:00
David Schleef
118b62a764 oggdemux: implement old fLaC mapping 2009-12-10 22:48:23 -08: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
4378851102 oggdemux: fix for I-frame-only theora 2009-12-03 17:02:11 -08:00
Tim-Philipp Müller
fb07615baa ogg: log when ogg mapper doesn't accept the setup header packet 2009-12-03 23:43:29 +00:00
Tim-Philipp Müller
8195c26a08 ogg: extract width, height and PAR from theora header and add to caps 2009-12-03 23:43:29 +00:00
Tim-Philipp Müller
295b6c0326 ogg: extract number of channels from FLAC, speex and vorbis headers
Because we can.
2009-12-03 23:43:09 +00:00
Tim-Philipp Müller
2752ae841e ogg: more print fixes
gstoggstream.c:419: error: format ‘%lld’ expects type ‘long long int’, but argument 8 has type ‘gint64’
gstoggdemux.c:2253: error: format ‘%lld’ expects type ‘long long int’, but argument 8 has type ‘GstClockTime’
gstoggdemux.c:2333: error: format ‘%lld’ expects type ‘long long int’, but argument 8 has type ‘GstClockTime’
2009-12-03 21:08:42 +00:00
Thiago Santos
098e416ebc ogg: Fixing some printf format strings
Fixes some printf format strings to make it build on mac.
2009-12-03 16:57:48 -03: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