Commit graph

790 commits

Author SHA1 Message Date
Vincent Penquerc'h
353153d079 oggdemux: survive skeleton finding length behind our backs in push mode
In push mode, we determine duration by doing a seek to the end of the
stream. However, a skeleton stream with an index will cause the duration
to be known already, and we end up never setting the push_time_duration
variable which we use to know duration has been determined.

https://bugzilla.gnome.org/show_bug.cgi?id=662049
2011-11-07 12:20:16 +00:00
Wim Taymans
7ac25e9b26 Merge branch 'master' into 0.11
Conflicts:
	common
	configure.ac
	gst-libs/gst/audio/gstbaseaudiosink.c
	gst/playback/gstdecodebin2.c
	gst/playback/gstplaysinkaudioconvert.c
	gst/playback/gstplaysinkaudioconvert.h
	gst/playback/gstplaysinkvideoconvert.c
	gst/playback/gstplaysinkvideoconvert.h
2011-11-07 12:23:15 +01:00
Wim Taymans
75fea4f535 oggdemux: fix somtimes pad 2011-11-04 12:53:33 +01:00
Wim Taymans
cf8481b990 fix pad template names for request pads 2011-11-04 10:49:48 +01:00
Sebastian Dröge
41dc3033d4 oggmux: Remove obsolete #include 2011-11-03 09:27:56 +01:00
Wim Taymans
a5fa136c0b update for tag API removal 2011-11-02 12:11:16 +01: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
4f9dea137f Merge branch 'master' into 0.11 2011-10-28 11:34:37 +02:00
Thiago Santos
136f5b2690 oggmux: port to gstcollectpads2 2011-10-28 10:06:16 +02:00
Wim Taymans
06311362e9 fix compilation 2011-10-27 17:26:58 +02:00
Wim Taymans
016d036137 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst-libs/gst/audio/gstbaseaudiosink.c
	gst/audioconvert/channelmixtest.c
	gst/playback/gstplaybasebin.c
	gst/playback/gstsubtitleoverlay.c
	tests/examples/Makefile.am
	tests/examples/audio/Makefile.am
2011-10-27 15:44:58 +02:00
René Stadler
133a0b1771 oggdemux: remove avoidable call to gst_object_set_name 2011-10-21 22:24:14 +02:00
Vincent Penquerc'h
26e1c2d628 oggdemux: do not retry seeking indefinitely
https://bugzilla.gnome.org/show_bug.cgi?id=661897
2011-10-17 10:51:19 +01:00
Wim Taymans
f1088ed647 update for UNEXPECTED -> EOS flowreturn 2011-10-10 11:39:52 +02:00
René Stadler
1d3980cda2 oggdemux: don't leak scheduling query 2011-10-07 14:06:57 +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
Tim-Philipp Müller
15d8082a55 oggdemux: remove superfluous check in newsegment event handler
If we get a newsegment event from upstream, we can be quite
sure we're not operating pull-based.
2011-09-16 20:14:39 +01:00
Tim-Philipp Müller
049e275632 oggdemux: minor printf format fix 2011-09-16 20:11:56 +01:00
Vincent Penquerc'h
89fc5b4bd8 oggdemux: fix wedge when seeking twice quickly in push mode
This could happen when testing with navseek, and pressing
right and left at roughly the same time. The current chain
is temporarily moved away, and this caused the flush events
not to be sent to the source pads, which would cause the
data queues downstream to reject incoming data after the
seek, and shut down, wedging the pipeline.

Now, I can't really decide whether this is a nasty steaming
hack or a good fix, but it certainly does fix the issue, and
does not seem to break anything else so far.

https://bugzilla.gnome.org/show_bug.cgi?id=621897
2011-09-16 20:07:33 +01:00
Vincent Penquerc'h
0173afa38c oggdemux: implement push mode seeking
This patch implements seeking in push mode (eg, over the net)
in Ogg, using the double bisection method.
As a side effect, it also fixes duration determination of network
streams, by seeking to the end to check the actual duration.

Known issues:
- Getting an EOS while seeking stops the streaming task, I can't
  find a way to prevent this (eg, by issuing a seek in the event
  handler).
- Seeking twice in a VERY short succession with playbin2 fails
  for streams with subtitles, we end up pushing in a dataqueue
  which is flushing. Rare in normal use AFAICT.
- Seeking is slow on slow links - byte ranges guesses could be
  made better, decreasing the number of required requests
