Commit graph

292 commits

Author SHA1 Message Date
Wim Taymans
ee2aa25e04 port to new API 2011-08-03 18:37:27 +02:00
Wim Taymans
4121021bb2 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtp/gstrtph264pay.c
	gst/rtpmanager/gstrtpssrcdemux.c
2011-08-03 18:25:30 +02:00
Tim-Philipp Müller
b843f8f99c gst: udpate for position/duration/convert query API changes 2011-07-28 11:38:31 +01:00
Arun Raghavan
89564fcb69 ac3parse: Support switching alignment on-the-fly
This allows switching of alignment for E-AC3 streams at run-time. This
is requested by downstream elements via a custom event.

https://bugzilla.gnome.org/show_bug.cgi?id=650313
2011-07-27 20:43:56 +05:30
Arun Raghavan
96972eb462 ac3parse: Add support for IEC 61937 alignment
When pushing out buffers over S/PDIF or HDMI, IEC 61937 payloading
requires each buffer to contain 6 blocks from each substream. This adds
code to collect all the frames needed to meet this requirement before
pushing out a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=650313
2011-07-26 10:40:00 +05:30
Wim Taymans
9c087d7d85 Merge branch 'master' into 0.11 2011-07-15 17:06:39 +02:00
René Stadler
fd38772d3e ac3parse: fix buffer duration on blocks-per-frame change
The gst_base_parse_set_frame_rate call was predicated on a change to
sample rate, duration or profile. However, the block count per frame can
also change between packets, which would result in incorrect buffer
durations.
2011-07-11 15:35:46 +03:00
Mark Nauwelaerts
d59a00aa1c Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
2011-07-04 11:48:13 +02:00
Jonas Larsson
1912c86946 aacparse: not so greedy minimum frame size
Fixes #653559.
2011-06-28 12:40:27 +02:00
Wim Taymans
7ef7157986 Merge branch 'master' into 0.11 2011-06-17 18:12:50 +02:00
Wim Taymans
83678af5e0 flacparse: fix unitialized access 2011-06-15 15:17:19 +02:00
Mark Nauwelaerts
d17d6d74be audioparsers: not so greedy minimum frame size
... which will be determined by parsing anyway, and avoids introducing
redundant additional latency.
2011-06-13 17:06:37 +02:00
Edward Hervey
7389cb1513 audioparsers: fix some more parsers 2011-06-06 20:43:31 +02:00
Wim Taymans
d89790d545 Merge branch 'master' into 0.11
Conflicts:
	gst/avi/gstavidemux.c
	gst/rtp/gstrtpac3depay.c
	gst/rtp/gstrtpg726depay.c
	gst/rtp/gstrtpmpvdepay.c
	gst/videofilter/gstgamma.c
2011-05-24 17:34:19 +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
Wim Taymans
63a17f4ec9 audioparsers: fix some parsers 2011-04-29 17:55:28 +02: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
063b3d9dcd ac3parse: fix unused-but-set-variable warning with gcc 4.6 2011-04-13 17:22:19 +01:00
Sebastian Dröge
4250ff5994 mpegaudioparse: The VBRI header is always at offset 0x20, independent of MPEG version
Also clean up advancing of the data pointer a bit.

