Commit graph

272 commits

Author SHA1 Message Date
Wim Taymans
790b050fc5 qtdemux: fill timestamp table completely
When there are less timestamps that there are samples, fill up the sample table
with the last know timestamp. This situation can happen when the last sample
does not decode and doesn't need a timestamp. We however calculate the total
track length using the last sample timestamp so we need to have something
sensible in there.

Fixes #585056
2009-06-07 20:46:45 +02:00
Wim Taymans
a6424471f1 qtdemux: parse in24 boxes to get endianness
in24 samples are normally big-endian but an enda box can change this to
little-endian. Recurse into the in24 box and find the enda box so that we get
the endianness right.

Fixes #582515
2009-05-21 22:05:11 +02:00
Marco Ballesio
8e7273076d qtdemux: fix byte order swapping in 3GPP classification entity tag
Fixes #580746.
2009-05-06 00:16:37 +03:00
Wim Taymans
70d1b6e1ae qtdemux: use binary search for index
Use the new binary search method for finding the right index entry faster.
2009-05-04 12:35:19 +02:00
Wim Taymans
1619c09e3e qtdemux: add some more micro optimisations 2009-05-01 19:35:11 +02:00
Wim Taymans
ab0d1bc942 qtdemux: micro optimize qtdemux a little
Sprinkle some G_LIKELY around.

Avoid traversing and dumping the tree when debugging is not activated.
2009-04-30 18:41:44 +02:00
Wim Taymans
b5d84439fd qtdemux: add support for subtitle pictures
Add support for subtitle pictures.
Fixes #568278.
2009-04-30 14:22:27 +02:00
Hans de Goede
6cfa856381 qtdemux: handle ac-3 audio
fix demuxing of m4v streams with ac-3 audio
Fixes #580554
2009-04-29 12:19:27 +02:00
Michael Smith
922c9f529a qtdemux: override caps based on data from ESDS atoms in mpeg4.
If the codec is actually something else (e.g. mjpeg) change the caps to
match when parsing the ESDS atom.
Also, for AAC, override rate and channels with correct values read from
ESDS, since the rate/channels values elsewhere are often wrong.
2009-04-21 14:04:07 -07:00
Mark Nauwelaerts
cfcf76df11 Fix push mode buffering sanity check to actually fit the description. 2009-04-20 13:49:03 +02:00
Marco Ballesio
94d5d24cf0 qtdemux: implement 3GPP (TS 26.244 V8.0.0) Asset metadata handling, Fixes #132193
Implements 3gpp iso metadata tags which are different from mov udta atoms.
2009-04-15 20:14:19 +03:00
Stefan Kost
0889ac1092 qtdemux: don't use ininitialized var in debug log statement
Also make the log statement useful by printing the human readable format name.
2009-03-31 16:22:42 +03:00
Stefan Kost
f4f6d9799c qtdemux: don't leak atom data in case of a wrong fourcc 2009-03-31 12:01:21 +03:00
Mark Nauwelaerts
3360f449c0 qtdemux: some stream synchronization to aid seeking in unbalanced clips
Some clips (trailers) may have (length-wise) unbalanced streams,
which stalls the pipeline if seeking into that region.
Additional stream synchronization can handle this, as well as
sparse (subtitle) streams (at some later time ?)
2009-03-26 14:39:06 +01:00
Mark Nauwelaerts
a5502c9b37 qtdemux: additional safety and sanity checks (push based mode) 2009-03-26 14:38:02 +01:00
Mark Nauwelaerts
cfb39dbb1b qtdemux: handle FLUSH_STOP event
Clean up some state (most notably pad flow returns) to resume
proper streaming following flushing seek.
2009-03-24 15:48:26 +01:00
Mark Nauwelaerts
cc1a869a2c qtdemux: support seeking in push based mode 2009-03-20 17:59:38 +01:00
Mark Nauwelaerts
d5120cda4b qtdemux: align push based behaviour more with pull based
Cater for DELTA_UNIT flag on buffers, keep track of current
position, remove and warn about edit lists if any (as those
as are de facto discarded anyway), add some debug statements
and indent fixes.
2009-03-20 17:59:35 +01:00
Mark Nauwelaerts
21fc435c71 qtdemux: fix mem leaks and prevent excessive buffering in push based mode 2009-03-20 17:59:32 +01:00
Wim Taymans
af7aaef37a qtdemux: sanitize tag names
Sanitize the tag names before turning them into a structure name. We can only
add alphanumeric values as the structure name.
2009-03-09 15:20:05 +01:00
Edward Hervey
6512b3eb81 qtdemux: Also use "(c)inf" to fill the comment tag 2009-02-24 14:41:26 +01:00
David Schleef
40bd377230 qtdemux: Add handling for stps atoms
stps atoms contain "partial sync" information, which means that it's
a sync point where pts != dts.  This is needed to properly handle
MPEG2, H.264, Dirac, etc., in quicktime.
2009-02-06 16:21:58 -08:00
Jan Schmidt
fea851d100 Don't do void pointer arithmetic 2009-01-30 17:34:45 +00:00
Edward Hervey
b2f17781ac Add support for the 'Requirement' and 'Encoder' tags 2009-01-30 15:34:31 +01:00
Edward Hervey
1af5a5d001 Modify private-tag name formatter so that it doesn't go mad at fourcc starting with '(c)'. 2009-01-30 15:33:19 +01:00
Stefan Kost
a99d3f8769 Update and add documentation for plugins with no deps (gst).
Link to properties. Correct titles for examples. Document a few trivial cases. Keep lists in section file and docs/plugins/Makefile.am alphabetically ordered.
2009-01-28 12:32:59 +02:00
David Schleef
66de4c1bba Add a few more video fourcc's 2009-01-25 19:26:46 -08:00
David Schleef
bdc20b9baf Fix for security advisory TKADV2009-0xx
Fix potential buffer overflows while reading quicktime headers.
Security issue noticed by Tobias Klein.
2009-01-22 14:33:05 +00:00
Wim Taymans
293671170e gst/qtdemux/qtdemux.c: Catch invalid and commonly wrong playback rates in the elst atoms.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_segments):
Catch invalid and commonly wrong playback rates in the elst atoms.
Fixes #567800.
2009-01-15 14:53:18 +00:00
Thiago Sousa Santos
5f5ae768b8 gst/qtdemux/qtdemux.c: Fix format string for guint64.
Original commit message from CVS:
Patch by: Thiago Sousa Santos <thiagoss@embedded.ufcg.edu.br>
* gst/qtdemux/qtdemux.c:
Fix format string for guint64.
2009-01-13 19:09:19 +00:00
Michael Smith
1d32ad886e gst/qtdemux/qtdemux.c: In push mode, error out if we get EOS before we've created any srcpads.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c:
In push mode, error out if we get EOS before we've created any srcpads.
Handle (in pull mode) some files that have a truncated moov atom where
the final sub-atom is a 'free' atom and the contents of that are not
present in the file.
2009-01-08 18:17:13 +00:00
Mark Nauwelaerts
455e24c0a3 gst/qtdemux/: Streamline tag handling and pass unparsed tags as binary blob in private tag.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_tag_add_str),
(qtdemux_tag_add_tmpo), (qtdemux_tag_add_covr),
(qtdemux_tag_add_date), (qtdemux_tag_add_gnre),
(qtdemux_tag_add_blob), (qtdemux_parse_udta):
* gst/qtdemux/qtdemux.h:
* gst/qtdemux/quicktime.c: (plugin_init):
Streamline tag handling and pass unparsed tags as binary blob
in private tag.
2009-01-05 11:42:09 +00:00
j^
dc4240de34 gst/qtdemux/qtdemux.c: Add codec mapping for xvid, fmp4 and ac3 tracks.
Original commit message from CVS:
Patch by: j^ <j at oil21.org>
* gst/qtdemux/qtdemux.c: (qtdemux_video_caps),
(qtdemux_audio_caps):
Add codec mapping for xvid, fmp4 and ac3 tracks.
Fixes #565850
2008-12-28 09:50:31 +00:00
Julien Moutte
de3590f545 gst/qtdemux/qtdemux.c: Add MPG1 and MPG2 fourcc to supported qtdemux video codecs as I found some video clips using t...
Original commit message from CVS:
2008-11-25  Julien Moutte  <julien@fluendo.com>