- If no granule position is found in the last 64 KB of a stream,
  duration will be left unknown (should be pretty rare)

https://bugzilla.gnome.org/show_bug.cgi?id=621897
2011-09-16 19:47:10 +01:00
Vincent Penquerc'h
6704b37fc3 oggdemux: do not propagate discontinuities in sparse streams
The first packet of a sparse stream may arrive after an initial
delay in the stream. If ogg_stream_packetout reports a discontinuity
in a sparse stream, do not propagate it to other streams in the
chain unnecessarily.

https://bugzilla.gnome.org/show_bug.cgi?id=621897
2011-09-14 23:20:01 +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
e1287b97ab Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggmux.c
	gst-libs/gst/audio/audio.c
	gst-libs/gst/audio/audio.h
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/pbutils/Makefile.am
	gst-libs/gst/pbutils/gstdiscoverer.c
	gst/playback/gstplaysinkaudioconvert.c
	gst/playback/gstplaysinkvideoconvert.c
	win32/common/libgstaudio.def
2011-08-29 11:37:36 +02:00
Vincent Penquerc'h
fd218c4ec2 oggmux: fix leaks in skeleton writing
https://bugzilla.gnome.org/show_bug.cgi?id=563251
2011-08-25 08:32:26 +02:00
Vincent Penquerc'h
29038283bc oggmux: generate message headers from received tags
Some message headers can be deduced from tags (eg, "Language").

https://bugzilla.gnome.org/show_bug.cgi?id=563251
2011-08-25 08:32:20 +02:00
Vincent Penquerc'h
53c8656248 ogg: use memory slices where appropriate
While there, avoid zeroing newly allocated memory where unnecessary

https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-25 08:26:49 +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
7b8b0fa1bb oggdemux: do not warn when reaching EOS while scanning for the end chain
After all, we were asking for it.

This gets rid of the last warning-about-expected-condition.

w00t.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:32:21 +02:00
Vincent Penquerc'h
df40ddf0aa oggdemux: add media type to chain information reports
One more little step in making logs a little less abstruse.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:31:58 +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
68ed992e7e oggdemux: do not warn about expected occurences
In this case, finding a skeleton packet.
Once upon a time, it used to be rare indeed, but no more.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:31:30 +02:00
Vincent Penquerc'h
4fdb52871c oggdemux: do not warn when finding a non BOS page
After all, we do hope to find actual data for these streams.
However, warn if we could not set up a chain when we find a
non BOS page, as that means we don't have a valid Ogg stream.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:31:17 +02:00
Vincent Penquerc'h
564eedd214 oggdemux: rename local variable for clarity
While the casual reader might end up bewildered by just why this
change might increase clarity, it just happens than, in the libogg
and associated sources, op is the canonical name for an ogg_packet
whlie og is the canonical name for an ogg_page, and reading this
code confuses me.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:30:55 +02:00
Vincent Penquerc'h
5d18496a5b oggdemux: do not try to determine duration of header packets
Headers are inherently durationless.
Instead, set duration to 0 to avoid increasing tracked granpos,
and do not warn about it, since it is totally expected.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
2011-08-24 08:30:45 +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
Vincent Penquerc'h
2301f1806f oggmux: add skeleton write support
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
2011-08-24 08:21:34 +02:00
Vincent Penquerc'h
8a752e44e2 oggdemux: do not skip sparse streams when determining start times
This fixes demuxing of streams containing only sparse streams,
which would cause an infinite loop in _read_end_chain.

https://bugzilla.gnome.org/show_bug.cgi?id=657062
2011-08-23 10:36:18 +02:00
Vincent Penquerc'h
4e9508e2ec oggdemux: do not ignore sparse streams' start time
But do not wait for them either, if we don't have a packet for them.

https://bugzilla.gnome.org/show_bug.cgi?id=657062
2011-08-23 10:36:03 +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
5f359600ce oggmux: fix compilation 2011-08-22 12:21:08 +02:00
Wim Taymans
8023f49d19 more audio caps porting 2011-08-19 17:41:22 +02:00
Wim Taymans
b657f5bce7 Merge branch 'master' into 0.11 2011-08-19 14:07:11 +02:00
Vincent Penquerc'h
b7bb1e5633 ogg: do not use 32 bit modifiers to print serial numbers
If ints are 64 bits, 32 bits should get promoted in varargs anyway,
and we don't care about 16 bit ints.
This makes the code a lot more readable, and still gets us nice
hexadecimal 32 bit serialnos.

