Mathieu Duponchelle
a59fbba141
audioaggregator: unref converted buffer after gst_buffer_replace
2018-04-13 01:07:21 +02:00
Nirbheek Chauhan
b5698995f1
audiobasesrc: posting errors should be always be safe
...
Don't try to signal an error in the ringbuffer if it hasn't been
allocated yet.
https://bugzilla.gnome.org/show_bug.cgi?id=794611
2018-04-09 17:25:32 +05:30
Nirbheek Chauhan
baadc3b302
audioringbuffer: Don't spam INFO for every buffer
...
This makes GST_DEBUG=4 outputs too spammy, and such frequent messages
are meant to go into DEBUG or TRACE anyway.
2018-04-07 11:09:58 +05:30
Edward Hervey
22c9e5f7c1
libs: Documentation cleanup
...
* Fix wrong naming, wrong types and typos
* Add missing sections
* Add missing documentation for entries
* Explicitely mark private structure entries
* Remove items that never existed
2018-04-02 08:53:28 +02:00
Edward Hervey
a034018a75
audio-aggregator: Check return values
...
And copy over already-parsed information
CID #1427140
2018-03-23 14:25:21 +01:00
Alessandro Decina
345aa2cd9e
meson: libs: use gnome.mkenums_simple() to generate enumtypes files
...
This way we no longer need custom wrapper scripts or template files.
2018-03-22 13:15:35 +00:00
Sebastian Dröge
b058de9d90
audiostreamalign: Mark the whole type as new in 1.14
2018-03-15 09:58:11 +02:00
Tim-Philipp Müller
98a8d7eaf5
meson: install new audio-prelude.h
2018-03-13 13:49:57 +00:00
Tim-Philipp Müller
371e3e460a
audio: GST_EXPORT -> GST_AUDIO_API
...
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 10:36:56 +00:00
Mathieu Duponchelle
e9be107e4a
audioaggregator: fix channel-mask negotiation
...
When outputting more than two channels, a channel-mask has to be
specified in the output caps.
We follow the same heuristic as other cases, when downstream
does not specify a channel-mask, we use that of the first
configured pad, and if there was none we generate a fallback
mask.
https://bugzilla.gnome.org/show_bug.cgi?id=794257
2018-03-12 17:35:53 +01:00
Thibault Saunier
e916ef08fd
audio: Add audioaggregator.h in audio.h
2018-03-11 12:13:32 -03:00
Mathieu Duponchelle
22981e8a42
Port to latest GstAggregator segment API
...
The aggregator segment is now exposed on the src pad
https://bugzilla.gnome.org/show_bug.cgi?id=793944
2018-03-01 15:33:25 +01:00
Mathieu Duponchelle
318eb61e23
audioaggregator: remove GstAudioAggregator->info
...
As we now require subclasses to use a subclass of
GstAudioAggregatorPad, we can reuse its info field
https://bugzilla.gnome.org/show_bug.cgi?id=793943
2018-03-01 15:33:25 +01:00
Mathieu Duponchelle
10835e9919
audioaggregator: refactor conversion API
...
For the rationale, see:
https://bugzilla.gnome.org/show_bug.cgi?id=793917
Also test audiomixer conversion of current output buffer
2018-03-01 00:40:24 +01:00
Sebastian Dröge
fae7f790be
audioaggregator: Document that the pad's audio info is read-only and needs the object lock
...
Also fix indentation in the header a bit.
2018-02-28 15:23:25 +02:00
Mathieu Duponchelle
06ae49f525
audio-converter: fix declaration-after-statement
2018-02-15 21:08:08 +01:00
Mathieu Duponchelle
9cf4293bde
audio-converter: add a convenience conversion method
...
This is useful from python bindings
https://bugzilla.gnome.org/show_bug.cgi?id=793492
2018-02-15 20:51:30 +01:00
Mathieu Duponchelle
6a4a82f355
gst_audio_converter_new: update annotations
...
https://bugzilla.gnome.org/show_bug.cgi?id=793492
2018-02-15 20:51:30 +01:00
Mathieu Duponchelle
9046e6001b
AudioConverter: register as boxed type
...
https://bugzilla.gnome.org/show_bug.cgi?id=793492
2018-02-15 20:51:30 +01:00
Mathieu Duponchelle
3d50d0e8b0
audio-info: annotate gst_audio_info_set_format
...
https://bugzilla.gnome.org/show_bug.cgi?id=793492
2018-02-15 20:51:30 +01:00
Edward Hervey
2c4dfa101a
Update disted backup ORC files
2018-02-15 07:14:20 +01:00
Mathieu Duponchelle
73d2031ffc
gstaudiopack.orc: pack_u32be_swap: actually swap
...
Fixes:
gst-launch-1.0 audiotestsrc ! audio/x-raw, format=U32BE ! \
audioconvert ! autoaudiosink
2018-02-15 01:32:54 +01:00
Tim-Philipp Müller
54655196e7
audioaggregator: remove declaration for function that doesn't exist
2018-02-13 17:16:53 +00:00
Tim-Philipp Müller
4984c84505
docs: add GstAudioAggregator to docs
2018-02-13 17:10:42 +00:00
Tim-Philipp Müller
4647d6684f
GstAudioAggregator: hook up to build
...
https://bugzilla.gnome.org/show_bug.cgi?id=791218
2018-02-13 16:09:09 +00:00
Tim-Philipp Müller
ab758a9a39
audioaggregator, audiomixer, audiointerleave: move from -bad to -base
...
https://bugzilla.gnome.org/show_bug.cgi?id=791218
2018-02-13 15:56:49 +00:00
Tim-Philipp Müller
c443e33a3a
meson: use built-in pic kwarg when building static helper libs
...
instead of passing -fPIC manually.
2018-01-30 20:33:17 +00:00
Tim-Philipp Müller
29534c3829
Update for renamed aggregator pad API
...
https://bugzilla.gnome.org/show_bug.cgi?id=791204
2018-01-23 09:01:00 +00:00
Edward Hervey
558b37d889
audioaggregator: Don't leak pads
...
all audioaggregator subclasses were leaking the first sink pad :)
2017-12-20 15:03:44 +01:00
Mathieu Duponchelle
164b5a7f94
audioaggregator: implement input conversion
...
https://bugzilla.gnome.org/show_bug.cgi?id=786344
2017-12-19 23:39:37 +01:00
Havard Graff
1066690b14
audiodecoder: fix buffer leak in error code path
2017-12-05 20:10:58 +00:00
Thibault Saunier
a37f4eeff8
audio: Add missing G_BEGIN/END_DECLS
2017-12-01 10:15:56 -03:00
Sebastian Dröge
b9aaa7f4f2
audiobasesink: Print signed time offset as a signed number
2017-11-08 19:24:55 +02:00
Sebastian Dröge
9bbcccc21e
audiostreamalign: Add G_BEGIN_DECLS/G_END_DECLS
2017-11-08 19:24:55 +02:00
Tim-Philipp Müller
fc94627778
audioaggregator: use new gst_element_foreach_sink_pad()
...
Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.
https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-11-02 13:02:07 +00:00
Tim-Philipp Müller
5d3795163b
audioaggregator: make class padding larger
2017-11-02 11:44:54 +00:00
Edward Hervey
cb0b73672c
Update disted orc file
...
For latest orc fixes
2017-10-31 11:57:23 +01:00
Ashish Kumar
346c24dc4b
gst-plugins-base: gstaudiochannels: Handled buffer mapping failure
...
https://bugzilla.gnome.org/show_bug.cgi?id=789458
2017-10-25 13:04:28 +02:00
Matthew Waters
06aba17d19
Revert "audioencoder: flush encoder in transition PAUSED->READY"
...
This reverts commit 2dcdd13512
.
2017-10-22 01:00:06 +11:00
Matthew Waters
b8369ba20d
Revert "audiodecoder: flush decoder in transition PAUSED->READY"
...
This reverts commit e7cf4c058d
.
2017-10-22 01:00:03 +11:00
Olivier Crête
c2b462837b
audioaggregator: Accept buffer with no data, but duration and gap flag
...
These are produced from GAP events by the base class.
https://bugzilla.gnome.org/show_bug.cgi?id=784846
2017-10-21 12:06:08 +02:00
Nicola Murino
2dcdd13512
audioencoder: flush encoder in transition PAUSED->READY
...
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:04 +11:00
Nicola Murino
e7cf4c058d
audiodecoder: flush decoder in transition PAUSED->READY
...
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:54:54 +11:00
Stefan Sauer
023170e2f8
audioaggregator: improve readability in offset calculation
...
Don't reuse the offset variables will contain a sample offset for an
intermediate time value. Instead add a segment_pos variable of type
GstClockTime for this. Use The clock-time macros to check if we got
a valid time.
2017-10-15 10:29:20 +02:00
Stefan Sauer
bd34243177
audioaggregator: move comment to the place it is meant to be
...
This probably got shifted after some changes.
2017-10-14 18:20:30 +02:00
Mathieu Duponchelle
d4db88772b
audioconvert: allow empty mix matrix
...
When an empty mix matrix is passed, audio-channel-mixer
will now generate a (potentially truncated) identity matrix,
this replicates the behaviour of audiomixmatrix in first-channels
mode.
https://bugzilla.gnome.org/show_bug.cgi?id=788833
2017-10-11 22:57:38 +02:00
Mathieu Duponchelle
8e2805cf06
audio-converter: remove unused mix_matrix private field
2017-10-11 17:00:08 +02:00
Stefan Sauer
1b84283396
audioaggregator: remove buffer!=NULL check
...
Acording to the logic this cannot happen (we already check this before). So
add a assert like we do above and remove the check. This make it clearer that
we check for the offset range.
Also remove a dead assignment since we reassign this a few lines below.
2017-10-05 18:12:29 +02:00
Stefan Sauer
f46d80f07d
audioaggreator: update docs
...
Remove wrote references to collectpads. Document the units.
2017-10-05 17:57:35 +02:00
Havard Graff
43985b363d
meson: remove vs_module_defs
...
GST_EXPORT should handle it.
2017-10-05 13:53:14 +01:00
Stefan Sauer
6ecfd599a5
audioaggregator: pass blocksize to mix_buffer()
...
No need to recalc the value twice per run. Establishes that it is the same
value.
2017-10-05 08:57:09 +02:00
Stefan Sauer
926fed92e9
audioaggregator: rename _fill_buffer() to _queue_new_buffer()
...
It does not fill a buffer. Rename it and add a short comment.
2017-10-05 08:57:09 +02:00
Reynaldo H. Verdejo Pinochet
e81c334ca9
Use proper GtkDoc notation for NULL/FALSE/TRUE
2017-10-03 14:31:18 -07:00
Stefan Sauer
5fd4e71da3
audioaggregator: reduce variable scope
...
This is a non-functional change that makes the code more alike to the previous
check. I should be more obvious when we drop a buffer.
2017-10-02 17:01:36 +02:00
Stefan Sauer
17848d7c0c
audioaggregator: update comment for aggregate
...
Replace collect-pads left-over. Remove first paragraph, we're not doing this.
Remove 3), 4) since this is not per pad.
2017-10-02 17:01:36 +02:00
Thibault Saunier
c610076d85
meson: Add mssing GstBase-1.0 include in the gir generation
2017-09-28 21:56:29 -03:00
Sebastian Dröge
bf68e74403
audio: Add stream align API for getting timestamp at discont and number of samples since discont
...
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:24 +03:00
Sebastian Dröge
d2fd740388
audio: Add reverse playback support to GstAudioStreamAlign
...
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:07 +03:00
Sebastian Dröge
ec1e20ffe5
audio: Add helper object for audio discontinuity detection and sample alignment
...
This is the same code that is in decklinkaudiosrc, audioringbuffer,
audiomixer and various other places. Have it once instead of copying it
everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:05 +03:00
Mathieu Duponchelle
4196e67ff1
[API]: GST_AUDIO_CONVERTER_OPT_MIX_MATRIX
...
Taken from audiomixmatrix, credits to Vivia Nikolaidou
https://bugzilla.gnome.org/show_bug.cgi?id=785471
2017-09-22 16:19:59 +02:00
Mathieu Duponchelle
877d6faeea
[API]: gst_audio_channel_mixer_new_with_matrix
...
+ Refactor previous constructor to call on that new constructor
+ Reimplement is_passthrough to strictly check whether the matrix
is an identity matrix, comparing channel-masks was incorrect:
the mixer may be remixing from a list of positions to the same
list of positions, but ordered differently, and reciprocally,
the mixer may be remixing from a list of positions to another
list of positions identically ordered
+ Remove unused tmp field, must have been a refactoring leftover
https://bugzilla.gnome.org/show_bug.cgi?id=785471
2017-09-22 16:19:58 +02:00
Stefan Sauer
ceee4db9d0
audioaggregator: fix typo in comment
2017-09-17 21:06:48 -07:00
Tim-Philipp Müller
ece4a096a1
libs: add some more missing GST_EXPORT
2017-08-10 10:27:23 +01:00
Mark Nauwelaerts
00fa39befa
audioencoder: also adjust sample count upon discont to avoid ts overflow
...
Only adjusting the base_ts might lead to a negative ts and as such integer
overflow into a huge timestamp which then propagates into the granulepos
and so on. Instead, resync to incoming buffer timestamp using both base_ts
and sample count rather than only base_ts.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=785948
2017-08-09 09:32:55 +02:00
Stefan Sauer
4080b844c0
audioaggregator: use local var
...
Instead of the self->priv-> deref use the local var we created already.
2017-07-26 09:43:52 +02:00
Tim-Philipp Müller
d95e62be82
audio: mark symbols explicitly for export with GST_EXPORT
2017-07-18 12:46:57 +01:00
Stefan Sauer
35a4149caf
aggregator: code cleanups
...
Fix comment typos, some copy'n'paste in logging. Add more doc comments.
2017-07-13 22:02:17 +02:00
Olivier Crête
930c3cea40
audioaggregate: Don't hold object locks across calls to aggregate_one
...
https://bugzilla.gnome.org/show_bug.cgi?id=782878
2017-05-21 18:44:53 +02:00
Olivier Crête
55ab23cc30
audioaggregator: Use downstream allocator and params if available
...
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Olivier Crête
8a302f1815
aggregator: Remove unused GST_FLOW_NOT_HANDLED
2017-05-20 16:21:17 +02:00
Matthew Waters
57673e608e
aggregator: add simple support for caps handling
...
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.
https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
Olivier Crête
26819ba296
aggregator: Delay clipping to output thread
...
This is required because the synchronized events like caps or segments
may only be processed on the output thread.
https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
1e7aaf775f
aggregator: Simplify clip function
...
The return value was ignored anyway
https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Sebastian Dröge
2a8784e218
audioclock: Sink the reference in the constructor
...
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.
And mark the function correctly as (transfer full), which it already was
before.
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Nicolas Dufresne
1ceb40cd1e
audioringbuffer: Accept MPEG 1 layer 3 version 2.5
...
https://bugzilla.gnome.org/show_bug.cgi?id=781929
2017-05-16 15:37:16 -04:00
Tim-Philipp Müller
d7dd381f78
audio: mark symbols explicitly for export with GST_EXPORT
2017-05-16 15:22:26 +01:00
Tim-Philipp Müller
60e9629860
g-i: no need to load registry in g-i scanner
2017-05-04 23:55:20 +01:00
Sebastian Dröge
a3656ba29b
libs: Check if meta transform_func is NULL before using it
...
https://bugzilla.gnome.org/show_bug.cgi?id=782050
2017-05-02 14:31:14 +03:00
Tim-Philipp Müller
5185cce994
audio: resampler: fix typos in docs
2017-04-13 16:40:02 +01:00
Rico Tzschichholz
07a427b403
meson: Pass --c-include accordingly to GIR builds
2017-04-13 12:23:32 +01:00
Sebastian Dröge
8b468c3c36
audio: Generate audiobasesink/src and audiocdsrc GLib enums automatically
...
And ensure that GstAudioBaseSrcSlaveMethod's re-timestamp stays
re-timestamp and doesn't become retimestamp.
2017-04-09 11:49:50 +03:00
Thibault Saunier
099ac9faf2
docs: Convert gtkdoc comments to markdown
...
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Jan Schmidt
5903e2dfbb
audioringbuffer: Also add FLAC to debug strings.
...
Oops, also add FLAC to the debug strings array.
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:46:42 +11:00
Jan Schmidt
04c14de1d1
audioringbuffer: Prevent overflow of debug names array
...
Add new audio types to the list of strings used for debug
so we don't index past the end of that array.
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:42:33 +11:00
Sebastian Dröge
f939f05304
audio-resampler: Fix integer overflow in clamping code
...
https://bugzilla.gnome.org/show_bug.cgi?id=777921
2017-01-30 12:35:04 +02:00
Tim-Philipp Müller
83e84d5acf
audio: add since markers to docs for new enums
...
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 20:04:54 +00:00
Vincent Penquerc'h
6134dab3bb
audio: add FLAC to GstAudioRingBufferFormatType
...
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:47:39 -05:00
Olivier Crete
c46607095e
audioringbuffer: Also support raw AAC
...
Support raw AAC streams without the ADTS header
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:45:50 -05:00
Evan Nemerson
98064ed9bf
audioringbuffer: add set_callback_full() for g-i
...
https://bugzilla.gnome.org/show_bug.cgi?id=678301
2016-12-22 15:34:58 +00:00
Thibault Saunier
8bbf67c37d
audio: Fix introspection annotation
...
In gst_audio_check_valid_channel_positions the mask
is an out parameter.
And minor conversion from a print to a GST_ERROR.
2016-12-16 11:27:31 -03:00
Vincent Penquerc'h
6ee5922f2f
audioringbuffer: do not require 4 byte multiple for encoded MPEG
...
Bytes per frame doesn't make sense for encoded audio.
https://bugzilla.gnome.org/show_bug.cgi?id=776038
2016-12-13 10:16:07 +00:00
Sebastian Dröge
71e819ae7d
audio-converter: In passthrough, also don't copy if in and out block are the same
...
In and out array are usually different, they are stack allocated arrays.
However the blocks inside them still can be the same.
https://bugzilla.gnome.org/show_bug.cgi?id=775369
2016-11-30 10:43:50 +02:00
Petr Kulhavy
010b9547d3
audio-converter: optimize endian conversion
...
Optimize LE<->BE conversion by adding a dedicated fast path instead of
using the generic converter. Implement transform_ip function in order to do the
endian swap in place.
This saves buffer allocation for the intermediate format, can be done in place
and also performs the conversion in one step instead of unpack-convert-pack.
For all bit widths the naive algorithm is implemented, which provides the best
performance when compiled with -O3. ORC was considered but eventually removed
as it requires a dedicated function for in-place conversion (due to the
"restrict" parameters).
A more complex algorithm for the 24-bit conversion with unrolled loop and
32-bit processing is implemented in the #if 0 section. It performs better if
compiled with -O2. With -O3 however the naive algorithm performs better.
https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:17 +02:00
Petr Kulhavy
640c54d8f8
audio-convert: simplify the chain free process
...
It is not needed to store a pointer to every single chain element to free it.
Instead walk the channel list backwards and free the chain elements one by one.
Rename GstAudioConverter->chain_pack to chain_end.
https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:13 +02:00
Scott D Phillips
e740103669
videodecoder, audiodecoder: parse format before checking in src_query_default
...
The logic change in these commits misordered the parsing and checking of
format in position queries:
2b06e54
videodecoder: Don't answer BYTES queries
1840b02
audio: Don't answer BYTES queries
https://bugzilla.gnome.org/show_bug.cgi?id=774484
2016-11-16 07:57:31 +11:00
Jan Schmidt
1840b0233a
audio: Don't answer BYTES queries
...
Refuse to answer BYTES queries ourselves. The only
time they make sense is on raw elementary streams,
in which case upstream would already have answered.
They especially don't make sense for encoders to answer
based on upstream values - although perhaps later
we could make it do TIME->BYTES conversion on the source
pad based on bitrate.
https://bugzilla.gnome.org/show_bug.cgi?id=757631
2016-11-16 00:14:47 +11:00
Scott D Phillips
6e71583d07
Cast away const from GstMetaInfo in *_get_meta_info() functions
...
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.
https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:52:22 +02:00
Thibault Saunier
5bdb38995f
meson: Fix build when orc is disabled
...
Making sure not to use the orc_dep variable in case
orc has been explicitely disabled.
2016-11-14 17:26:02 -03:00
Thibault Saunier
6917cb629e
meson: Generate girs
...
https://bugzilla.gnome.org/show_bug.cgi?id=773944
2016-11-09 18:06:19 -03:00
Petr Kulhavy
54f4d3772c
audio-channels: map buffer read-write only if channels differ
...
gst_audio_buffer_reorder_channels() was always mapping the buffer read-write
regardless whether any reordering was needed. If the from and to channel order
is identical return immediately without remapping the buffer.
Add a small helper function gst_audio_channel_positions_equal() which is used
in both gst_audio_reorder_channels() and gst_audio_buffer_reorder_channels().
https://bugzilla.gnome.org/show_bug.cgi?id=773833
2016-11-09 19:42:47 +02:00