Edward Hervey
7389cb1513
audioparsers: fix some more parsers
2011-06-06 20:43:31 +02:00
Tim-Philipp Müller
a53540346a
flacparse: tell baseparse the duration in samples for better accuracy
...
Tell GstBaseParse the duration in samples instead of time, so that
a duration query in DEFAULT format will return the correct number
of samples without rounding errors. Baseparse will convert this
into time itself when needed.
https://bugzilla.gnome.org/show_bug.cgi?id=650785
2011-05-23 13:50:46 +01:00
Tim-Philipp Müller
1183d0c1ab
flacparse: make conversion from TIME to DEFAULT format (samples) work
...
Fix copy'n'paste error in the previous commit.
2011-05-23 13:23:21 +01:00
Sebastian Dröge
8823ae251a
flacparse: Implement conversions between TIME and DEFAULT format
...
Fixes bug #650785 .
2011-05-23 11:43:02 +02:00
Tim-Philipp Müller
e0cadab5c2
flacparse: don't error out on invalid minimum_blocksize value in streaminfo header
...
We don't use it, so may just as well accept an invalid value
of 0 here, which is likely inconsequential anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=650691
2011-05-22 18:54:18 +01:00
Tim-Philipp Müller
a0205ecd51
flacparse: update for gst_base_parse_frame_init() API change
2011-04-15 18:51:20 +01:00
Tim-Philipp Müller
7a2a088c53
audioparsers: port to new GstBaseParse in core
2011-04-08 18:07:17 +01:00
Mark Nauwelaerts
551eefb757
baseparse: refactor passthrough into format flags
...
Also add a format flag to signal baseparse that subclass/format can provide
(parsed) timestamp rather than an estimated one. In particular, such "strong"
timestamp then allows to e.g. determine duration.
2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
4163969a24
baseparse: introduce a baseparse frame to serve as context
...
... and adjust subclass parsers accordingly
2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
eafcdf67b9
flacparse: mind gst_buffer_unref not liking NULL
...
Fixes #639950 .
2011-04-08 18:07:13 +01:00
Edward Hervey
6fbdfa07a8
flacparse: Fix unitialized variable on macosx
2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
55da8e46eb
flacparse: parse seektable
...
Fixes #631389 (partially).
2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
b1f8380e4c
flacparse: minor refactor and enable default baseparse segment clipping
2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
98c7f4b2f6
flacparse: tweak setting buffer metadata; avoid timestamp jitter
...
Fixes #631993 .
2011-04-08 18:07:11 +01:00
Sebastian Dröge
274414e3d6
flacparse: Don't drop the last frame if it is followed by garbage
...
See bug #631814 .
2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
4a7f899f6e
flacparse: fix parsing with unknown framesizes
...
Fixes #631814 (mostly).
2011-04-08 18:07:10 +01:00
Sebastian Dröge
c3678a5384
flacparse: Simplify frame header parsing by using lookup tables
...
Based on a patch by Felipe Contreras.
See bug #631200 .
2011-04-08 18:07:10 +01:00
Sebastian Dröge
572366e179
flacparse: Don't parse the complete FLAC frames but only look for valid frame headers
...
Thanks to Felipe Contreras for the suggestion. This is partially
based on his patches and makes flacparse more than 3.5 times faster.
Looking for valid frame headers is unlikely to give false positives
because every frame header is at least 9 bytes long, contains a
14 bit sync code and a 8 bit checksum over the first 8 bytes.
Fixes bug #631200 .
2011-04-08 18:07:10 +01:00
Sebastian Dröge
bfdc132ad0
flacparse: Really post tags only after the initial newsegment event
...
The first newsegment event will be send by the first call to
gst_base_parse_push_buffer() if necessary, posting the tags
before that is not a good idea. Instead do it from the
GstBaseParse::pre_push_buffer vfunc.
2011-04-08 18:07:09 +01:00
Sebastian Dröge
872b49efa7
flacparse: Fix uninitialized variable compiler warnings
...
These warnings are wrong, the variables are only used if they were
initialized by the bit reader.
2011-04-08 18:07:09 +01:00
Felipe Contreras
70d5346ee8
flacparse: fix picture parsing
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-04-08 18:07:09 +01:00
Sebastian Dröge
36f48450b1
flacparse: Push tags before the header buffers are pushed
2011-04-08 18:07:09 +01:00
Felipe Contreras
eaa6f789b2
flacparse: trivial caps fix
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-04-08 18:07:09 +01:00
Mark Nauwelaerts
f218b984cc
baseparse: use _set_duration to configure duration update interval
...
... as it logically belongs there as one or the other; either subclass
can provide a duration, or an estimate must be made (reguarly updated).
2011-04-08 18:07:08 +01:00
Sebastian Dröge
00b0444618
flacparse: Optionally check the overall frame checksums too before accepting a frame as valid
...
This is optional because it's a quite expensive operation and it's very
unlikely that a non-frame is detected as frame after the header CRC check
and checking all bits for valid values. The overall frame checksums are
mainly useful to detect inconsistencies in the encoded payload.
2011-04-08 18:07:06 +01:00
Sebastian Dröge
7b10c2afce
flacparse: Check the CRC-8 of the headers before accepting a frame as valid
...
This makes false-positives during seeking much less likely and detection of
them much faster.
2011-04-08 18:07:06 +01:00
Arun Raghavan
7184fe911d
flacparse: Fix buffer refcount issue
...
When called from the GST_FLAC_PARSE_STATE_HEADERS case,
gst_flac_parse_hand_headers() does a gst_buffer_set_caps() on a buffer
with refcount > 1. This change handles this case by making the buffer
metadata_Writable.
https://bugzilla.gnome.org/show_bug.cgi?id=614037
2011-04-08 18:07:06 +01:00
Arun Raghavan
fb4673cde9
flacparse: Make bitrate estimation more accurate
...
This implements the get_frame_overhead() vfunc so that baseparse can
make more accurate bitrate estimates.
2011-04-08 18:07:05 +01:00
Edward Hervey
85ceeaefe5
flacparse: Initialize variables.
...
Fixes build on $#@*( macosx
2011-04-08 18:07:04 +01:00
Mark Nauwelaerts
4ee63d49dd
flacparse: add documentation
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
9bcd66cb98
flacparse: perform additional frame checks when resyncing
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
84e0aae90c
flacparse: fix (multiple channel) frame parsing
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
a18863c8ec
flacparse: declare unparsed input and parsed output
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
83f02e8bc8
flacparse: locate next sync code more efficiently
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
534e2d7f49
flacparse: baseparse takes care of handling leftover pieces
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
0d53b6ad62
flacparse: set _OFFSET and _OFFSET_END on outgoing buffers
2011-04-08 18:07:03 +01:00
Mark Nauwelaerts
4db789a18c
audioparsers: move 'flacparse' into it
2011-04-08 18:07:02 +01:00