https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 20:18:53 +01: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
1dadc5eac1 ogg: get the operator precedence right, even if only a doc
https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:17:40 +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
Vincent Penquerc'h
fd8434fc74 oggmux: use oggstream to decide which BOS packets to place first
Ogg recommends video BOS packets to be first.
Use the "is_video" flag in oggstream to select those, rather than
check for known mime types.

https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:16:19 +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
684b90ba74 oggmux: factor the header packet creation code
https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:13:59 +02:00
Vincent Penquerc'h
3fe42b8e7e oggmux: headers should always have granpos 0
https://bugzilla.gnome.org/show_bug.cgi?id=656775
2011-08-18 11:13:47 +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
Wim Taymans
e904c529e3 fix for _negotiated_caps() change 2011-08-15 12:18:15 +02:00
Josep Torra
5629ed74b3 Fix debug statements
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:15:41 +02:00
Jonathan Liu
8bd3bdaf37 oggstream: Fix crashes with 0-byte vorbis packets
Fixes bug #655574.
2011-08-03 10:18:29 +02:00
Tim-Philipp Müller
bb65192151 ext,gst: update for query API changes 2011-07-27 01:16:53 +01:00
Wim Taymans
376164ab08 Merge branch 'master' into 0.11 2011-07-10 13:49:14 +02:00
David Schleef
a5323107d4 oggmux: check for EOS on both current and best pad
Oops, need both.  Fixes #654270.
2011-07-09 18:33:38 -07:00
David Schleef
2fa9bf2be5 oggmux: check for EOS on current pad, not best
Fixes #654270.
2011-07-09 18:24:26 -07:00
Tim-Philipp Müller
dd56714b14 ffmpegcolorspace -> videoconvert 2011-07-07 23:59:59 +01:00
Wim Taymans
d06f599193 -base: port elements to new video caps 2011-06-16 12:52:13 +02:00
Wim Taymans
40d567153a Merge branch 'master' into 0.11 2011-06-13 19:09:05 +02:00
David Schleef
ea0d666d11 oggmux: refactor how EOS is determined
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.
2011-06-10 23:54:07 -07:00
Wim Taymans
40e3dda187 oggdemux: small cleanups 2011-06-10 18:04:14 +02:00
Wim Taymans
db999572a8 -base: fix for flush_stop event API change 2011-06-10 11:59:53 +02:00
Wim Taymans
2940249a84 -base: use caps event
Remove uses of setcaps function and use the caps event.
2011-06-07 11:55:36 +02:00
Wim Taymans
c88ee10c9b Merge branch 'master' into 0.11
Conflicts:
	ext/theora/gsttheoraenc.c
