Mark Nauwelaerts
baa28ddedf
qtdemux: fix timestamp datatype
2009-11-26 17:29:03 +01:00
Robert Swain
98279be735
qtdemux: Fix push mode by making sure stbl information is available in
...
next_entry_size ()
2009-11-24 16:40:19 +01:00
Robert Swain
db5de8f1b6
qtdemux: Fix order of arguments in log message
2009-11-24 16:35:20 +01:00
Robert Swain
f9745e89d3
qtdemux: Ease debugging by removing a goto for an error message
2009-11-23 16:29:15 +01:00
Robert Swain
4025d7cbd7
qtdemux: Parse per sample rather than all at once but build complete index when
...
seeking
2009-11-23 16:29:15 +01:00
Robert Swain
0c62109d20
qtdemux: Save atom data for later use so it doesn't get freed after initial
...
parsing
2009-11-23 16:29:15 +01:00
Robert Swain
29c33806c1
qtdemux: Parse from the previously parsed sample up to sample n
2009-11-23 16:29:14 +01:00
Robert Swain
52b1040219
qtdemux: Make qtdemux_parse_samples () parse up to n samples
2009-11-23 16:29:14 +01:00
Robert Swain
1f7b878d89
qtdemux: Separate off stbl sub-atom initialisation
2009-11-23 16:29:14 +01:00
Robert Swain
6a6d2c4970
qtdemux: Move variables into context in preparation for refactorisation
2009-11-23 16:29:14 +01:00
Robert Swain
ab61fb22f6
qtdemux: Fix bug where stps is never parsed due to logic error
2009-11-23 16:29:14 +01:00
Robert Swain
a1e2047472
qtdemux: Port ctts from Gnode * to GstByteReader
2009-11-23 16:29:14 +01:00
Robert Swain
9e49197208
qtdemux: Switch from QtAtomParser to GstByteReader
2009-11-23 16:29:14 +01:00
Wim Taymans
5d41590601
qtdemux: fix typo and grammar
2009-11-23 12:53:50 +01:00
Thiago Santos
e35085e5b5
qtdemux: Add more fields to SVQ3 caps
...
qtdemux only added the whole stsd atom as 'codec_data'
in its output caps for SVQ3. This patch makes it add
the SEQH (inside a SMI atom) and a gamma field (taken
from the gama atom) if available.
Fixes #587922
2009-11-18 16:41:50 -03:00
Mark Nauwelaerts
bf5f3a3964
qtdemux: fix bogus memory chunk size check
2009-11-18 12:54:48 +01:00
Michael Smith
fe9415544e
qtdemux: identify IMA adpcm in qt properly.
2009-11-17 17:59:13 -08:00
Edward Hervey
8df3e5c22b
qtdemux: init variables to make compiler on osx build bot happy
2009-11-04 16:47:42 +01:00
Tim-Philipp Müller
261454dd92
qtdemux: init variables to make compiler on osx build bot happy
2009-11-03 16:05:47 +00:00
Andy Wingo
c917d65e6d
qtdemux: unpack more information into image/x-j2c caps
...
* gst/qtdemux/qtdemux_fourcc.h: Add new fourccs for use by the mj2
unpacker.
* gst/qtdemux/qtdemux.c (qtdemux_parse_trak): Unpack JPEG2000 component
mapping and channel definitions from the jp2h header. Will add
component-map and channel-definitions elements to the caps if the
component maps or channel definitions are nonstandard, where standard
order means RGB, 444 packed YUV, or greyscale, with no alpha channel.
Fixes #598915 .
2009-10-20 17:20:55 +02:00
Mark Nauwelaerts
354a062c89
qtdemux: check some more atom sizes prior to parsing
2009-10-15 17:06:41 +02:00
Mark Nauwelaerts
e967767b27
qtdemux: add GstIndex support
2009-10-14 13:15:02 +02:00
Jan Schmidt
99f43dbb58
qtdemux: Fix uninitialized variable warning
...
Fix another bogus may-be-used-uninitialized warning in qtdemux
2009-10-13 16:03:13 +01:00
Jan Schmidt
42b09362f6
qtdemux: Fix uninitialized variable warnings
...
The gcc on the OS/X buildbot complains about these variables not being
initialized, even though they can't possibly actually be used
uninitialized.
2009-10-13 00:12:42 +01:00
Mark Nauwelaerts
6f34e2b0db
qtdemux: also consider Quicktime text subtitles
2009-10-09 17:49:20 +02:00
Mark Nauwelaerts
955a719c1a
qtdemux: provide language tag for stream
2009-10-09 17:49:17 +02:00
Mark Nauwelaerts
1210a92ff6
qtdemux: refactor common parts in track parsing
2009-10-09 17:49:14 +02:00
Mark Nauwelaerts
5ed2c3e562
qtdemux: refactor buffer processing and sending
...
... so it can be used in both pull and push based mode.
2009-10-09 17:49:12 +02:00
Mark Nauwelaerts
674b0c4289
qtdemux: extract palette data for dvd subpicture streams
...
... and send it downstream using custom dvd event
2009-10-09 17:49:10 +02:00
Mark Nauwelaerts
b2d70862e8
qtdemux: support 3GPP timed text subtitles
...
In particular, also make subtitle support less subp(icture)-centric.
2009-10-09 17:49:06 +02:00
Mark Nauwelaerts
faaa32dccb
qtdemux: NULL is not a valid taglist
2009-10-09 17:49:04 +02:00
Mark Nauwelaerts
533106203c
qtdemux: recognize some more encypted track cases
2009-10-09 17:49:02 +02:00
Josep Torra
c3d3eb6c3b
qtdemux: fix warnings building on macosx
2009-10-09 11:54:03 +02:00
Stefan Kost
e0cdd879b4
build: fprintf, sprintf, sscanf need stdio.h
2009-10-07 14:03:20 +03:00
Tim-Philipp Müller
45ff905771
qtdemux: make sure compatible brands buffer exists before dereferencing it
2009-10-05 11:46:08 +01:00
Robert Swain
c7b5df91a9
qtdemux: fix printf warnings on OSX
...
Cast variables passed to printf to avoid warnings about incorrect
formats (most likely caused by sizeof returning a size_t).
Fixes #597348 .
2009-10-05 00:35:15 +01:00
Tim-Philipp Müller
4590daf202
qtdemux: remove internal genre table
...
No need to maintain our own genre table in qtdemux. The genres are
identical to the ID3 genres, so we can just use libgsttag's
gst_tag_id3_genre_get() to look them up.
2009-10-05 00:26:44 +01:00
Mark Nauwelaerts
0fac7b5347
qtdemux: some optional QT specified stsd MPEG-4 atoms also apply to H264
...
Fixes #596319 .
2009-09-25 19:23:15 +02:00
Mark Nauwelaerts
e21d16a4f8
qtdemux: only send tag events downstream after newsegment
2009-09-25 16:47:42 +02:00
Wim Taymans
03f46a42e5
qtdemux: add durations modulo 1<<32
...
For calculating the durations of each sample, we are supposed to add each
duration modulo 1<<32 so make the elapsed time counter a uint32.
Fixes #595942
2009-09-25 11:54:06 +02:00
Wim Taymans
4e114a2b24
qtdemux: small cleanup
2009-09-24 20:38:54 +02:00
Tim-Philipp Müller
01e00ba1cd
qtdemux: don't use core API that doesn't exist yet
...
There's no gst_byte_reader_has_remaining() yet. Fixes build.
2009-09-24 19:33:39 +01:00
Tim-Philipp Müller
fab4113c24
qtdemux: map some atomparser functions to their new bytereader equivalents
...
Now that GstByteReader has unchecked and inlined variants as well, map
atomparser functions to their respective bytereader equivalents.
2009-09-24 16:34:08 +01:00
Tim-Philipp Müller
0f197776e1
qtdemux: add qt_atom_parser_has_chunks() and fix indentation
2009-09-24 16:32:02 +01:00
Tim-Philipp Müller
f65e6ea3a1
qtdemux: bail out instead of trying to alloc silly index sizes
...
If it looks like we would be allocating a silly size for our sample
index, just bail out instead of trying to allocate it. Helps with
broken or fuzzed files where we might end up trying to malloc a
couple of hundred MBs otherwise.
2009-09-24 16:29:26 +01:00
Tim-Philipp Müller
abaf91e428
qtdemux: error out correctly if we don't even have enough bytes for an atom header
2009-09-24 16:29:25 +01:00
Tim-Philipp Müller
25db7df49b
qtdemux: init fourcc to 0 as well to avoid invalid reads when printf'ing error message
2009-09-24 16:29:25 +01:00
Tim-Philipp Müller
9da3ed6491
qtdemux: add qt_atom_parse_has_remaining() to avoid overflows with _get_remaining()
2009-09-24 16:28:40 +01:00
Tim-Philipp Müller
a16feec38e
qtdemux: use GstByteReader when parsing tkhd atom
2009-09-23 16:54:43 +01:00
Tim-Philipp Müller
6b7f4f5e23
qtdemux: use unsigned ints for node length and do more sanity checking of the atom length
2009-09-23 16:54:43 +01:00
Tim-Philipp Müller
3abeb1e578
qtdemux: use GstByteReader for atom dumping and fix a few bugs
2009-09-23 16:54:42 +01:00
Tim-Philipp Müller
c8c9b0f35d
qtdemux: move stco, stts, stss and stps atom parsing over to GstByteReader
...
Make sure we don't read beyond the atom boundary. Note that the code
behaves slightly differently in the corner case where there is not
enough atom data for the specified number of samples (n_samples_time)
in the atom, but still enough data to fill the pre-allocated index of
n_samples entries: before we would just stop parsing the stts data
and continue, whereas now we will likely error out. This should not
be a problem in practice though. We could maintain the old behaviour
by doing reads with a size check inside the loop if needed.
2009-09-23 16:54:42 +01:00
Tim-Philipp Müller
4be46b1586
qtdemux: use bytereader to parse stsz and stsc atoms
...
Use GstByteReader to parse stsz and stsc chunks, and check size of
available data before parsing it, instead of blindly assuming there
will be enough data. Fixes crashes with some fuzzed/broken files.
2009-09-23 16:54:42 +01:00
Tim-Philipp Müller
5875e2016a
qtdemux: add qt_atom_parser_get_offset() and optimise _peek_sub()
2009-09-23 16:54:42 +01:00
Tim-Philipp Müller
410ebb7eb3
qtdemux: add QtAtomParser, an inlined GstByteReader variant
2009-09-23 16:54:41 +01:00
Mark Nauwelaerts
868a4b1303
qtdemux: prevent a spurious debug warning
2009-09-04 13:51:25 +02:00
Sebastian Dröge
e7efa0a5be
qtdemux: Add support for QCELP audio
...
Fixes bug #593757 .
2009-09-01 10:26:46 +02:00
Mark Nauwelaerts
15fa7d33ed
qtdemux: also extract ftyp info in push mode
2009-08-31 16:50:01 +02:00
Mark Nauwelaerts
c469f6b38d
qtdemux: consider 3gpp style tag parsing in some more cases
...
3GPP specs define a number of tags along with precise layout. While these
are normally expected to be found in a container whose major brand is a
3GPP brand, this may also happen when a 3GPP brand is only mentioned as a
compatible brand. Apply some checks, heuristic and fallbacks to extract
such tags as well.
2009-08-31 16:50:00 +02:00
Wim Taymans
e9e94a771b
qtdemux: add support for agsm
...
Fixes #592530
2009-08-21 11:44:43 +02:00
Mark Nauwelaerts
15d17763c0
qtdemux: fix qt style string tag extraction
...
QT style tags are tested on starting with (C) symbol using >>,
and (unsigned) int (may) have different >> behaviour.
Fixes #592232 .
2009-08-18 19:01:11 +02:00
Thiago Santos
40abf68562
qtdemux: Downgrade warning message to debug
2009-07-27 21:39:57 -03:00
Mark Nauwelaerts
977796fd07
qtdemux: sprinkle some more const
2009-07-08 11:20:30 +02:00
Mark Nauwelaerts
a4d586daac
qtdemux: perform some more (careful) data buffering
...
Once buffering has started (with an mdat atom), continue buffering
until moov atom is reached, which handles cases with multiple
mdat atoms. Also keep adapter/offset better in sync with upstream
and fix some debug statements. Fixes #587426 .
2009-07-08 11:20:27 +02:00
Tim-Philipp Müller
2bcf52dde7
qtdemux: error out instead of dividing by 0
...
Error out if timescale is 0.
2009-07-01 13:07:48 +01:00
Tim-Philipp Müller
f6a1211495
Revert "qtdemux: Make sure we don't blacklist streams by wrongly comparing their"
...
This reverts commit 5503a59a57
.
Reverting this since it causes regressions with a lot of sample files
I have, all of which worked fine with the last -good release (#586891 ).
2009-07-01 09:32:42 +01:00
Tim-Philipp Müller
ae27524be0
qtdemux: comment out unused structure
2009-07-01 09:24:38 +01:00
Tim-Philipp Müller
8fa148d2f1
qtdemux: more size checks, and use g_try_new0() instead of g_new0()
...
Whenever we alloc something based on a user-supplied size, we should
really use g_try_new(), otherwise we can easily be made to abort by
passing a ridiculously large number to us for allocing. Fixes
problems with some fuzzed files.
2009-07-01 09:24:38 +01:00
Tim-Philipp Müller
405aae4568
qtdemux: guard against bogus atom sizes and short reads
...
Check the possibly 64-bit atom size more carefully before casting it
to an int and passing it to gst_pad_pull_range(), otherwise we might
end up pulling 0 bytes, getting an empty buffer as requested and
dereferencing not available data whilst thinking we actually asked
for and got 0x1000000000000 bytes. Similar fix for push mode operation
where neededbytes ends up being 0 bytes, which makes us assert. Fixes
crash with broken or fuzzed file (NB #122378 ).
2009-07-01 09:24:38 +01:00
Tim-Philipp Müller
c730912f67
qtdemux: use 0x prefix when logging numbers in hex
2009-07-01 09:24:38 +01:00
Tim-Philipp Müller
1fb30a154a
qtdemux: don't process track_num/track_count tags with a 0 value
...
Number/count values of 0 mean they're not set. Don't put those in the
taglist.
2009-06-26 13:29:27 +01:00
Julien Moutte
5503a59a57
qtdemux: Make sure we don't blacklist streams by wrongly comparing their
...
duration with entire clip duration.
2009-06-25 13:23:40 +02:00
Edward Hervey
4780d17894
qtdemux: Remove dead assignments and unused variables.
...
Also add branch likeliness macros.
2009-06-25 07:41:44 +02:00
Edward Hervey
b9d7f2527e
qtdemux: Fix uninitialized variables. Fixes build on macosx
2009-06-25 07:41:43 +02:00
Edward Hervey
86c2299ed1
qtdemux: Another round of G_*LIKELY micro-optimisations.
2009-06-24 12:48:32 +02:00
Edward Hervey
30dd458567
qtdemux: Take last sample duration for dummy segment calculation.
...
This fixes the cases where files without EDL wouldn't output their
last buffer.
2009-06-24 12:48:32 +02:00
Edward Hervey
279be94321
qtdemux: Add GST_MEMDUMP statements for unknown atoms.
...
This is to help developers track down and implement unhandled atoms faster.
2009-06-24 12:37:38 +02:00
Tim-Philipp Müller
da4c1c9227
qtdemux: don't leak cover art
2009-06-23 15:35:37 +01:00
Tim-Philipp Müller
ace09d40bd
qtdemux: use GST_MEMDUMP
2009-06-22 10:49:03 +01:00
Tim-Philipp Müller
b8176ee9cc
qtdemux: post container-format tags
2009-06-22 10:49:01 +01:00
Mark Nauwelaerts
71eb4a4dfa
qtdemux: map some tags to COMPOSER rather than ARTIST
2009-06-17 12:31:40 +02:00
Mark Nauwelaerts
0d2db95453
qtdemux: fix some 3GP tag extraction (keywords, genre, location)
2009-06-17 12:31:37 +02:00
Mark Nauwelaerts
0f0117aabb
qtdemux: extract pixel-aspect-ratio information
2009-06-17 12:31:32 +02:00
Wim Taymans
9050fb26e9
Revert "Revert "qtdemux: fill timestamp table completely""
...
This reverts commit 9f022c8a85
.
Sorry, I was thinking about the wrong module.
2009-06-07 20:54:06 +02:00
Wim Taymans
9f022c8a85
Revert "qtdemux: fill timestamp table completely"
...
This reverts commit 790b050fc5
.
I forgot we were frozen.
2009-06-07 20:49:50 +02:00
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
Edward Hervey
0cb5b42d54
Remove trivial unused variables detected by CLang static analyzer.
2009-04-18 18:51:28 +02:00
Edward Hervey
cdb03bdc2b
Remove blank {set|get}_property/change_state/finalize methods.
2009-04-18 18:51:27 +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
Zaheer Merali
988a4c6532
Fix grammar.
2009-04-03 09:57:15 +01: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