Fixes bug #647659.
2011-04-13 17:12:47 +02:00
Tim-Philipp Müller
ad0e4442e9 audioparsers: update for set_frame_props -> set_frame_rate API change 2011-04-08 18:07:18 +01:00
Mark Nauwelaerts
dbbf54720c mpegaudioparse: relax sync match a bit when draining
... to at least allow initial caps change (but no further caps jitter).
Fixes unit test again after previous change.
2011-04-08 18:07:18 +01:00
Tim-Philipp Müller
e067c554c2 aacparse, amrparse: gst_fooparse_xyz -> gst_foo_parse_xyz to match GstFooParse
See moving-plugins checklist.
2011-04-08 18:07:17 +01:00
Tim-Philipp Müller
e44456b481 audioparsers: hook up to build 2011-04-08 18:07:17 +01:00
Tim-Philipp Müller
7a2a088c53 audioparsers: port to new GstBaseParse in core 2011-04-08 18:07:17 +01:00
Mark Nauwelaerts
de54fa0699 mpegaudioparse: require tighter sync match when draining 2011-04-08 18:07:17 +01:00
Sebastian Dröge
f3a1dc9796 mpegaudioparse: Parse encoder delay and encoder padding from the LAME header if present 2011-04-08 18:07:17 +01:00
Arun Raghavan
a1ec326204 dcaparse: Bump rank to primary+1
Seems to work fine with a reasonably wide range of media, so bumping
rank.
2011-04-08 18:07:17 +01:00
Arun Raghavan
3050dbb8fe dcaparse: Expose frame size in caps
This exports the size of the frame (number of bytes from one sync point
to the next) as the "frame_size" field in caps.
2011-04-08 18:07:17 +01:00
Arun Raghavan
c0bc522f24 dcaparse: Expose block size in caps
This sets the "block_size" field on caps as the number of samples
encoded in one frame.
2011-04-08 18:07:17 +01:00
Tim-Philipp Müller
d92eba5563 mpegaudioparse: add FIXME for making the base class use xing seek tables better 2011-04-08 18:07:17 +01:00
Sebastian Dröge
bf9859ad61 dcaparse: Add depth and endianness to the caps
Some decoders can only handle specific endianness or a fixed
depth and this allows better negotiation.

Fixes bug #644208.
2011-04-08 18:07:17 +01:00
David Schleef
7d876727b3 Revert "aacparse: allow parsed frames on sink pad"
This reverts commit e49b89d5c5.
2011-04-08 18:07:17 +01:00
David Schleef
ef8edf91d9 aacparse: allow parsed frames on sink pad 2011-04-08 18:07:16 +01:00
David Schleef
9469aa92f3 baseparse: Create baseparse library 2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
f3f44f81c3 baseparse: tune QUERY_SEEKING response
Even if we currently do not have a duration yet, assume seekable if
it looks like we'll likely be able to determine it later on
(which coincides with needed information to perform seeking).

Fixes #641047.
2011-04-08 18:07:16 +01:00
Arun Raghavan
f0435d6fd6 baseparse: Update min/max bitrate before first posting them
This avoids posting an initial min-bitrate of G_UINTMAX and max-bitrate
of 0.