2011-06-06 16:27:12 +02:00
Mark Nauwelaerts
99944a5a81 oggmux: determine granulepos metadata using stream mapper whenever possible
... which unfortunately is not the case for all types, but at least so for
most common ones.
2011-06-06 13:02:49 +02:00
Mark Nauwelaerts
de1f593537 oggmux: convert incoming buffer timestamp to running time
... so all subsequent manipulation can take place in the proper timeline
without further ado.
2011-06-06 13:02:47 +02:00
Mark Nauwelaerts
2e7eddd35e oggmux: remove superfluous code
... since there is nothing in oggstream that cares (or even should)
about granulepos for what is being asked from it.
2011-06-06 13:02:43 +02:00
Edward Hervey
266a9be400 oggmux: Use the GstPad (and not the GstOggPadData for GstPad functions
For those willing, renaming that 'pad' variable to something more obvious
would be nice to avoid such bugs...
2011-06-03 19:28:32 +02:00
Wim Taymans
29c3e31ff5 oggdemux: activate pad before pushing things
Activate the pad before pushing things on it or else we get errors.
2011-05-30 17:14:48 +02:00
Wim Taymans
010add200a scheduling: port to new scheduling query 2011-05-24 17:37:45 +02:00
Sebastian Dröge
884213b8b8 base: Update for SEGMENT event parse API changes 2011-05-18 17:23:18 +02:00
Sebastian Dröge
c255019b90 ext: Update for caps/pad template related API changes 2011-05-17 13:06:01 +02:00
Sebastian Dröge
318ed07598 Revert "-base_port to new query API"
This reverts commit c9f4e0676b.
2011-05-17 11:25:31 +02:00
Sebastian Dröge
bcbf0488bf ogg: Update for negotiation related API changes 2011-05-16 15:35:41 +02:00
Wim Taymans
94dfe80f71 -base: port to new SEGMENT API 2011-05-16 13:48:11 +02:00
Wim Taymans
c9f4e0676b -base_port to new query API 2011-05-10 18:39:07 +02:00
Wim Taymans
7cad11e912 -base: fix for now request pad API 2011-05-10 16:44:37 +02:00
Wim Taymans
816f4e791d segment: fix for new core API
Fix for gst_*_segment_full rename.
2011-05-09 18:16:46 +02:00
Wim Taymans
ec57868488 -base: don't use buffer caps
Port to newest 0.11 core API, remove GST_PAD_CAPS and GST_BUFFER_CAPS.
2011-05-09 13:05:12 +02:00
Sebastian Dröge
353186aec8 ext: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 14:22:42 +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
Tim-Philipp Müller
8f1d77bc3c oggmux: fix uninitialised variable usage and element leak
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.
2011-04-12 12:41:06 +01:00
Wim Taymans
6e160bed3d Merge branch 'master' into 0.11
Conflicts:
	android/alsa.mk
	android/app.mk
	android/app_plugin.mk
	android/audio.mk
	android/audioconvert.mk
	android/decodebin.mk
	android/decodebin2.mk
	android/gdp.mk
	android/interfaces.mk
	android/netbuffer.mk
	android/pbutils.mk
	android/playbin.mk
	android/queue2.mk
	android/riff.mk
	android/rtp.mk
	android/rtsp.mk
	android/sdp.mk
	android/tag.mk
	android/tcp.mk
	android/typefindfunctions.mk
	android/video.mk
2011-04-11 11:37:51 +02:00
Alessandro Decina
030f639a8e android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the
needed Android.mk files.
Androgenizer can be found here:
http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:23:21 +02:00
Wim Taymans
da1c863711 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/tag/gstvorbistag.c
2011-04-04 11:31:33 +02:00
Josep Torra
cd425d3787 oggmux: fix warning building in mac os x 2011-04-01 15:47:18 +02:00
Sebastian Dröge
1c475f10e1 oggmux: Store the segment directly inside the pad
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.
2011-04-01 11:00:38 +02:00
Sebastian Dröge
fc56c76773 oggmux: Reset the segment on flush-stop events and when going back to READY 2011-04-01 10:58:09 +02:00
Thiago Santos
d1c74779f9 oggmux: Use running time instead of timestamps
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
2011-04-01 10:56:16 +02:00
Thiago Santos
c3aae3dc17 oggmux: Keep track of pad's segments
https://bugzilla.gnome.org/show_bug.cgi?id=643775
2011-04-01 10:56:15 +02:00
Wim Taymans
248ab2d064 Fix for latest API changes 2011-03-30 16:50:45 +02:00
Wim Taymans
3712ca2da4 oggparse: fix for _make_writable 2011-03-28 20:19:24 +02:00
Wim Taymans
e1869fa267 Merge branch 'master' into 0.11-fdo 2011-03-28 20:13:59 +02:00
Wim Taymans
f379a5dacb plugins: more porting to new memory API 2011-03-27 18:30:24 +02:00
Tim-Philipp Müller
5aa02968c9 oggparse: fix list iteration code
Not that it really matters, but let's fix it before someone
notices and makes fun of us.
2011-03-26 19:38:17 +00:00
Tim-Philipp Müller
a7a305a18f oggparse: make sure buffer metadata is writable before setting caps on buffers 2011-03-26 11:59:54 +00:00
Wim Taymans
95f7fd8edf Merge branch 'master' into 0.11-fdo 2011-03-15 11:11:56 +01:00
Sebastian Dröge
a38fd9f9ec oggmux: Increase the seen header packets count when seeing a header packet
This fixes muxing of Speex content and possibly other formats where the
header detection works by counting the packets.

Fixes bug #644745.
2011-03-14 19:44:41 +01:00
Wim Taymans
c6dd11981d Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst-libs/gst/pbutils/Makefile.am
2011-02-28 11:47:44 +01:00
Sebastian Dröge
461d9f2f2c oggmux: Don't handle GstCollectData as GstObject, use the pad instead 2011-02-24 16:22:53 +01:00
Edward Hervey
3fe2777b54 Revert "oggmux,adder: Check if collectpads has been freed"
This reverts commit 6d150873e8.

Depends on a core commit that was reverted.
2011-02-21 12:04:09 +01:00
David Schleef
6d150873e8 oggmux,adder: Check if collectpads has been freed
Core now calls release_pad in finalize, which is usually after
the collectpads has been unreffed.
2011-02-20 23:49:54 -08:00
David Schleef
15e23414d3 oggparse: better detection of delta unit flag 2011-02-17 18:29:56 -08:00
Vincent Penquerc'h
96a1a9dec6 oggmux: ensure serialnos are unique
We do that by checking a newly generated one is not already used in
an existing stream, and doing it again if it is.

https://bugzilla.gnome.org/show_bug.cgi?id=640211
2011-02-03 09:29:28 +00:00
Tim-Philipp Müller
54c19ba6de oggmux: free stream map caps when done 2011-02-02 17:34:42 +00:00
Tim-Philipp Müller
2eac43bd73 oggmux: keep IN_CAPS flag check for header buffers as fallback
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
2011-02-02 17:34:41 +00:00
Vincent Penquerc'h
440002a137 oggmux: use oggstream for less brittleness in recognizing headers
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
2011-02-02 17:34:41 +00:00
Vincent Penquerc'h
b7664eae71 oggmux: do not skip a pageno at start
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
2011-02-01 17:25:43 +00:00
Vincent Penquerc'h
d144f7a3a5 oggmux: cleanup
Remove a pointless string concatentation, and fix an off-by-one in
packetno in a log.

https://bugzilla.gnome.org/show_bug.cgi?id=640189
2011-01-24 20:01:24 +01:00
Sreerenj Balachandran
7cfa18545c oggdemux: Remove dead code 2011-01-24 19:40:00 +01:00
Yang Xichuan
cb9607632f oggparse: Make gst_ogg_parse_submit_buffer() safe
By not passing zero-sized buffers to ogg_sync_buffer()
and checking the return values of libogg functions.

Fixes bug #639136.
2011-01-24 19:39:59 +01:00
Yang Xichuan
43553b4dcb oggdemux: remove outdated comment
https://bugzilla.gnome.org/show_bug.cgi?id=639121
2011-01-10 12:34:54 +00:00
David Schleef
3c4466b816 oggdemux: ignore header pages when looking for keyframe
This was causing keyframe_granule to be set to 0 for all streams
when seeking to the beginning of the stream, i.e., at the
beginning of playback.  Fixes #619778.
2011-01-06 12:34:32 -08: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
Wim Taymans
68e64770a0 oggdemux: handle pads that are not added yet
Don't try to stream data on pads that are not added yet. This happens while we
discover the different streams.
2010-12-28 19:39:18 +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
Vincent Penquerc'h
dd135119d9 oggdemux: set headers on caps
This will allow switching from one stream to another without having to send
the headers for the new stream again.

https://bugzilla.gnome.org/show_bug.cgi?id=637927
2010-12-25 16:55:15 +01:00
David Schleef
0c4820914c oggstream: Fix parsing of theora size 2010-12-22 15:30:36 -08:00
Vincent Penquerc'h
e443ae6000 oggdemux: Don't use gst_pad_alloc_buffer()
allocate buffers using gst_buffer_new_and_alloc() instead of
gst_pad_alloc_buffer_and_set_caps(), as the first one will
cause the pad to block, and we don't want that since that will
prevent subsequent pads from being fed if a block occurs at
start, when all pads must be fed for playback to start.

This fixes autoplugging of the tiger element and other things.

https://bugzilla.gnome.org/show_bug.cgi?id=637822
2010-12-22 20:19:15 +01: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
Wim Taymans
f22687bacc use _object_ref_sink() when we can 2010-12-07 11:31:30 +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
a4aacb9d2c oggdemux: plug some oggstream leaks 2010-12-03 13:54:01 +01:00
Mark Nauwelaerts
515f33bd3b oggstream: streamline tag extraction and prevent some leaks 2010-12-03 13:53:59 +01:00
Mark Nauwelaerts
63ba9eafb1 oggdemux: send stream tags after newsegment and global tags 2010-12-03 13:53:56 +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
e0d683f3ed oggdemux: fix wrong flowreturn handling
Oggdemux will currently try to pad alloc a buffer from the peer when it is
reading the header files. This is a relic from the time where we had an internal
parser and needs to be removed at some point in time.

The problem is that when there is no peer pad yet (which is normal when
collecting headers) we should still continue to parse all the packets of a
page instead of erroring out on NOT_LINKED.

Fixes #632167
2010-10-29 11:48:18 +01:00
Wim Taymans
6c14f6c970 ogg: add some more debug statements 2010-10-29 11:47:53 +01:00
Wim Taymans
fea50233bb oggdemux: only keep last valid granulepos
Only keep the last valid granulepos we see when scanning the last
pages. It is possible that the last page that we inspect has a -1 granulepos, in
which case we want to keep the previous valid time instead.

Fixes #631703
2010-10-12 16:06:57 +02:00
David Schleef
9dc59cff15 oggdemux: Fix check for last page 2010-10-12 16:06:57 +02:00
David Schleef
64dfad46f2 oggdemux: change checks from is_skeleton to is_sparse 2010-10-12 16:06:57 +02:00
David Schleef
5ae2f04856 oggdemux: move is_sparse into stream map 2010-10-12 16:06:56 +02:00
Guillaume Emont
b41cd04289 oggdemux: fix seeking with negative rate with skeleton
Files with a skeleton, or other files with a stream that ends before the end of
the chain would start playing from the end of the chain when trying to seek with
a negative rate at a position between the end of any stream and the end of the
chain.

This is due to the loop in _do_seek() assuming that pages will be encountered
for all streams shortly after the place where we want to seek, as found by
do_binary_search().

In the first iteration of the loop, stream ends are now checked against the
time of the current page.
2010-10-10 18:26:13 +02:00
Sebastian Dröge
6357bdef63 oggdemux: Don't reset the pad when pushing resulted in NOT_LINKED
The pad might be linked later and after resetting it it will
only work after resetting all of oggdemux.
2010-08-30 15:50:26 +02:00
Sebastian Dröge
b899bca94d oggdemux: Don't use GST_FLOW_IS_FATAL()
And while we're at it, handle WRONG_STATE as error too
in oggdemux and WRONG_STATE and NOT_LINKED in oggaviparse.
2010-08-27 17:23:46 +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
Fredrik Söderquist
3c06cabb0b oggdemux: Handle errors from _get_next_page in _do_seek.
If the source element failed here, oggdemux would crash.

Fixes #623218.
2010-06-30 17:20:55 +01:00
Sebastian Dröge
9a971980b7 oggdemux: activate_chain must not be called with a NULL chain
It will crash later and shouldn't really happen anyway unless
something is really wrong.
2010-06-14 11:11:56 +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
4caee01a06 oggdemux: Handle SEEKING query in push mode too 2010-06-09 17:02:59 +02:00
Sebastian Dröge
bb7773b40a oggdemux: Update the total time from the Skeleton 4 indexes
Fixes bug #620939, see bug #607945.
2010-06-09 16:38:34 +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
981af36b71 oggmux: Start a new page for every CMML buffer 2010-06-08 07:34:53 +02:00
Sebastian Dröge
8a678da1fe oggdemux: Fix sizes again, this time for real 2010-05-20 14:21:19 +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
02a78f528c oggdemux: don't seek when no current chain
Avoid a crash when we try to seek when there is no current chain.
2010-05-06 13:10:54 +02:00
Wim Taymans
e33425e4d0 oggdemux: ignore the skeleton start time
Ignore the skeleton start time as it is usually wrong for live streams
and we have the needed logic to calculate it anyway.
2010-05-06 12:21:38 +02:00
Wim Taymans
27de725038 oggdemux: wait for headers before exposing chains
Wait until we have all the stream headers before we start exposing the streams
of a chain.
2010-05-06 12:06:09 +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
Tim-Philipp Müller
f22b115804 oggdemux: printf format fixes 2010-05-05 13:25:02 +01: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
e84b3c838c oggdemux: fix EOS check 2010-05-04 15:47:29 +02:00
Wim Taymans
50e556cc84 oggstream: avoild division by 0 2010-05-04 13:51:07 +02:00
Wim Taymans
12929944a7 oggdemux: cleanup unused defines 2010-05-04 13:50:46 +02:00
Wim Taymans
a57b461af8 oggdemux: use the index in push mode when we can
When seeking in push mode, try to use the index first before we use the bitrate
estimation.
2010-05-04 13:36:58 +02:00
Wim Taymans
03c3aa6377 oggdemux: use skeleton duration when possible 2010-05-04 13:06:24 +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
f96caa17b3 oggdemux: implement seek in push mode
Refactor start time collection code.
When we receive a flush_stop, resync to the new start time and push out a new
segment event.
2010-05-04 11:26:14 +02:00
Wim Taymans
9be4e53001 oggdemux: make event handling better
Explicitly handle FLUSH events and resync on FLUSH_STOP.
Make send_event return a boolean.
Use more performant send_event function to forward events.
2010-05-04 11:26:14 +02:00
Wim Taymans
c4ec1c4c62 oggdemux: implement seeking in pushmode
Convert seek requests to bytes using the bitrate and forward them upstream. Does
not quite work because the flushing and resyncing is not implemented yet.
2010-05-04 11:26:14 +02:00
Wim Taymans
d9b7003926 oggdemux: refactor for seeking in pushmode
refactor the code a little to prepare for seeking in push mode
2010-05-04 11:26:14 +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
Mark Nauwelaerts
e23d6bbda7 oggdemux: only EOS when all streams are EOS 2010-04-30 12:51:54 +02:00
Mark Nauwelaerts
e8ae2adef1 oggdemux: fix debug message 2010-04-30 12:51:51 +02:00
Stefan Kost
efe59faa93 docs: fix typo in link name 2010-04-16 15:53:27 +03:00
Tim-Philipp Müller
62b1764552 playback, ogg: dist new gstplayback.h and gstogg.h 2010-04-09 09:26:08 +01: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
Tim-Philipp Müller
58a92964c6 build: Makefile.am fixes
Mostly just add missing $(GST_BASE_CFLAGS), but also fix up order
of flags (see docs/random/moving-plugins).
2010-03-19 01:00:36 +00:00
Benjamin Otte
420d7b111d More ENABLE_NLS fixes 2010-03-16 18:31:15 +01:00
Benjamin Otte
5e21fa5e0e gst_element_class_set_details => gst_element_class_set_details_simple
Also change my email from the old university one to the current one.
2010-03-16 17:41:50 +01:00
David Schleef
460c649b5f oggdemux: Don't drop zero-sized packets
Zero-sized packets have relevence to Theora.
2010-03-14 13:15:13 -07:00
Benjamin Otte
3a7d632a59 Add -Wredundant-decls to warning flags
... and fix all the warnings that flag throws.
2010-03-11 15:38:18 +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
David Schleef
1701c706ec oggmux: Don't flush after every frame for theora 2010-03-09 15:40:18 -08:00
David Schleef
38e6f0c7ed oggdemux: fix dirac header parsing
Fixes #611900.
2010-03-08 17:07:57 +00: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
Wim Taymans
63593f5f1e oggdemux: use the chain begin_time instead of our counter
We update the passed begintime argument to narrow our search region in the
binary search. This means that it does not always contain the chain begin time
after a couple of bisects. Use the real chain->begin_time to bring the
granuletime to the time in the chain instead.

Fixes #610005
2010-02-23 12:26:15 +01:00
Sebastian Dröge
59dc89b3ee oggparse: Fix another format string compiler warning 2010-02-15 09:04:17 +01:00
Sebastian Dröge
e9f101ffc5 oggdemux: Fix format string compiler warnings 2010-02-15 08:56:25 +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
Sebastian Dröge
4914aeda2f oggdemux: Don't leak allocated buffers
This can happen if the combined flow return is not OK although the
allocation succeeded or if the packet in question is a BOS and we're
not going to push headers.

Fixes bug #608699.
2010-02-02 10:33:07 +01:00
Vincent Penquerc'h
ed2e09133e oggdemux: sparse streams aren't timed by end time, and their duration isn't implicit
Fixes timestamps and durations on Kate subtitle streams.

See http://www.xiph.org/ogg/doc/ogg-multiplex.html section 'start-time and
end-time positioning' for some more details, and bug #600929.
2010-01-25 23:50:09 +00: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
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
95511c8821 oggdemux: don't push headers twice
Don't push the stream headers twice but only in the activation of a chain.

Fixes #607929
2010-01-25 14:00:52 +01:00
Wim Taymans
62f8c3c672 oggdemux: rename a variable
Rename the 'seekable' variable to 'pullmode'. We might be able to seek in push
mode too eventually.
2010-01-25 12:31:24 +01:00
Tim-Philipp Müller
e1c319949d oggdemux: fix crash when freeing headers
Use _ogg_packet_free() instead of gst_mini_object_unref in one more
place now that the header list contains ogg packets and not buffers.

file: Stephen_Fry-Happy_Birthday_GNU-nq_600px_425kbit.ogv
2010-01-24 13:32:20 +00:00
Sebastian Dröge
1652005f26 oggdemux: Strip trailing \0 for subtitle OGM streams
Fixes bug #607870.
2010-01-24 08:57:13 +01:00
Sebastian Dröge
a66ce94adc oggdemux: Correctly set DELTA_UNIT flag for OGM streams 2010-01-23 22:10:09 +01:00
Sebastian Dröge
b38dcf5277 oggdemux: Don't strip all 0-bytes from the end of OGM packets
This fixes broken packets pushed downstream by oggdemux for
MPEG4 streams for example.
2010-01-23 22:10:09 +01:00
Sebastian Dröge
592bc87dc9 oggdemux: Extract tags from OGM text streams and don't push them downstream 2010-01-23 22:10:08 +01:00
Sebastian Dröge
541da50c53 oggdemux: Store header/queued packets as ogg_packet and use normal peer chaining functions to pass them downstream 2010-01-23 22:10:08 +01:00
Sebastian Dröge
d78cffb2e8 oggdemux: ...and set caps on queued packet buffers too 2010-01-23 13:20:46 +01:00
Sebastian Dröge
b63a582bf9 oggdemux: Set caps on header buffers 2010-01-23 13:19:44 +01:00
Wim Taymans
4b9666aedb oggdemux: keep track of added pads
Keep track of the pads we added and removed.
Remove some unused fields.
Don't add pads for which we don't have caps.
2010-01-21 17:39:52 +01: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
Thiago Santos
4b771bff7a oggdemux: No need to subtract begin time
Last stop is already based on the chain start and there is no need
to subtract the chain start as it may lead to a negative overflow.
This was causing seeking issues when the target chain was not
the first one (that has chain start = 0)

Fixes #606382
2010-01-19 08:39:14 -03:00
Thiago Santos
125f7dfdb0 oggdemux: granulepos is relative to its chain
When performing seeks, the granulepos should be offset by
its chain start time to avoid using wrong values to
update segment's last_stop. A sample file is indicated on
bug #606382
2010-01-18 15:39:55 -03:00
Edward Hervey
7d2c90423a oggdemux: Fix unitialized variable.
If the package isn't handled, gracefully return GST_FLOW_OK.
2010-01-12 16:35:50 +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
Mark Nauwelaerts
3f4820d6c2 oggdemux: decide flac header packet by content rather than count 2010-01-06 14:03:44 +01:00
Mark Nauwelaerts
66545eb7a2 oggdemux: reset header packet count at bos page 2010-01-06 14:03:41 +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
Wim Taymans
d18118418e oggdemux: remove redundant fields 2009-12-10 16:09:09 +01:00
Wim Taymans
1ad0e4342e oggdemux: improve keyframe seeking
Improve keyframe seeking.
Fix reverse playback.
2009-12-07 18:49:43 +01:00
Wim Taymans
c53cd385e3 oggdemux: implement keyframe seeking
Implement keyframe seeking in oggdemux by doing the double seek trick. First
seek to the required position, then read pages for all streams to grab the
granulepos (to know the timing of the keyframe) of each stream, then seek back
to the first keyframe.
2009-12-07 15:42:05 +01:00
Wim Taymans
56d3856620 oggdemux: fix timestamps after seek
After a seek, discard all packets before the packet with the granulepos on it so
that the output buffers contain valid timestamps.

Reorder some code so that we check the timestamps before allocating and pushing
an output buffer.

Do more checks on valid packets in ogm mode.
2009-12-04 16:35:09 +01:00
Wim Taymans
eb4fc976e5 oggdemux: add comment 2009-12-04 15:39:59 +01:00
Wim Taymans
9e222a385c oggdemux: don't do math with invalid granulepos
When the current granulepos is unknown and set to -1, don't try to add durations
to it.
2009-12-04 14:01:11 +01:00
Wim Taymans
96e1c4dbe6 oggdemux: guard against wrong granulepos
Clamp the initial granulepos to 0 instead of going negative for some badly muxed
ogg files.
2009-12-04 13:14:57 +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
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