Commit graph

158 commits

Author SHA1 Message Date
Vincent Penquerc'h
a09bad4d98 mpeg2dec: fix spurious failure to decode some files
Parsing can return with an 'invalid' state, but this is not
actually fatal. For one, the mpeg2dec command line tool that
comes with the libmpeg2 library blithely ignores this condition
and merrily goes on. So we do this same, logging the error,
and going on with parsing. This makes something work that did
not use to work, and brings happiness to the world.

https://bugzilla.gnome.org/show_bug.cgi?id=429476
2011-08-23 10:04:48 +02:00
Tim-Philipp Müller
7bccbfdd48 mpeg2dec: don't deadlock when setting an index 2011-04-19 17:11:14 +01:00
Mark Nauwelaerts
9ccdcda5e6 mpeg2dec: do not fail fatally when unlinked
... as _NOT_LINKED was neither tested as fatal before nor complained about.
2011-02-21 13:16:05 +01:00
Stefan Kost
b3c04da6c3 index: remove conditional index support
Index support cannot be disabled since commit
4bfb1fe70c
in core, which removed the configure flags to disable index.
2011-02-21 11:05:31 +02:00
Stefan Kost
2b9048ede9 formatting: trim trailing whitespace 2011-02-17 18:06:51 +02:00
Stefan Kost
9424c553b9 index: use delta frame flags instead of 0 or none 2011-02-17 18:05:58 +02:00
Edward Hervey
72389b1941 mpeg2dec: Use the proper component value for height 2011-01-14 17:37:09 +01:00
Tim-Philipp Müller
9a2de96836 mpeg2dec: use gst_pad_alloc_buffer() when cropping buffers 2010-12-29 22:17:50 +00:00
Tim-Philipp Müller
a3eaf04778 mpeg2dec: minor formatting clean-up 2010-12-29 22:10:58 +00:00
Tim-Philipp Müller
40a470c785 mpeg2dec: refactor cropping code to use libgstvideo functions
https://bugzilla.gnome.org/show_bug.cgi?id=571146
2010-12-29 22:09:47 +00:00
Tim-Philipp Müller
fd68911826 mpeg2dec: use GstVideoFormat instead of custom enum 2010-12-29 20:19:34 +00:00
Guillaume Emont
ff60a26cf8 mpeg2dec: convert the position to stream time before answering to a position query 2010-10-25 13:55:39 +01:00
Sebastian Dröge
0fa75d404b mpeg2dec: Use gst_pad_peer_query() instead of getting the peer pad manually 2010-10-19 16:31:23 +02:00
Guillaume Emont
7fb7129a83 mpeg2dec: fix position query by trusting upstream
Position queries are badly handled for DVDs (probably due to the division in
chapters): the time returned was the time since the start of chapter.

Now ask upstream for position queries, fall back to the old code if upstream
cannot answer the query.
2010-10-19 16:31:23 +02:00
Sebastian Dröge
31010493ea mpeg2dec: Don't use GST_FLOW_IS_FATAL()
And don't post error messages if allocating a buffer resulted
in WRONG_STATE or UNEXPECTED.
2010-09-04 14:57:51 +02:00
Edward Hervey
2c94b415d4 mpeg2dec: copy over all buffer flags when copying buffers.
Avoids losing the tff/rff video buffer flags
2010-04-14 09:30:55 +02:00
Benjamin Otte
9850bd814f gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 15:53:14 +01:00
Josep Torra
d94bcc1b71 mpeg2dec: fix warning in macosx snow leopard 2009-10-11 16:18:37 +02:00
Sebastian Dröge
54e8a94782 mpeg2dec: Fix GstIndex handling, incl. refcounting and NULL indizes 2009-09-01 12:22:39 +02:00
Edward Hervey
83bf3a9f37 mpeg2dec: Revert ranking switch with ffdec_mpeg2video. Fixes #574461 2009-05-13 19:32:16 +02:00
Wim Taymans
fc1db23b84 mpeg2dec: work around old mpeg2dec versions
The repeat first field flag was introduced in 0.5.0 so conditionally disable its
detection and just assume no rff is used. This fixes the compilation.

