Commit graph

63 commits

Author SHA1 Message Date
Chris Bass b40bf67526 aacparse: allow conversion from raw AAC to ADTS
This patch will prepend ADTS headers to raw AAC audio frames, allowing
upstream elements to link to decoders that only support AAC in ADTS format.

Note that no error correction bits are added to ADTS frames in this code.

https://bugzilla.gnome.org/show_bug.cgi?id=615740
2013-08-13 15:58:23 +02:00
Vincent Penquerc'h 91d4abceaa aacparse: allow conversion from ADTS to raw AAC
Some muxers (eg, qtmux) only support raw AAC, so this allows linking
an encoder that outputs ADTS only to those muxers.

The conversion is simple (omit the first 7 or 9 bytes of the frame),
but has to be done in pre_push instead of handle_frame as 1.0 does
not seem to allow skipping bytes there as 0.10 used to.

Other conversions are not supported (yet).
2013-07-26 09:44:11 +01:00
Vincent Penquerc'h 55e9338846 aacparse: fix object_type parsing off-by-one in ADTS frame
According to http://wiki.multimedia.cx/index.php?title=ADTS,
the value stored in ADTS headers is one less than the object
type of the AAC stream.

A look at ffmpeg shows it also adds 1 to the value read off
the ADTS header.

Note that this might break other things that happen to have
an inverse off by one to match the existing code.
2013-07-26 09:44:10 +01:00
Matej Knopp ae92ea21a1 aacparse: be less verbose when parsing LOAS streams
https://bugzilla.gnome.org/show_bug.cgi?id=704162
2013-07-15 07:55:08 +02:00
Sebastian Dröge c49dede772 audioparsers: Make sure the caps are actually writable before changing them 2012-12-17 15:17:12 +01:00
Sebastian Dröge 26040ee38c audioparsers: Use the peer caps for restrictions instead of the srcpad allowed caps
Otherwise we will intersect with the srcpad template caps and add all the caps fields
that the parser will ever set, no matter if downstream restricts this field or not.
This requires upstream to set this field on the caps to successfully negotiate.

https://bugzilla.gnome.org/show_bug.cgi?id=690184
2012-12-17 15:01:02 +01:00
Tim-Philipp Müller 230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Tim-Philipp Müller 4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Edward Hervey 538c131b37 aacparse: Reset parser when we have caps without codec_data
This ensures the detection (and proper downstream caps settings) will
actually happen when we have new incoming caps without codec_data.

This was easily triggered by streams from matroskademux which initially
provided caps with a constructed codec_data, but then pushed new caps
without the codec_data once it detected the stream was adts.
2012-07-24 12:24:43 +02:00
Mark Nauwelaerts 400bdee601 aacparse: perform additional sanity check before confirming ADTS format
... and tweak confusing debug message.
2012-07-06 15:29:37 +02:00
Mark Nauwelaerts 986286a8ea aacparse: remove unhelpful stray debug message 2012-07-06 15:29:28 +02:00
Sebastian Dröge ca4b5d795b audioparsers: Fix GstBaseParse::get_sink_caps() implementations
They should take the filter caps into account and always return
the template caps appended to the actual caps. Otherwise the
parsers stop to accept unparsed streams where upstream does not
know about channels, rate, etc.

Fixes bug #677401.
2012-06-05 09:21:08 +02:00
Edward Hervey ba7569028c audioparsers: Check return value of GstBitReader/GstByteReader 2012-04-12 15:47:24 +02:00
Tim-Philipp Müller e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Mark Nauwelaerts d6cc68a9f7 audioparsers: use sink pad template caps rather than src 2012-03-22 18:27:30 +01:00
Wim Taymans 756948262c fix template caps refcount 2012-03-10 10:52:01 +01:00
Wim Taymans 6b2998d5b7 aacparse: remove some unused declarations 2012-02-15 12:41:43 +01:00
Mark Nauwelaerts 1ae32656ae audioparsers: adjust to modified baseparse API 2012-02-13 18:27:53 +01:00
Mark Nauwelaerts 207f520bbd aacparse: correctly set ADIF src caps 2012-02-09 22:10:11 +01:00
Wim Taymans 3a095a26b2 aacparse: fix srcpad caps handling 2012-02-03 16:14:08 +01:00
Wim Taymans 583d39dd8d update for new memory API 2012-01-25 12:30:28 +01:00
Sebastian Dröge 93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Oleksij Rempel (Alexey Fisher) 4f98b4ec85 ac3parse: remove unused variable
remove unused variable to fix compile error:
make -C audioparsers
make[3]: Betrete Verzeichnis '/home/lex/tmp/gst-plugins-good/gst/audioparsers'
  CC     libgstaudioparsers_la-gstaacparse.lo