* gst/qtdemux/qtdemux.c: (qtdemux_video_caps): Add MPG1 and MPG2
fourcc
to supported qtdemux video codecs as I found some video clips
using
those.
2008-11-25 17:47:24 +00:00
Tal Shalif
7b60afd805 gst/qtdemux/qtdemux.c: Use G_{BIG,LITTLE}_ENDIAN instead of the non-GLib variants as the latter don't exist on some s...
Original commit message from CVS:
Patch by: Tal Shalif <tshalif at nargila dot org>
* gst/qtdemux/qtdemux.c: (qtdemux_audio_caps):
Use G_{BIG,LITTLE}_ENDIAN instead of the non-GLib variants as
the latter don't exist on some systems (mingw). Fixes bug #561992.
2008-11-23 11:14:42 +00:00
Andy Wingo
c71fe3f75d gst/qtdemux/qtdemux.*: Queue up new segment events instead of sending them from the seeking thread.
Original commit message from CVS:
* gst/qtdemux/qtdemux.h (struct _GstQTDemux):
* gst/qtdemux/qtdemux.c (gst_qtdemux_do_seek): Queue up new
segment events instead of sending them from the seeking thread.
Fixes #559288.
(gst_qtdemux_push_pending_newsegment): New helper, sends out
queued newsegment events.
(gst_qtdemux_loop_state_movie): Voilà, call it here. Only need to
call it here, as we only seek when looping, and only push in the
movie state.
2008-11-12 11:55:14 +00:00
Mark Nauwelaerts
03ab3610c7 gst/qtdemux/: Add cover and alternative copyright tag, and enhance some existing ones by marking them as container at...
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_tag_add_tmpo),
(qtdemux_tag_add_covr), (qtdemux_parse_udta):
* gst/qtdemux/qtdemux_fourcc.h:
* gst/qtdemux/qtdemux_types.c:
Add cover and alternative copyright tag, and enhance some existing
ones by marking them as container atoms.
2008-11-11 19:52:05 +00:00
Mark Nauwelaerts
9aecda0d08 gst/qtdemux/qtdemux.c: Refactor some raw audio caps building, and handle >16-bit cases.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak),
(qtdemux_video_caps), (qtdemux_audio_caps):
Refactor some raw audio caps building, and handle >16-bit cases.
Fix/replace building caps from a string description.
2008-11-10 16:36:09 +00:00
Edward Hervey
8e8e2bf451 gst/qtdemux/qtdemux.c: Remove previous wrong commit
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: Remove previous wrong commit
* tests/check/elements/icydemux.c: (icydemux_found_pad):
Remove problematic and useless refcount check.
Fixes #556381
2008-10-15 09:39:27 +00:00
Edward Hervey
0af48261b4 gst/qtdemux/qtdemux.c: Remove problematic and useless refcount check.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_node):
Remove problematic and useless refcount check.
Fixes #556381
2008-10-15 09:27:27 +00:00
Edward Hervey
53a576bb6f gst/qtdemux/qtdemux.c: Some 'broken' files out there have atom lengths of zero... which basically results in qtdemux ...
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_state_header),
(gst_qtdemux_chain):
Some 'broken' files out there have atom lengths of zero...
which basically results in qtdemux consuming that atom again and again
until the *end of night* !
Detect that and emits an adequate element error message.
2008-09-17 14:50:42 +00:00
Jonathan Matthew
50eed1907b gst/qtdemux/qtdemux.c: Add mapping for 'tiff' => image/tiff
Original commit message from CVS:
Patch by: Jonathan Matthew <notverysmart@gmail.com>
* gst/qtdemux/qtdemux.c: (qtdemux_video_caps):
Add mapping for 'tiff' => image/tiff
Fixes #552213
2008-09-14 11:32:15 +00:00
Mark Nauwelaerts
bf5ffabf4c gst/qtdemux/: Add support for video/mj2 mime-type and its additional atoms/boxes.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state),
(gst_qtdemux_loop_state_header), (qtdemux_parse_node),
(qtdemux_parse_trak), (qtdemux_video_caps):
* gst/qtdemux/qtdemux.h:
* gst/qtdemux/qtdemux_fourcc.h:
* gst/qtdemux/qtdemux_types.c:
Add support for video/mj2 mime-type and its additional atoms/boxes.
Fixes #550646.
2008-09-03 12:39:35 +00:00
Wim Taymans
105e002337 gst/qtdemux/qtdemux.c: Add mapping for IMA Loki SDL MJPEG ADPCM codec.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_audio_caps):
Add mapping for IMA Loki SDL MJPEG ADPCM codec.
Add some alternative byteswapped mappings that seem to pop up sometimes.
Fixes #550288.
2008-09-02 15:27:49 +00:00
David Schleef
62491dcb74 gst/qtdemux/qtdemux.c: Add 'hdv6' as a HDV format for 1080i/60 with 3:2 pulldown, i.e., 24p.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: Add 'hdv6' as a HDV format for 1080i/60
with 3:2 pulldown, i.e., 24p.
2008-08-14 22:07:02 +00:00
Stefan Kost
dfd580b207 gst/qtdemux/qtdemux.c: Use audio/x-qdm for caps. Collect some info - mplayer has a decoder for it but ffmpeg does not.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c:
Use audio/x-qdm for caps. Collect some info - mplayer has a decoder
for it but ffmpeg does not.
2008-08-06 13:12:07 +00:00
Stefan Kost
815eb01af1 gst/qtdemux/qtdemux.c: Return the result of gst_pad_{start,stop}_task instead of hard-coded
Original commit message from CVS:
* gst/qtdemux/qtdemux.c:
Return the result of gst_pad_{start,stop}_task instead of hard-coded
TRUE.
2008-08-04 07:23:07 +00:00
Stefan Kost
115636d6d6 gst/qtdemux/: Add keyword tag support. Fixes #520694 for qtdemux.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c:
* gst/qtdemux/qtdemux_fourcc.h:
Add keyword tag support. Fixes #520694 for qtdemux.
2008-08-04 07:17:38 +00:00
Stefan Kost
aa7a44190e gst/qtdemux/qtdemux.c: Add support for tmpo tag (BPM).
Original commit message from CVS:
* gst/qtdemux/qtdemux.c:
Add support for tmpo tag (BPM).
2008-08-04 07:05:33 +00:00
Edward Hervey
637854d725 gst/qtdemux/qtdemux.c: Fix segment-stop regression.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_activate_segment):
Fix segment-stop regression.
Add documentation regarding segments in quicktime files by Wim Taymans.
Fixes #544509
2008-07-25 14:50:03 +00:00