Commit graph

222 commits

Author SHA1 Message Date
Wim Taymans
c944e225c8 structure: fix for api update 2011-11-02 09:09:26 +01:00
Tim-Philipp Müller
d919b7b0f4 Merge remote-tracking branch 'origin/master' into 0.11 2011-10-31 14:34:57 +00:00
Tim-Philipp Müller
1905e95cea ext, gst: update for taglist API changes 2011-10-30 11:51:58 +00:00
Edward Hervey
daecb74456 asfdemux: Don't leak pending payload buffers
Fixes #662964
2011-10-29 11:57:40 +02:00
Edward Hervey
82a8cc6807 asfdemux: Don't unmap a buffer that doesn't exist 2011-10-11 18:03:01 +02:00
Wim Taymans
d4f1303f57 asf: don't use fourcc 2011-08-25 13:04:01 +02:00
Edward Hervey
0a593a1e98 asfdemux: Fix for changes in GstQuery API 2011-08-02 12:40:22 +02:00
Thiago Santos
2dc2be5e7b asfdemux: Porting to 0.11 2011-06-20 00:36:59 -03:00
Wim Taymans
98729bc82c Merge branch 'master' into 0.11
Conflicts:
	android/amrnb.mk
	android/amrwbdec.mk
	android/asf.mk
	android/mpegaudioparse.mk
	configure.ac
2011-04-19 19:23:56 +02:00
Tim-Philipp Müller
81173fcbad asfdemux: fix unused-but-set-variable warnings with gcc 4.6 2011-04-14 15:03:33 +01:00
Wim Taymans
62efb84c19 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-02-26 15:02:58 +01:00
Edward Hervey
6eb48af87c asfdemux: Handle new type of DRM'd asf files.
These are produced by the new MS PlayReady system.

https://bugzilla.gnome.org/show_bug.cgi?id=639226
2011-01-11 17:51:31 +01:00
Sebastian Dröge
704b371944 asfdemux: Don't use GST_FLOW_IS_FATAL()
And don't post error messages for UNEXPECTED and post an error
message if pulling data failed because of NOT_LINKED.
2010-09-04 14:57:51 +02:00
Edward Hervey
776a09149e asfdemux: Don't error out on non-critical flow returns
Only error out when downstream returns:
* NOT_SUPPORTED
* ERROR
* NOT_NEGOTIATED
* NOT_LINKED

If we got _UNEXPECTED, we push an EOS downstream (since maybe only one
of the streams had gone EOS) and then stop the task silently.

In the case of WRONG_STATE we just need to stop silently

https://bugzilla.gnome.org/show_bug.cgi?id=600412
2010-08-27 17:59:12 +02:00
Thiago Santos
81dfce4095 asfdemux: Fix seeking after last commits
Don't handle wrong-state returns as errors to allow seeking to work
again.
2010-06-28 09:34:30 -03:00
Thiago Santos
36e12c92c1 asfdemux: Push all pending data on EOS
When on push mode and receiving an EOS event, asfdemux
should push all pending data because we might be dealing
with a broken file that has a preroll value higher
than its actual length.
2010-06-24 19:46:39 -03:00
Thiago Santos
ec3b13a250 asfdemux: Fix sending eos event for chained asfs
Properly push EOS event when finishing a chained asf file
in pull mode

Fixes #599718
2010-06-24 19:29:17 -03:00
Edward Hervey
5ac4ea3f1b asfdemux: Allow at least 500ms of preroll.
Some files have insanely low preroll values which break the
all_streams_prerolled() logic.

Fixes #622407
2010-06-23 11:06:54 +02:00
Benjamin Otte
9850bd814f gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 15:53:14 +01:00
Edward Hervey
48a1935cb0 asfdemux: Don't set durations of 0 on outgoing buffers.
Some (broken) streams don't have the extended stream properties in
the header, resulting in applying a duration of zero on outgoing
buffers.

Fixes #611473
2010-03-01 16:52:08 +01:00
Robert Swain
ad45fd1827 asfdemux: Improve seek behaviour for audio-only with no index
Instead of seeking to seek_time - 5s in the hope of hitting a keyframe
for video, we can just seek to seek_time instead.
2010-02-16 13:02:47 +01:00
Stefan Kost
da70785dcd assert: g_assert_not_reached() cannot replace return statement
Fix build with assert being turned off.
2010-01-22 16:55:14 +02:00
Edward Hervey
8829c5141a asfdemux: Don't forget to update flow variable
Forgot to update the return value in the loop.
2010-01-18 18:01:55 +01:00
Edward Hervey
bb20a20d86 asfdemux: Check flow return on every push
We previously only aggregated flow returns after the while(push) loop,
which meant that in some cases we would end-up not properly aggregating
the flow returns.

This is based on the same flow aggregation algorithm as oggdemux.
2010-01-18 17:51:57 +01:00
Michael Smith
84d80fffcd asfdemux: Use GST_STR_NULL in a couple of places.
Fixes crashing on some of the log statements on win32.
2010-01-07 14:37:31 -08:00
Thiago Santos
db73c4337d asfdemux: Post bitrate tag
If stream bitrate object is available, post the bitrate
tags.

Fixes #599297
2010-01-07 13:54:21 -03:00
Benjamin Gaignard
26290a698c asfdemux: Don't call strlen() on NULL pointers
Fixes bug #602280.
2009-11-18 09:58:39 +01:00
Thiago Santos
b4007d3c76 asfdemux: Remove old pads when new ones are added
The old pads were being removed before adding the new ones,
we should add the new ones first.