gstaacparse.c: In function 'gst_aac_parse_read_loas_audio_specific_config':
gstaacparse.c:446:12: error: variable 'sbr' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

Signed-off-by: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
2011-12-21 13:16:44 +00:00
Vincent Penquerc'h 16a4c596eb aacparse: parse LOAS variant
The LOAS variant seems to have three different subvariants itself,
only one of them is implemented as my two samples happen to be
using that one.
The sample rate is not always reported correctly, as the "main"
sample rate is apparently sometimes half what it should be (both
of my samples report 24000 Hz there), and there are two other
parts of the subvariant with different sampling rates. One of them
is parsed, but not the other, as it's located after some other
large amount of variable data that needs parsing first, and there
seems to be a LOT of it, which is useless for our needs here.
This ends up being rather inconsequential, as ffdec_aac_latm,
which is the only decoder that can decode such streams, does not
need the sample rate on the caps anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=665394
2011-12-19 11:39:44 +00:00
Vincent Penquerc'h c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Tim-Philipp Müller be0d6baac5 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/pulse/pulseaudiosink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstamrparse.c
	gst/audioparsers/gstdcaparse.c
	gst/audioparsers/gstflacparse.c
	gst/effectv/gstradioac.c
	gst/effectv/gstradioac.h
	gst/effectv/gstripple.c

Some possible FIXMEs remaining in the audio parser getcaps functions.
2011-11-26 13:34:10 +00:00
Sebastian Dröge 6204464735 audioparse: Use the sinkpad template caps as fallback, not the srcpad ones 2011-11-24 10:25:02 +01:00
Sebastian Dröge 48b07ae434 aacparse: Mark some functions as static and remove unused function declarations 2011-11-24 09:44:58 +01:00
Sebastian Dröge 94daabf71f aacparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream 2011-11-24 09:43:54 +01:00
Wim Taymans 9c14280b1d make some more things compile again 2011-10-27 19:00:52 +02:00
Wim Taymans 87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Sebastian Dröge 786d35f53f audioparsers: Improve src template caps
Remove the parsed/framed fields and add all fields to the template
caps that always exist.
2011-09-07 12:10:48 +02:00
Mark Nauwelaerts 625e7a6143 aacparse: parse codec_data to determine number of samples per frame
Fixes #656734.
2011-09-07 11:20:03 +02:00
Wim Taymans e9df54819c Merge branch 'master' into 0.11 2011-08-24 14:16:44 +02:00
Vincent Penquerc'h f3fc3e1f69 aacparse: only require two frames in a row when we do not have sync
This avoids a single bit error dropping two frames unnecessarily.
The two consecutive frames check is still required when we don't
have sync.

https://bugzilla.gnome.org/show_bug.cgi?id=657080
2011-08-24 08:26:31 +02: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
Edward Hervey 7389cb1513 audioparsers: fix some more parsers 2011-06-06 20:43:31 +02:00
Wim Taymans 63a17f4ec9 audioparsers: fix some parsers 2011-04-29 17:55:28 +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
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 7a2a088c53 audioparsers: port to new GstBaseParse in core 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
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 d2a9daec36 audioparsers: update some documentation 2011-04-08 18:07:13 +01:00
Edward Hervey 1e71d31e67 audioparsers: Remove dead assignments 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