Sebastian Dröge
e7515971a8
opusdec: Update sink pad templates
...
We always require the channel-mapping-field. If it's 0 we require nothing
else, otherwise we need channels, stream-count and coupled count to be
available.
2015-11-05 12:11:19 +01:00
Sebastian Dröge
7ec953e085
opusenc: Create an empty taglist if there is none
...
There always have to be 2 buffers in the streamheaders, even if
the comment buffer is basically empty.
2015-11-04 00:14:13 +02:00
Sebastian Dröge
51edbeb9d9
opus: Add proper support for multichannel audio
...
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge
4c8f76f05b
opusparse: Fix up pre-skip in OpusHead if upstream using GstAudioClippingMeta
...
Makes transmuxing from e.g. MPEG-TS to Ogg sample accurate.
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
8a837c6715
opusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead
...
oggdemux is outputting the meta now, and only outputs if it should really
apply to the current buffer. Previously we would skip N samples also if we
started the decoder in the middle of the stream.
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
d5389e71ff
opusenc: Add GstAudioClippingMeta to buffers that need to be clipped
...
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
483cb05af1
opusenc: Disable granule position calculations by the base class
...
It is doing the wrong thing because of the Opus pre-skip: while the timestamps
are shifted by the pre-skip, the granule positions are not shifted.
oggmux is doing the right thing here already.
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
619c750222
opusenc: Add some FIXME comments about calculating padding with LPC
...
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
f66afc47ac
opusenc: Encode exactly the amount of samples we got as input and put correct timestamps on it
...
The first frame has lookahead less samples, the last frame might have some
padding or we might have to encode another frame of silence to get all our
input into the encoded data.
This is because of a) the lookahead at the beginning of the encoding, which
shifts all data by that amount of samples and b) the padding needed to fill
the very last frame completely.
Ideally we would use LPC to calculate something better than silence for the
padding to make the encoding as smooth as possible.
With this we get exactly the same amount of samples again in an
opusenc ! opusdec pipeline.
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
c7d785a512
opusenc: Put lookahead/pre-skip into the OpusHead header
...
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
dbd894f133
opusdec: Assume 48kHz if no sample rate is given in the header
2015-11-02 09:36:46 +02:00
Sebastian Dröge
18c8abec6d
opusenc: Place 48kHz first in the caps
...
For all the other sample rates the encoder will have to resample internally.
2015-11-02 09:36:43 +02:00
Thiago Santos
7e834a5d85
opusdec: remove check for number of channels
...
opus decoder can convert from different number of channels, no
need to check, just let it negotiate and create a new decoder if
needed.
https://bugzilla.gnome.org/show_bug.cgi?id=755059
2015-09-15 16:00:43 -03:00
Miguel París Díaz
25f0787c1c
opusenc: improve deprecated properties docs
...
https://bugzilla.gnome.org/show_bug.cgi?id=754819
2015-09-11 23:33:19 +02:00
Miguel París Díaz
f000cd4963
opusenc: do not throw g_warning when getting deprecated properties
...
https://bugzilla.gnome.org/show_bug.cgi?id=754819
2015-09-11 23:33:19 +02:00
Thiago Santos
6517282af7
audioencoders: use template subset check for accept-caps
...
It is faster than doing a query that propagates downstream and
should be enough
Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
2015-08-17 10:07:54 -03:00
Thiago Santos
56b822f9f6
audiodecoders: use default pad accept-caps handling
...
Avoids useless check of downstream caps when handling an
accept-caps query
Elements: dtsdec, faad, gsmdec, mpg123audiodec, opusdec,
sbcdec, adpcmdec, sirendec
2015-08-15 13:51:16 -03:00
Sebastian Dröge
711589ebde
opus: Copy metadata in the (de)payloader, but only the relevant ones
...
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without tags or
with only the audio tag.
https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-11 12:46:06 +02:00
Nirbheek Chauhan
4be7e0377b
opuscommon: Use GString instead of snprintf for concating
...
Safer, easier to understand, and more portable. Also, skip
all this if the log level is too low.
2015-07-27 15:24:19 +01:00
Carlos Rafael Giani
a595874aac
opusdec: Fix PLC frame size calculations
...
Previously, PLC frames always had a length of 120ms, which caused audio
quality degradation and synchronization errors. Fix this by calculating an
appropriate length for the PLC frame.
The length must be a multiple of 2.5ms. Calculate a multiple of 2.5ms that
is nearest to the current PLC length. Any leftover PLC length that didn't
make it into this frame is accumulated for the next PLC frame.
https://bugzilla.gnome.org/show_bug.cgi?id=725167
2015-07-20 13:25:43 -04:00
Mersad Jelacic
a573cc4004
opusenc: Add bitrate to the tags
...
https://bugzilla.gnome.org/show_bug.cgi?id=750992
2015-06-22 13:49:34 +02:00
Sebastian Dröge
1ba8f82b94
opusdec: If channel/rate negotiation fails, fall back to stereo and 48kHz
2015-06-04 11:54:24 +02:00
Sebastian Dröge
bd8b25f08b
opusparse: Set up default header with 48kHz sample rate instead of 0
2015-06-04 11:52:40 +02:00
Sebastian Dröge
96ee9b274c
opusdec: gst_structure_fixate_field_nearest_int() only works if the structure has this field
...
Just set the rate/channels directly if the caps don't have this field.
2015-06-04 11:45:05 +02:00
Sebastian Dröge
c7d92b6cf5
opusdepay: Set multistream=FALSE on the Opus caps
...
The RTP Opus mapping only allows mono/stereo, and not multistream Opus
streams.
2015-05-04 11:23:16 +02:00
Jose Antonio Santos Cadenas
de827c792d
opusheader: Do not include rate in caps if it is 0
...
As expressed in gst_opus_header_create_caps, value 0 means unset.
Setting rate value to 0 make negotiation with decoder fail.
https://bugzilla.gnome.org/show_bug.cgi?id=748875
2015-05-04 10:50:42 +02:00
Tim-Philipp Müller
35808c27fa
opus: fix includes and compilation against opus in non-standard prefix
...
https://bugzilla.gnome.org/show_bug.cgi?id=748594
2015-04-28 17:24:04 +01:00
Mersad Jelacic
036f07e087
opus: don't use deprecated gst_buffer_new_and_alloc
...
Use the helper function available in the base class instead.
https://bugzilla.gnome.org/show_bug.cgi?id=748585
2015-04-28 16:36:02 +01:00
Arun Raghavan
f092c9cb3d
opus: Fix incorrect fall-through condition in property getter
2015-04-03 11:47:09 +05:30
Olivier Crête
45422791f7
rtpopuspay: Forward stereo preferences from caps upstream
...
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2015-03-25 15:26:55 -04:00
Olivier Crête
c82a2d4aa0
rtpopuspay: Set the number of channels to 2 as per RFC draft
...
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2015-03-25 15:25:29 -04:00
Luis de Bethencourt
fb758d019c
opusenc: fall through switch statement
...
Adding a comment makes coverity happy and quells the issue.
CID 1291629
2015-03-24 15:14:05 +00:00
Sebastian Dröge
9dd671abe3
opusenc: Set output format immediately after creating the encoder instance
...
We know the caps by then, there's no need to wait until we actually receive
the first buffer.
2015-03-23 13:15:30 +01:00
Sebastian Dröge
948fbe154f
opusenc: Remove another unused variable
2015-03-23 13:13:35 +01:00
Sebastian Dröge
42b5cc8938
opusenc: Remove useless headers and header_sent variables from the instance struct
...
They are only used inside a single function.
2015-03-23 13:12:25 +01:00
Sebastian Dröge
856bb027f9
opus: Handle sprop-stereo and sprop-maxcapturerate RTP caps fields
...
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2015-03-23 12:24:55 +01:00
Sebastian Dröge
a128502221
opusdec: Take channels and sample rate from the caps if we have no stream header
2015-03-23 12:09:25 +01:00
Sebastian Dröge
c2f38cd054
opusdec: Reset the decoder if the caps change
2015-03-23 12:09:09 +01:00
Sebastian Dröge
bb5b0f2d12
opusdec: Take output sample rate from the stream headers too
...
This way we let opusdec do the resampling if needed and don't carry
around buffers with a too high sample rate if not required.
While Opus always uses 48kHz internally, this information from the
header specifies which frequencies are safe to drop.
2015-03-23 11:57:09 +01:00
Sebastian Dröge
716eaf765b
opusheader: Put number of channels and sample rate into the caps
...
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2015-03-23 11:56:09 +01:00
Vincent Penquerc'h
22d9c9f763
opusenc: replace cbr and constrained-vbr properties with an enum
...
It was deemed confusing before.
https://bugzilla.gnome.org/show_bug.cgi?id=744909
2015-03-12 14:04:20 +00:00
Vincent Penquerc'h
b9c521c0ec
opusdec: fix latency query in FEC case
...
The max latency parameter is "the maximum time an element
synchronizing to the clock is allowed to wait for receiving all
data for the current running time" (docs/design/part-latency.txt).
https://bugzilla.gnome.org/show_bug.cgi?id=744338
2015-03-04 11:04:29 +00:00
Vincent Penquerc'h
0e809604f5
rtpopuspay: default encoding name to OPUS
...
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 14:30:10 +00:00
Vincent Penquerc'h
e05135aae5
rtpopuspay: make caps writable before truncating them
...
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 14:05:06 +00:00
Vincent Penquerc'h
3be7d0748a
rtpopuspay: negotiate the encoding name
...
Chrome uses a different encoding name that gstreamer.
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 13:53:54 +00:00
Sebastian Dröge
0a20954769
opusenc: Remove g_warnings() for the deprecated audio property
...
Otherwise there are g_warnings() already when just using gst-inspect or
dumping a pipeline graph.
2015-02-18 17:47:50 +02:00
Sebastian Dröge
037928dcf6
Improve and fix LATENCY query handling
...
This now follows the design docs everywhere, especially the maximum latency
handling.
https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 14:16:21 +01:00
Vincent Penquerc'h
5c44bceeb3
opusenc: change audio property to audio-type
...
This is now an enum with values generic (default) and voice.
https://bugzilla.gnome.org/show_bug.cgi?id=740891
2015-01-29 13:23:57 +00:00
Thiago Santos
4c883e4ad2
opusenc: plug ref leak of template caps
...
the pad template caps is already a new ref. No need to copy.
2014-12-17 22:13:17 -03:00
Vincent Penquerc'h
79b56ebcc9
opusparse: fix frame size determination
...
https://bugzilla.gnome.org/show_bug.cgi?id=741321
2014-12-15 15:23:35 +00:00