Stefan Kost
3b91ea7c81
qtdemux: use GST_BOILERPLATE macro
2010-09-06 09:57:58 +03:00
Sebastian Dröge
7fe34f3889
qtdemux: Don't use GST_FLOW_IS_FATAL()
2010-09-04 14:52:10 +02:00
Mark Nauwelaerts
8ea04c66b8
qtdemux: prevent reading past avc1 atom when parsing
...
... when one of the subatoms has a large/invalid size.
Fixes #626609 .
2010-08-11 12:58:17 +02:00
Thiago Santos
bef350bf34
qtdemux: Correctly parse mvhd atoms
...
Parse mvhd data according to its version to avoid failing
on valid files.
2010-07-29 10:00:15 -03:00
Thiago Santos
a15430a862
qtdemux: Fix the max/avg in btrt atom reading
...
According to ISO media base format, the max bitrate is the
first one, and the avg comes next.
2010-07-28 12:22:23 -03:00
Andoni Morales Alastruey
e6d7e69844
qtdemux: set the pixel-aspect-ratio field also for par=1/1
...
https://bugzilla.gnome.org/show_bug.cgi?id=625302
2010-07-26 16:08:37 +02:00
Mark Nauwelaerts
65fdbe68ec
qtdemux: also calculate PAR using track width and height for QT files
...
(... as opposed to only for ISO style files).
Fixes #624173 .
2010-07-16 14:00:18 +02:00
Mark Nauwelaerts
bbded080e0
qtdemux: do not align reverse playback reference stream twice
...
Timestamp rounding issues could lead to going backwards 2 keyframe periods
(rather than only 1). While this is not necessarily a problem, it might
potentially place additional (buffering) load on downstream and could be
avoided (because We Can).
Fixes #623629 .
2010-07-16 13:58:34 +02:00
Mark Nauwelaerts
2a22e9d487
qtdemux: convert some more mov format timestamp to gst time
2010-07-16 13:58:21 +02:00
Arun Raghavan
8aed3176ce
qtdemux: Fix order of bitrates in 'btrt' atom
...
There seems to be a bug in libmp4v2 that generates a MPEG4BitRateBox as
(bufferSizeDB, avgBitrate, maxBitrate) instead of (bufferSizeDB,
maxBitrate, avgBitrate), according to the spec. I used the mp4file
output while writing this code, so the order is wrong. This patches
fixes that.
https://bugzilla.gnome.org/show_bug.cgi?id=623654
2010-07-06 10:33:16 +01:00
Edward Hervey
fcf1995020
qtdemux: strip out bogus tags from XMP atom
...
https://bugzilla.gnome.org/show_bug.cgi?id=623366
2010-07-02 14:39:36 +02:00
Robert Swain
50273537dc
qtdemux: Round timestamp up when scaling to mov format
...
Fix timestamp rounding to allow the correct index to be located.
The issue was that scaling from GStreamer time format to mov time format was
rounding down causing the timestamp of the newsegment event received after a
flushing keyframe seek to find the sample index before the one it should
causing further backward seeking to the keyframe prior until no rounding error
occurred.
Rounding up when scaling to mov format has the desired effect, and it is
not clear whether just the _round () variant would be sufficient.
Fixes bug #619105
2010-05-26 00:08:16 +01:00
David Schleef
e847957790
qtdemux: Add VP8
2010-05-17 17:18:25 +02:00
Mark Nauwelaerts
bcde9fab09
qtdemux: fix push based seeking
...
... where it comes down to transforming incoming BYTE segment
to a corresponding TIME segment.
Also fixes #609405 .
2010-05-11 18:44:01 +02:00
Mark Nauwelaerts
e934f637b6
qtdemux: fix partial parsing of ctts table
...
Fixes #616516 .
2010-05-11 11:06:20 +02:00
Mark Nauwelaerts
a9e688cf32
qtdemux: cleanup a comment and add some debug and conditional compilation
2010-05-11 11:06:17 +02:00
David Schleef
1df1d34fe1
qtdemux: UYVY is 4:2:2, not 4:2:0
2010-04-30 17:19:44 -07:00
Tim-Philipp Müller
a155deaabf
matroskademux, qtdemux: minor code cleanup in avc_level_idc_to_string()
...
Do the same with slightly fewer LOC.
2010-04-12 15:10:11 +01:00
Arun Raghavan
861311e8f6
qtdemux: Post avg./max. bitrate tags for H.264
...
This reads the average and maximum bitrates from the 'btrt' atom if
available, and pushes these as tags,
https://bugzilla.gnome.org/show_bug.cgi?id=614927
2010-04-07 11:55:32 +02:00
Thiago Santos
f966ff66f8
qtdemux: Read replaygain peak/gain tags
...
Make qtdemux read tags replaygain tags that are within '----' atoms.
Fixes #614471
2010-04-02 15:23:51 -03:00
Arun Raghavan
95c6d558f0
matroska: Export h.264 profile and level in caps
...
This replicates the code in qtdemux to export the h.264 profile and
level in the stream caps.
https://bugzilla.gnome.org/show_bug.cgi?id=614651
2010-04-02 18:51:34 +02:00
Sebastian Dröge
9317ad6fe9
qtdemux: Fix off-by-one introduced in last commit
2010-04-02 18:50:45 +02:00
Arun Raghavan
ccef64be39
qtdemux: Minor refactor of the code
...
This will make it easier to clump together common code when copying to
mastroskademux.
https://bugzilla.gnome.org/show_bug.cgi?id=614651
2010-04-02 18:49:20 +02:00
Arun Raghavan
d6dcd70b4c
qtdemux: Export h.264 level in caps
...
This exports the h.264 level in the stream caps (as a string) which can
be used to match a decoder, or as metadata.
https://bugzilla.gnome.org/show_bug.cgi?id=614651
2010-04-02 18:48:45 +02:00
Arun Raghavan
503f0988bf
qtdemux: Export h.264 profile in caps
...
This adds the h.264 profile for a given stream into caps. This can
(eventually) be used to select an appropriate decoder and as metadata
for certain applications.
https://bugzilla.gnome.org/show_bug.cgi?id=614651
2010-04-02 18:48:23 +02:00
Tim-Philipp Müller
af5e4d935a
qtdemux: extract stream language in more cases
...
The 16-bit language code can be either a packed ISO-639-2T code
or a 'Macintosh language code'. Handle the latter type of language
codes as well, and map to the matching ISO code. Lastly, fix
language code posting for language #0 , which is valid and stands
for 'English'.
Fixes #614001 .
2010-03-26 17:02:50 +00:00
Benjamin Otte
3f511ec361
Add -Wwrite-strings to the configure flags
...
... and fix all warnings
2010-03-21 14:17:47 +01:00
Benjamin Otte
cccfeaa59c
gst_element_class_set_details => gst_element_class_set_details_simple
2010-03-18 14:32:00 +01:00
Thiago Santos
5efda5caf7
qtdemux: add XMP parsing support
...
Use xmp helpers to parse XMP metadata in udta atom.
Fixes #609539
2010-03-11 19:04:49 -03:00
Edward Hervey
32498746ad
qtdemux: Fix print statements for pointer differences.
...
This fixes it for both 32 and 64 bit
2010-03-11 17:28:47 +01:00
Edward Hervey
8d794e6a9f
qtdemux: Fix unitialized variables
2010-03-11 17:28:35 +01:00
Thiago Santos
145b3a3079
qtdemux: Set stream-format=raw on AAC caps
...
Set stream-format=raw for AAC caps, as that is the
expected AAC format to be in this container family.
Fixes #566250
2010-03-11 09:38:32 -03:00
Mark Nauwelaerts
561a506822
qtdemux: avoid erroneous codec-data overriding of stsd information
2010-03-10 11:48:06 +01:00
Robert Swain
8d801f41d8
qtdemux: Fix off-by-one logic error in frame rate cap regression commit
2010-02-18 18:20:24 +01:00
Thiago Santos
f1c61e1d84
qtdemux: Use the correct duration when comparing segments
...
Do not confuse QtDemuxSegments with GstSegments when
comparing the total file duration with the segment duration
Fixes #610296
2010-02-18 07:53:34 -03:00
Robert Swain
2723de585e
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 #610280
2010-02-17 18:06:29 +01:00
Mark Nauwelaerts
d14685eb08
qtdemux: fix ALAC codec-data handling
...
ALAC codec-data apparently comes in (at least) two flavours (mov, mp4),
so use atom based parsing to retrieve required data, rather than
aiming for a specific offset.
See also #580731 .
2010-02-16 16:22:28 +01:00
Mark Nauwelaerts
105d8c925b
qtdemux: fix debug message
2010-02-16 16:09:36 +01:00
Mark Nauwelaerts
58d84a993c
qtdemux: handle signed values in 3GPP location tag
2010-02-16 16:09:26 +01:00
Robert Swain
e2f5409d40
qtdemux: Fix frame rate cap regression
...
Look for a non-zero min_duration during initialisation to avoid
incorrect frame rate caps.
2010-02-16 14:44:11 +01:00
Robert Swain
4aff3e48be
qtdemux: temporary safety check to avoid crashes with a certain file
...
Add temporary check to avoid crashes with a certain file when seeking
until the real cause of this is figured out. See #609405 .
2010-02-10 20:36:56 +00:00
Robert Swain
7877ffb6f5
qtdemux: skip unknown atoms when looking for moov
...
Fixes bug #609107
2010-02-07 10:56:02 +01:00
Robert Swain
9ed6c58006
qtdemux: Set the segment start time to the requested seek time for non-keyframe seeks
2010-02-04 18:54:58 +00:00
Robert Swain
8d4f70c5ce
qtdemux: Fix time returned for index at a byte offset
...
The logic for searching forwards/backwards was swapped
2010-02-04 18:54:53 +00:00
Edward Hervey
cb0474b6b3
qtdemux: dmb1 is a valid fourcc for Motion-JPEG
2010-01-23 14:47:55 +01:00
Edward Hervey
a782ef3ce8
qtdeux: IV32 is also used for Indeo 3 video streams
2010-01-23 14:20:02 +01:00
Roland Krikava
8a80fdaad1
qtdemux: Avoid negative overflow on keyframe search
...
Do not overflow negatively when searching a previous
"keyframe" on audio streams. Could cause infinite loops
on backwards playback
Fixes #607718
2010-01-21 23:20:34 -03:00
Alessandro Decina
5d3d3f28e1
qtdemux: fix compiler warnings under OS X.
2010-01-21 19:24:22 +01:00
Mark Nauwelaerts
8ca984d5e8
qtdemux: always keep media segments within total duration
...
... as opposed to only doing so following a seek.
2010-01-20 16:03:21 +01:00
Thiago Santos
e61a71b490
qtdemux: g_free is NULL safe
2010-01-15 13:42:30 -03:00
Thiago Santos
b07f406634
qtdemux: use DEMUX errors, instead of DECODE
...
qtdemux should use DEMUX errors, and not DECODE
Conflicts:
gst/qtdemux/qtdemux.c
2010-01-15 13:42:30 -03:00
Thiago Santos
b988ff4f57
qtdemux: Minor refactor
...
Replace repeated code with a function call
2010-01-15 13:42:30 -03:00
Thiago Santos
92a83e016a
qtdemux: Handle another kind of redirect trak
...
Some traks might contain a redirect rtsp uri inside
hndl atom (which is a dref atom entry). This commit makes qtdemux
post a message when it finds one of these traks and there are
no other traks.
Fixes #597497
2010-01-15 13:42:29 -03:00
Thiago Santos
06de494640
qtdemux: Post error when reaching EOS without pads
...
Post an error when EOS is reached and there are no src pads
2010-01-15 13:42:22 -03:00
Thiago Santos
b53a45ed44
qtdemux: Do not post empty redirect messages
...
Some misinterpreted data could result in posting redirect messages
with empty redirect strings. It is better not to post them.
An example is the file on bug #597497
2010-01-15 13:13:59 -03:00
Edward Hervey
3f5add8820
qtdemux: use G_GSIZE_FORMAT for platform independent gsize qualifier
...
Fixes build on macosx
2010-01-12 17:39:05 +01:00
Michael Smith
144fbd2d8f
qtdemux: fix offset for type 2 mp4a sound sample descriptions.
...
Allows us to correctly find the esds (and thus the codec data) for such
mp4a files.
2010-01-11 11:48:29 -08:00
Robert Swain
866d13e7b9
qtdemux: Oops. The gpointer cast is needed because of the const
...
qualifiers on the data elements
2010-01-11 10:38:10 +01:00
Robert Swain
4ac643c2d9
qtdemux: Debug -> info level for a message for benchmarking index parsing
...
The extra message output at higher levels affects the accuracy of the
benchmark.
2010-01-11 10:17:54 +01:00
Robert Swain
c93ea637ef
qtdemux: Don't check for NULL pointers or cast to gpointer as this is
...
not needed
2010-01-11 10:05:10 +01:00
Robert Swain
a340359127
qtdemux: Refactor stbl sub-atom freeing. Free when index has been
...
completely parsed.
2010-01-11 09:50:33 +01:00
Robert Swain
3daf1871c1
qtdemux: Avoid whitespace commits due to inconsistent GNU indent
...
behaviour
2010-01-11 09:50:33 +01:00
Tim-Philipp Müller
e1bff64f00
qtdemux: remove newline at end of debug statement
2010-01-11 00:10:34 +00:00
Michael Smith
7f442ab1c1
qtdemux: Add support for wave-style audio in qt.
...
Uses gstriff to parse the wave headers appropriately. Tested with MS-ADPCM
content.
2010-01-05 12:11:31 -08:00
Wim Taymans
48615d5e98
qtdemux: fix chunk counter
2010-01-05 15:51:55 +01:00
Wim Taymans
17630760f4
qtdemux: more work at reducing loop overhead
...
Try to avoid derefs when parsing the index. Save the state into the structures
when we exit the loop instead of for each iteration.
2010-01-05 15:51:52 +01:00
Wim Taymans
91a5e5138f
qtdemux: cleanups and make duration more accurate
...
Make the QtDemuxSample struct smaller by keeping the duration and the pts_offset
as their 32 bit values.
Make some macros to calculate PTS, DTS and duration of a sample.
Deref the sample index less often by keeping a ref to the sample we're dealing
with.
2010-01-05 15:51:50 +01:00
Wim Taymans
22eb18f828
qtdemux: simplify logic to calculate duration
...
Since we no longer store the timestamp and duration in nanoseconds, we can now
simply store the duration as-is.
2010-01-05 15:51:48 +01:00
Robert Swain
1c27ed4dae
qtdemux: Store timestamps in mov format in the index
...
This allows faster building of the index upon seeks so that scaling of
timestamps only occurs when actually needed.
2010-01-05 15:51:45 +01:00
Wim Taymans
86021857c5
qtdemux: make seeking in push mode work
...
Move sample position checks into qtdemux_parse_samples where we can protect it
with a lock.
Refactor and make an qtdemux_ensure_index function.
Rename qtdemux_do_push_seek to qtdemux_seek_offset in order to avoid confusion
with gst_qtdemux_do_push_seek.
2010-01-05 15:51:43 +01:00
Wim Taymans
3b643817be
qtdemux: move error code out of normal flow
2010-01-05 15:51:40 +01:00
Robert Swain
4b2b7067b6
qtdemux: Add push mode seek support for seeking to obtain the moov atom
2010-01-05 15:51:36 +01:00
Arun Raghavan
e9f9164fb6
qtdemux: Add tags for average and maximum bitrate
...
Fixes #599300 .
2009-12-31 18:25:20 +00:00
Thiago Santos
5d86010dad
qtdemux: perf tag should map to GST_TAG_ARTIST
2009-12-24 17:06:16 -03:00
Jonathan Conder
1112090589
qtdemux: Adds new tags
...
Adds some new tags mapping to qtdemux.
Fixes #599759
2009-12-21 12:03:30 -03:00
Wim Taymans
cc277b4a26
qtdemux: Fix ALAC codec_data parsing
...
Fixes #604611
2009-12-17 16:23:56 +01:00
Thiago Santos
4063bb87e8
qtdemux: Remove cpp style coments
...
Removes // comments and replace them with /* */ comments
2009-12-16 17:28:30 -03:00
Tim-Philipp Müller
6c4c8f8670
qtdemux: fix up language code extraction some more
...
Quicktime uses ISO 639-2 for language codes, but GST_TAG_LANGUAGE
is supposed to hold a ISO 639-1 code, so convert as needed using
the new API from -base.
See #602126 .
2009-12-13 13:10:12 +00:00
Thiago Santos
52177fa056
Revert "qtdemux: Correctly parse classification tags"
...
This reverts commit cd883aa60c
.
Previous code was correct, 4 is due to table and language code,
not only language code
2009-12-12 17:44:04 -03:00
Thiago Santos
cd883aa60c
qtdemux: Correctly parse classification tags
...
In clsf atoms, the language code is 2 bytes long, not 4.
2009-12-12 16:31:35 -03:00
Thiago Santos
ff4ac9ddf6
qtdemux: fix debug message printf args
...
Fixes debug message printf format to make it build in mac's gcc
2009-12-03 17:49:55 -03:00
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
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