Fixes #582375
2009-05-12 20:34:20 +02:00
Edward Hervey
8905e8c81e mpeg2dec: Implement interlaced support.
Expand the debugging statements to show more picture information.
2009-05-12 11:44:52 +02:00
Sebastian Dröge
40c87181c5 mpeg2dec: Lower rank to MARGINAL to make ffdec_mpeg2video the default
ffdec_mpeg2video is much faster, fixes bug #574461.
2009-05-12 11:19:00 +02:00
Edward Hervey
58b34b3553 mpeg2dec: use 64bit safe scaling functions.
Got this to fail when seeking in a 14GB file (the value in bytes is
bigger than 2**32).
2009-05-09 15:30:07 +02:00
Edward Hervey
3a523c2c79 mpeg2dec: Remove dead assignment. Value overwritten later on. 2009-04-19 14:03:19 +02:00
Edward Hervey
ac0e11e55c remove empty method implementations. 2009-04-19 13:55:24 +02:00
Sebastian Dröge
81599fc784 ext/mpeg2dec/gstmpeg2dec.c: Last change introduced a regression that made mpeg2dec handle some 4:2:2 videos as 4:4:4....
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_negotiate_format):
Last change introduced a regression that made mpeg2dec handle
some 4:2:2 videos as 4:4:4. Fixes bug #562086.
2008-12-01 14:39:34 +00:00
David Schleef
253cb1c7c7 ext/mpeg2dec/gstmpeg2dec.*: Add support for 4:4:4 video. Fixes #562086
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c:
* ext/mpeg2dec/gstmpeg2dec.h:
Add support for 4:4:4 video.  Fixes #562086
2008-11-25 03:44:06 +00:00
Simon Holm Thøgersen
821d16d9c7 ext/mpeg2dec/gstmpeg2dec.c: Add support for the STATE_SEQUENCE_MODIFIED state in mpeg2dec >= 0.5.0. Fixes bug #562065.
Original commit message from CVS:
Patch by: Simon Holm Thøgersen <odie at cs dot aau dot dk>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_chain):
Add support for the STATE_SEQUENCE_MODIFIED state in mpeg2dec
>= 0.5.0. Fixes bug #562065.
2008-11-24 09:51:39 +00:00
Robin Stocker
ac40f11552 ext/mpeg2dec/gstmpeg2dec.*: Prefer the container's PAR over the stream's PAR if it's given in the srcpad caps. Fixes ...
Original commit message from CVS:
Patch by: Robin Stocker <robin at nibor dot org>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_init),
(handle_sequence), (gst_mpeg2dec_setcaps):
* ext/mpeg2dec/gstmpeg2dec.h:
Prefer the container's PAR over the stream's PAR if it's
given in the srcpad caps. Fixes bug #556184.
2008-10-14 12:51:41 +00:00
Sameer Naik
c9da8b4d0c ext/mpeg2dec/gstmpeg2dec.*: Fix compilation with --disable-index. Fixes bug #554150.
Original commit message from CVS:
Patch by: Sameer Naik <sameer dot subscriptions at damagehead dot com>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_class_init),
(handle_slice), (gst_mpeg2dec_sink_event),
(gst_mpeg2dec_src_event):
* ext/mpeg2dec/gstmpeg2dec.h:
Fix compilation with --disable-index. Fixes bug #554150.
2008-09-28 17:33:43 +00:00
Sebastian Dröge
171116f99a ext/mpeg2dec/gstmpeg2dec.c: Don't allow width/height outside the spec (i.e. smaller than 16 and higher than 4096). Su...
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence):
Don't allow width/height outside the spec (i.e. smaller than 16
and higher than 4096). Such files are corrupted ones and setting
caps that are not a subset of the template caps confuses playbin.
Fixes bug #542646.
2008-07-13 10:13:06 +00:00
Zaheer Abbas Merali
d6ad646108 ext/mpeg2dec/gstmpeg2dec.c: Reset decoder when handling sequence where libmpeg2 has set frame period to 0, probably d...
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c:
Reset decoder when handling sequence where libmpeg2 has set
frame period to 0, probably due to a corrupt packet.
Fixes bug #514297
2008-02-04 14:27:32 +00:00
Wim Taymans
179887388e ext/mpeg2dec/gstmpeg2dec.c: Fix compilation error. Fixes #509313.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (clear_queued), (flush_queued),
(handle_picture), (handle_slice):
Fix compilation error. Fixes #509313.
2008-01-14 11:41:32 +00:00
Wim Taymans
30d994fafa ext/mpeg2dec/gstmpeg2dec.*: Add buffer clipping.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (clear_queued), (flush_queued),
(handle_picture), (clip_buffer), (handle_slice),
(gst_mpeg2dec_chain), (gst_mpeg2dec_sink_event),
(gst_mpeg2dec_change_state):
* ext/mpeg2dec/gstmpeg2dec.h:
Add buffer clipping.
Add basic reverse playback support. Not complete yet when dealing with
non-closed GOPs.
2008-01-10 15:24:08 +00:00
Tim-Philipp Müller
0e2c8a042f Fix build against core CVS by not using deprecated API. Bump requirements for new API (overdue anyway).
Original commit message from CVS:
* configure.ac:
* ext/mpeg2dec/gstmpeg2dec.c: (crop_buffer):
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_descramble_buffer):
* gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_chain_raw):
Fix build against core CVS by not using deprecated API. Bump
requirements for new API (overdue anyway).
2007-07-11 23:18:14 +00:00
Zaheer Abbas Merali
4fd7bf7a94 ext/mpeg2dec/gstmpeg2dec.c: Never post a (fatal) error message on the bus on decoding errors. We should only do this ...
Original commit message from CVS:
Patch by: Zaheer Abbas Merali  <zaheermerali at gmail com>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_chain):
Never post a (fatal) error message on the bus on decoding errors. We
should only do this if we can't recover, but mpeg2dec can always
recover. This is needed for DVB streams, for example, where there
may be temporary glitches in the stream. Instead of an error
message, post a warning message on the bus for every N decoding
errors. Fixes #370020.
2007-03-02 13:01:48 +00:00
Tim-Philipp Müller
4eb4a1cdcc ext/mpeg2dec/gstmpeg2dec.c: Cosmetic changes: fix misleading debug statement, update comment, add cast.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_alloc_sized_buf):
Cosmetic changes: fix misleading debug statement, update
comment, add cast.
2006-11-21 12:33:25 +00:00
Sebastian Dröge
1a8dbee3e7 ext/mpeg2dec/gstmpeg2dec.*: Align buffers to a 16 byte boundary so the altivec optimisations don't crash. Fixes #327350.
Original commit message from CVS:
Patch by: Sebastian Dröge  <slomo@circular-chaos.org>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_init),
(gst_mpeg2dec_reset), (gst_mpeg2dec_alloc_sized_buf),
(gst_mpeg2dec_alloc_buffer), (init_dummybuf), (handle_slice):
* ext/mpeg2dec/gstmpeg2dec.h:
Align buffers to a 16 byte boundary so the altivec optimisations
don't crash. Fixes #327350.
2006-11-21 12:15:58 +00:00
Jan Arne Petersen
d88990ffc9 ext/mpeg2dec/gstmpeg2dec.c: Simplify the framerate code and support more framerates. Fixes #361584.
Original commit message from CVS:
Patch by: Jan Arne Petersen <jpetersen at jpetersen dot org>
* ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence), (handle_slice):
Simplify the framerate code and support more framerates. Fixes #361584.
2006-11-15 13:57:21 +00:00
Sebastian Dröge
dc26edbddf ext/mpeg2dec/gstmpeg2dec.c: Fix minor memleak when creating pads from static pad templates (#369627).
Original commit message from CVS:
Patch by: Sebastian Dröge  <slomo@circular-chaos.org>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_init):
Fix minor memleak when creating pads from static pad templates (#369627).
* tests/check/Makefile.am:
* tests/check/elements/.cvsignore:
* tests/check/elements/mpeg2dec.c: (setup_mpeg2dec),
(cleanup_mpeg2dec), (GST_START_TEST), (mpeg2dec_suite), (main):
Add unit tests for mpeg2dec (#369627).
2006-11-15 11:41:39 +00:00
Sebastian Droege
520f74867f ext/mpeg2dec/gstmpeg2dec.*: libmpeg2 requires its output buffers to start at a 16byte aligned address or the altivec ...
Original commit message from CVS:
Patch by: Sebastian Droege <slomo at ubuntu dot com>
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_finalize),
(gst_mpeg2dec_alloc_buffer), (init_dummybuf), (handle_slice):
* ext/mpeg2dec/gstmpeg2dec.h:
libmpeg2 requires its output buffers to start at a 16byte aligned
address or the altivec optimizations will explode.
2006-11-03 09:52:12 +00:00
Wim Taymans
af08dc2cae ext/mpeg2dec/gstmpeg2dec.*: Add some debugging to timestamp handling.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (handle_slice):
* ext/mpeg2dec/gstmpeg2dec.h:
Add some debugging to timestamp handling.
Make sure we don't convert invalid timestamps.
2006-10-10 16:58:32 +00:00
Yves Lefebvre
e0a6d03502 ext/mpeg2dec/gstmpeg2dec.c: Fix initialisation dummy buffer, the offsets are relative to the start of the buffers. Fi...
Original commit message from CVS:
Patch by: Yves Lefebvre <ivanohe at abacom dot com>
* ext/mpeg2dec/gstmpeg2dec.c: (init_dummybuf):
Fix initialisation dummy buffer, the offsets are relative to the start
of the buffers. Fixes #356004.
2006-09-15 16:14:15 +00:00
Wim Taymans
73e2b0c311 ext/mpeg2dec/gstmpeg2dec.c: Fix refcounting when cropping. Fixes #341677.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (crop_buffer), (handle_slice):
Fix refcounting when cropping. Fixes #341677.
2006-07-10 11:52:58 +00:00
Tim-Philipp Müller
86b9de35d3 ext/mpeg2dec/gstmpeg2dec.c: Assume 4:3 DAR rather than 4:3 PAR (#345184).
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_negotiate_format):
Assume 4:3 DAR rather than 4:3 PAR (#345184).
2006-06-19 15:16:43 +00:00
Tim-Philipp Müller
17514d1696 ext/mpeg2dec/gstmpeg2dec.c: Assume pixel-aspect-ratio of 4:3 if libmpeg2dec doesn't give us any PAR whatsoever (rathe...
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_negotiate_format):
Assume pixel-aspect-ratio of 4:3 if libmpeg2dec doesn't give us
any PAR whatsoever (rather than using 0/0, which will lead to
an abort later on). Fixes #345184.
2006-06-19 11:59:14 +00:00
Wim Taymans
a489cb42e7 ext/mpeg2dec/gstmpeg2dec.*: Simplify and don't leak our buffer pool.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_finalize),
(gst_mpeg2dec_reset), (clear_buffers), (handle_picture),
(gst_mpeg2dec_sink_convert), (gst_mpeg2dec_src_convert),
(gst_mpeg2dec_change_state):
* ext/mpeg2dec/gstmpeg2dec.h:
Simplify and don't leak our buffer pool.
Use _scale_int.
Remove unfixed bug number from previous ChangeLog entry.
2006-06-07 17:05:48 +00:00
Wim Taymans
78d4166a4f ext/mpeg2dec/gstmpeg2dec.*: Fix padtemplate as we can now do fractional framerates.
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_base_init),
(gst_mpeg2dec_class_init), (gst_mpeg2dec_init),
(gst_mpeg2dec_finalize), (gst_mpeg2dec_reset),
(gst_mpeg2dec_qos_reset), (gst_mpeg2dec_alloc_buffer),
(gst_mpeg2dec_negotiate_format), (init_dummybuf),
(handle_sequence), (handle_picture), (handle_slice),
(gst_mpeg2dec_chain), (gst_mpeg2dec_sink_event),
(gst_mpeg2dec_src_event), (gst_mpeg2dec_change_state):
* ext/mpeg2dec/gstmpeg2dec.h:
Fix padtemplate as we can now do fractional framerates.
Small cleanups.
Use GstSegment.
Add simple frame dropping QoS.
Precalc buffer output sizes and UV offsets.
Always give libmpeg2 a valid fbuf when it wants one.
don't trust libmpeg to discard our buffers but manage it
ourselves.
Fixes #343627, #327350, #335288
2006-06-07 16:15:42 +00:00
Edward Hervey
14af59f636 ext/mpeg2dec/gstmpeg2dec.c: Remember the query duration format before passing it upstream since it could have been mo...
Original commit message from CVS:
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_sink_convert),
(gst_mpeg2dec_src_query):
Remember the query duration format before passing it upstream since it
could have been modified.
Add GST_WARNING_OBJECT in sink convert function to detail why the
conversion didn't work.
2006-05-02 10:28:48 +00:00