Fixes #599718
2009-11-09 15:02:05 -03:00
Thiago Santos
a155733bff asfdemux: Handle chained asfs on pull mode
Adds chained asfs handling to pull mode. It now checks if
there is a new asf header after the last packet (when it
is possible to know how many packets are) or it tries
checking if a processed packet that fails is an header
object.

Fixes #599718
2009-11-09 14:24:13 -03:00
Thiago Santos
dc65baacf6 asfdemux: properly do chained asfs on push mode
To properly do chained asfs work with playbin2, we need to
push eos on the old pads before removing them.

Fixes #599718
2009-11-09 14:23:04 -03:00
Thiago Santos
37e805ef24 asfdemux: add support for chained asfs (push mode)
Adds support for detecting and playing chained asfs
in push mode. asfdemux tries to detect a new asf start
by identifying the header object guid in a input buffer.
When it finds it, it resets its state, removing its pads
and creates new ones for the new file.
2009-11-06 18:59:30 -03:00
Tim-Philipp Müller
9e3e475f36 asfdemux: fix two small leaks 2009-11-05 18:33:09 +00:00
Tim-Philipp Müller
b84bf977b1 asfdemux: prefer WM/TrackNumber over WM/Track, it's more reliable
WM/Track has a 0 base but is often wrongly written as starting from 1,
so not as reliable as WM/TrackNumber which always starts from 1.
2009-11-05 18:19:58 +00:00
Tim-Philipp Müller
1c88985618 asfdemux: WM/Track starts counting from 0, adjust to start from 1 2009-11-05 18:11:55 +00:00
Tim-Philipp Müller
aa52dd1320 asfdemux: map WM/TrackNumber to GST_TAG_TRACK_NUMBER as well
There's both WM/Track and WM/TrackNumber.
2009-11-05 18:11:35 +00:00
Jan Schmidt
acd6f70515 asfdemux: Fix bogus variable used uninitialised warnings 2009-11-04 15:46:04 +00:00
Josep Torra
c4fe899f1a asfdemux: fix warning in macosx snow leopard 2009-10-11 16:06:25 +02:00
Stefan Kost
d125baa8c5 build: fprintf, sprintf, sscanf need stdio.h 2009-10-07 14:22:09 +03:00
Edward Hervey
6f58ca470e asfdemux: Refactor multiple packet pull.
This also fixes a bug by which the first buffer (in a multi-packet mode)
passed to asf_demux_parse_packet() would have a GST_BUFFER_SIZE of the
full incoming buffer and not just of the single asf packet.

Fixes corrupted frames introduced by latest commit.
2009-06-29 11:13:02 +02:00
Wim Taymans
0fc6f338dc asfdemux: use the right accurate field
Remove accurate variable and its faulty use because the real variable is an
instance variable.
2009-06-29 10:58:49 +02:00
Edward Hervey
d71973cc4c asfdemux: Sprinkle branch prediction macros accross the code 2009-06-28 17:52:38 +02:00
Edward Hervey
d451dff520 asfdemux: Delay newsegment handling until we have a keyframe.
We now have a chance for packets to be collected before we send out the
newsegment. If we're not in accurate seeking (keyunit) it will set
the segment start/time to the keyframe's timestamp.
2009-06-28 17:52:38 +02:00
Edward Hervey
3b63c95450 asfdemux: Remove useless check. We already have checked for it above. 2009-06-28 17:52:38 +02:00
Edward Hervey
a3c832405e asfdemux: No longer queue GOPs now that seeking is fixed.
We now *always* seek to the keyframe just before our requested position.
When we encounter the first keyframe and we were not accurate (therefore doing
keyframe seeking), we update the segment start position to the keyframe timestamp.
2009-06-28 17:50:45 +02:00
Edward Hervey
e6c6eefefb asfdemux: Store the accurate seeking flag 2009-06-28 17:50:45 +02:00
Edward Hervey
725da8579b asfdemux: Use the average frame duration for buffers without a duration.
This will still cause some timestamp jitter, but giving a hint as to the duration
rather than nothing seems to be a better idea.
Also, this allows some scenarios (like remuxing with asfmux) to estimate the total
duration using the accumulated packet duration (which will be correct).
2009-06-28 17:33:51 +02:00
Edward Hervey
99d9b34385 asfdemux: Use index entry packet count to optimize seeking.
The simple index entries also contain the number of packets one needs
to retrieve at a given position to get a full keyframe. We therefore
use that information to retrieve all those packets in one buffer when
working in pull-mode.
2009-06-28 17:33:48 +02:00
Thiago Santos
6e2a117eb2 asfdemux: Do not try to free const pointer
In gst_asf_demux_chain_headers, when 'goto wrong_type' was called
asfdemux tried to free a const pointer that had been cast to a
normal pointer variable.
2009-06-26 21:07:59 -03:00
Edward Hervey
3c683ead7b asfdemux: Use presentation timestamp when searching in the index.
We need to take the preroll into account... else we end up too early.
2009-06-26 20:45:09 +02:00
Edward Hervey
c1bf0a091c asfdemux: Convert index entry from presentation time to timestamps.
We weren't taking the preroll into account previously, meaning that we
were always seeking preroll nanoseconds too early... resulting in a lot
of dropped packets (which are before the start time).

This brings quit a bit closer to as-fast-as-possible seeking in asf files.
2009-06-26 13:35:38 +02:00