https://bugzilla.gnome.org/show_bug.cgi?id=641857
2011-04-08 18:07:16 +01:00
Arun Raghavan
7f4a61b56c mpegaudioparse: Post CBR bitrate as nominal bitrate
Even if VBR headers are missing, we can't guarantee that a stream is in
fact a CBR stream, so it's safer to let baseparse calculate the average
bitrate rather than assume a CBR stream. However, in order to make
/some/ metadata available before the requisite number of frames have
been parsed, this posts the bitrate from the non-VBR headers as the
nominal bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=641858
2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
cc1b5ded6d amrparse: a valid amr-wb frame should not have reserved frame type index
See #639715.
2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
d1bea6361b ac3parse: improve handling of dependent substream frames
In particular, timestamps of these should track main-stream timestamps.
2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
3f2ffc9e53 baseparse: tune default duration estimate update interval
Rather than a fixed default frame count, estimate frame count to aim for
an interval duration depending on fps if available, otherwise use old
fixed default.
2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
fa16a9a0ef baseparse: reverse playback; mind keyframes for fragment boundary 2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
39da316386 amrparse: properly check for sufficient available data prior to access 2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
fd064765a7 baseparse: ensure non-empty candidate frames 2011-04-08 18:07:16 +01:00
Mark Nauwelaerts
2e76193c56 baseparse: clarify some debug statements 2011-04-08 18:07:15 +01:00
Mark Nauwelaerts
054621a58c baseparse: properly track upstream timestamps
... rather than with a delay.
2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
6df2a01762 baseparse: need proper frame duration to obtain sensible frame bitrate 2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
1749b527c1 baseparse: proper initial values for index tracking variables 2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
6616883390 baseparse: arrange for consistent event handling 2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
de1d89dba6 baseparse: header style cleaning 2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
9f5840572e baseparse: provide some more initial frame metadata in parse_frame
... and document accordingly.
2011-04-08 18:07:14 +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
b45821c83f baseparse: restrict duration scanning to pull mode and avoid extra set_caps call 2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
9a76c1d8cd baseparse: update some documentation
Also add some more debug.
2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
32f57133ac baseparse: allow increasing min_size for current frame parsing only
Also check that subclass actually either directs to skip bytes or
increases expected frame size to avoid going nowhere in bogus
indefinite looping.
2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
d9def3d05d baesparse: fix refactor regression in loop based parsing 2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
9d9d9beb04 baseparse: pass all available data to subclass rather than minimum
Also reduce some adapter calls and add a few debug statements.
2011-04-08 18:07:14 +01:00
Mark Nauwelaerts
feaf23f8bd baseparse: fix reverse playback handling 2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
95c2251390 baseparse: minor typo and debug statement cleanup 2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
d1bb142b68 baseparse: reduce locking
... which is either already mute and/or implicitly handled by STREAM_LOCK.
2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
ce23c62f58 baseparse: avoid loop in frame locating interpolation 2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
eafcdf67b9 flacparse: mind gst_buffer_unref not liking NULL
Fixes #639950.
2011-04-08 18:07:13 +01:00
Thiago Santos
244f747df2 audioparsers: baseparse: Be careful to not lose the event ref
Don't unref the event if it hasn't been handled, because the caller
assumes it is still valid and might reuse it.

I ran into this problem when transcoding an AVI (with mp3 inside)
to gpp.

https://bugzilla.gnome.org/show_bug.cgi?id=639555
2011-04-08 18:07:13 +01:00
Tim-Philipp Müller
bb8f0d3b4c dcaparse: fix sync word for 14-bit little endian coding
Fix copy'n'paste bug that made us look for the raw little endian
sync word twice instead of looking for the 14-bit LE sync word
as well. Fixes parsing of such streams (see #636234 for sample file).
2011-04-08 18:07:13 +01:00
Tim-Philipp Müller
a8c854374b docs: minor baseparse docs/comment fixes
Remove copy'n'paste leftovers.
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
cf5b01a55f ac3parse: relax bsid checking
... to the widest possible spec interpretation.

Fixes #637062.
2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
d2a9daec36 audioparsers: update some documentation 2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
cfbc40aca7 mpegaudioparse: add to documentation 2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
d1d1239fe4 dcaparse: add to documentation 2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
0bb654ed66 baseparse: increase keyframe awareness
... which is not particular relevant for audio parsing, but more so
in video cases.  In particular, auto-determine if dealing with video (caps).
2011-04-08 18:07:13 +01:00
Mark Nauwelaerts
f7de334d61 ac3parse: use proper EAC-3 caps 2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
b8af812987 baseparse: avoid unexpected stray metadata 2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
24cf864c91 baseparse: use proper _NONE output value when applicable 2011-04-08 18:07:12 +01:00
Edward Hervey
1e71d31e67 audioparsers: Remove dead assignments 2011-04-08 18:07:12 +01:00
Andoni Morales Alastruey
5bfc92714e audioparse: fix possible division-by-zero
https://bugzilla.gnome.org/show_bug.cgi?id=635786
2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
a45019fdd6 baseparse: use correct offset when adding index entry
... bearing in mind that BUFFER_OFFSET is media specific and may not
reflect the basic offset after having been parsed.
2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
76b322a429 baseparse: enhancements for timestamp marked framed formats
That is, as such formats allow subclass to extract position from frame,
it is possible to extract duration (if not otherwise provided)
from (near) last frame, and a seek can fairly accurately target the required
position.

Fixes #631389.
2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
634d4de627 baseparse: refactor frame scanning peformed by _loop 2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
563f1a136b baseparse: slightly optimize sending of pending newsegment events 2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
5eeb1f2e1f baseparse: minor fixes and enhancements
Arrange for upstream as well as downstream flushing when seeking.
Also determine upstream size as well as seekability.  Adjust some comments
to reality and employ debug statement in proper order.
2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
3e50f0a3c9 aacparse: minor cleanups 2011-04-08 18:07:12 +01:00
Mark Nauwelaerts
31d387f7b5 aacparse: fix regression in ADIF src caps setting 2011-04-08 18:07:12 +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
b25d139538 mpegaudioparse: fix silly leak in _reset 2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
ba56999212 baseparse: use only upstream duration if it provides one 2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
3d72afd924 baseparse: reflow update_bitrate code
... which makes local variables represent real state better, and avoids
triggering unneeded updates/actions.
2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
5aafc17dec baseparse: add some debug statements 2011-04-08 18:07:11 +01:00
Tim-Philipp Müller
3018bdf8de dcaparse: init variable to make osx build bot happy
gstdcaparse.c: In function 'gst_dca_parse_check_valid_frame':
gstdcaparse.c:246: warning: 'best_sync' may be used uninitialized in this function
2011-04-08 18:07:11 +01:00
Tim-Philipp Müller
75735c4573 audioparsers: add very basic dts/dca parser
Still some issues, e.g. with seekable queries in totem, but also
processing already-chunked input (created with matroskademux ! gdppay).
2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
5d52d3f6c2 ac3parse: properly parse e-ac3 frame header
Also add a few debug statements.
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
Mark Nauwelaerts
5369b97246 aacparse: streamline src caps setting
In particular, also set src caps whenever changes in stream warrant doing so.
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
2c7c4fa9e4 baseparse: perform bitrate handling and posting after newsegment sending 2011-04-08 18:07:11 +01:00
Mark Nauwelaerts
0edaf8470e baseparse: immediately post subclass provided bitrate 2011-04-08 18:07:10 +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
Tim-Philipp Müller
6b71b65289 Revert "baseparse: add skip property"
This reverts commit b5a3d60363.

Reverting this for now, since no one really seems to remember why this
property exists or what it could possibly be good for. It seems to have
been in the original mp3parse since the beginning of time and was back-
ported from there.
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
Sebastian Dröge
4cc901ed96 audioparser: Let the format string agree with the parameters to fix compiler warning 2011-04-08 18:07:09 +01:00
Sebastian Dröge
6f04047f0c ac3parse: Use unchecked versions of the bitreader get functions
We didn't check the return values anyway...
2011-04-08 18:07:09 +01:00
Arun Raghavan
8ef15e6247 baseparse: Fix debug output
We lose the reference to the buffer after gst_pad_push(), so the debug
print should happen before.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
2011-04-08 18:07:09 +01:00
Mark Nauwelaerts
0f5f06d5fa baseparse: support reverse playback
... in pull mode or upstream driven.
2011-04-08 18:07:09 +01:00
Mark Nauwelaerts
304b3c78dd baseparse: remove done TODOs and update documentation 2011-04-08 18:07:09 +01:00
Mark Nauwelaerts
1a54736255 baseparse: use determined seekability in answering SEEKING query 2011-04-08 18:07:09 +01:00
Mark Nauwelaerts
3f02dbd3ab baseparse: add skip property 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
dd140c7b4d mpegaudioparse: initial version
... adequately equivalent to mp3parse, so lets boldly set it
to higher rank.
2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
2d482deabe aacparse: set minimum frame size at _start
... rather than one time at _init.
2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
589c455ccb baseparse: use _set_frame_props to configure frame lead_in and lead_out
... provided a corresponding decoder with sufficient leading and following
frames to carry out full decoding for a particular segment.
2011-04-08 18:07:08 +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
Mark Nauwelaerts
1f7359d388 baseparse: localize use of provided fps information 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
5dd8a489d5 baseparse: seek table and accurate seek support 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
5a69aa4903 baseparse: proper and more extended segment and seek handling
That is, loop pause handling, segment seek support, newsegment for gaps, etc
2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
f16146df62 baseparse: add index support 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
261b7ec15f baseparse: refactor state reset 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
2c81b3bf77 baseparse: prevent indefinite resyncing 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
de189e327f baseparse: specific EOS handling if no output so far 2011-04-08 18:07:08 +01:00
Mark Nauwelaerts
0707c189db baseparse: adjust _set_frame_prop documentation and set default as claimed 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
723059c688 baseparse: fix bitrate copy-and-paste and update heuristic 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
fea135b3de baseparse: post duration message if average bitrates is updated 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
0198d6320b baseparse: remove is_seekable vmethod and use a set_seek instead
Seekability, like duration, etc is unlikely to change (frequently), and
the default assumption covers most cases, so let subclass set when needed.
At the same time, allow subclass to indicate if it has seek-metadata (table)
available, and possibly have it provide an average bitrate.
2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
10611c2826 ac3parse: remove redundant default is_seekable 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
30be03004e baseparse: add another hook for subclass prior to pushing buffer
... and allow subclass to perform custom segment clipping, or to
emit tags or messages at this time.
2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
dc6bd085ed baseparse: 0 converts to 0 by default 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
0e60101a28 basepase: refactor conversion using helper function and export default convert 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
a84eee533f baseparse: streamline query handling 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
1c65b8287d baseparse: cleanup struct and remove unused member 2011-04-08 18:07:07 +01:00
Mark Nauwelaerts
952b27a140 audioparsers: increase ranks to enable auto-plugging
Because we can, and should, have some shakedown testing before having
these make it into -good later on ...
2011-04-08 18:07:07 +01:00
Arun Raghavan
3448e83c73 baseparse: Allow chaining of subclass event handlers
This allows the child class to chain its event handler with
GstBaseParse, so that subclasses don't have to duplicate all the default
event handling logic.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
2011-04-08 18:07:07 +01:00
Sebastian Dröge
8df3c8477a baseparse: Don't use GST_FLOW_IS_FATAL()
Also don't post an error message for UNEXPECTED and do it
for NOT_LINKED.
2011-04-08 18:07:06 +01:00
Mark Nauwelaerts
7831661c40 baseparse: non-TIME seek event is simply not handled 2011-04-08 18:07:06 +01:00
Mark Nauwelaerts
835473b792 baseparse: fix seek event ref handling 2011-04-08 18:07:06 +01:00
Mark Nauwelaerts
baefba9748 baseparse: prevent arithmetic overflows in pull mode buffer cache handling 2011-04-08 18:07:06 +01:00
Mark Nauwelaerts
a459494097 baseparse: fix seek handling
Allow a few more seek event type combinations, and really use the result
of gst_segment_set_seek to perform the seek.  Also add some debug.
2011-04-08 18:07:06 +01:00
Arun Raghavan
f7e228edb0 baseparse: Don't emit bitrate tags too early
We wait to parse a minimum number of frames (10, arbitrarily) before
emiting bitrate tags so that our early estimates are not wildly
inaccurate for streams that start with a silence. If the stream ends
before that, we just emit the tags anyway.

While it _would_ be nicer to be specify the threshold to start pushing
the tags in terms of duration, this would introduce more complexity than
this merits.

https://bugzilla.gnome.org/show_bug.cgi?id=614991
2011-04-08 18:07:06 +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
Sebastian Dröge
0cf1285980 baseparse: Set the last stop to the buffer starttime if the duration is invalid
...instead of not setting it at all.
2011-04-08 18:07:06 +01:00
Joshua M. Doe
017bb65d06 baseparse: Send NEWSEGMENT event with correct start and position
Instead of taking the last stop (which could be buffer endtime instead
of starttime) always take the buffer starttime.

Fixes bug #614016.
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