Commit graph

101 commits

Author SHA1 Message Date
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
Edward Hervey 2c4dfa101a Update disted backup ORC files 2018-02-15 07:14:20 +01:00
Tim-Philipp Müller 8c5725c4ea audiomixer, audiointerleave: add to build
https://bugzilla.gnome.org/show_bug.cgi?id=791218
2018-02-13 16:38:32 +00: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
Tim-Philipp Müller 6c0744a5fc Remove GstAggregator from -bad, moved to core
https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-02 16:14:36 +00:00
Mathieu Duponchelle 9e4b3fbd82 aggregator: Remove klass->sinkpads_type
This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

https://bugzilla.gnome.org/show_bug.cgi?id=789986
2017-11-22 16:52:29 +01:00
Stefan Sauer 8f4479b874 aggregator: fix type for latency property (int64 -> GStClockTime)
The value is used as GstClockTiem in the code. Adapt the hack^H^H^H^Hcode
in live-adder.
2017-10-23 11:41:17 +02:00
Tim-Philipp Müller 1692f910e7 audiomixer: document caps negotiation raciness
Until we land conversion support in audioaggregator (#773762).

https://bugzilla.gnome.org/show_bug.cgi?id=777915
2017-07-14 13:54:48 +01: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 7b2e201bfa audiointerleave: Take object lock while modifying channel count 2017-05-20 17:52:00 +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
Nicolas Dufresne 40f4fc3d84 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Thibault Saunier 3a9a603276 docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Douglas Bagnall 974cbfb3c4 audiointerleave: don't overflow channel map with >64 channels
When there are more than 64 channels, we don't want to exceed the
bounds of the ordering_map buffer, and in these cases we don't want to
remap at all. Here we avoid doing that.

Based on a patch originally for plugins-good/interleave in
https://bugzilla.gnome.org/show_bug.cgi?id=780331
2017-03-31 14:11:56 +03:00
Nirbheek Chauhan 64c5b610d9 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:35:54 +01:00
Vineeth TM fe159a6847 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Sebastian Dröge a7b86878fb audio: Move audioaggregator base class to a library
It's useful enough already to be used in other elements for audio aggregation,
let's give people the opportunity to use it and give it some API testing.

https://bugzilla.gnome.org/show_bug.cgi?id=760733
2016-01-22 12:39:48 +02:00
Vineeth TM f6cd84c4e6 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Tim-Philipp Müller 9f69e97935 audiomixer: register function name for debugging just once
Not every time aggregate is called...
2015-11-24 15:17:30 +00:00
Olivier Crête 1369924fa0 audioaggregator: Improve log messages
Make the level of log messages saner and improve some.
2015-11-02 19:40:28 -05:00
Olivier Crête 7161795a44 liveadder: Make latency property be a uint in millisecs
This restores roughly the same behaviour as the old liveadder element.
Except that the latency now also includes the output-buffer-duration.

https://bugzilla.gnome.org/show_bug.cgi?id=757050
2015-10-28 18:52:24 -04:00
Tim-Philipp Müller 45081ef6f1 liveadder: latency property is an uint64 in audiomixer 2015-10-12 09:42:37 +01:00
Olivier Crête 8cce2ccbf2 liveadder: Remove plugin, replace by compat subclass of audiomixer
New subclass with a similar behaviour as the old liveadder, but
a slightly different API as the latency is in nanoseconds, not
milliseconds. Also, the new liveadder has a effective latency that
is latency + output-buffer-duration. In practice, just setting a non-zero
latency with the new audiomixer gives you the right behavior in 99% of the
cases.
2015-10-11 11:04:38 +01:00
Vineeth TM 11ab8b7965 audioaggregator: Fix build error
Build error due to wrong argument type in debug message
aagg->priv->offset and next_offset are of type int64, but uint64
formatter is being used in logs. Changing all those to int64

https://bugzilla.gnome.org/show_bug.cgi?id=756065
2015-10-07 11:20:35 +01:00
Sebastian Dröge 52ea2667c6 audioaggregator: Select the initial offset based on the start segment position
instead of always using 0. Otherwise we might output a lot of silence in the
beginning instead of outputting from the relevant position.

https://bugzilla.gnome.org/show_bug.cgi?id=755623
2015-10-01 17:40:59 +02:00
Tim-Philipp Müller ddbae168b8 audiomixer: fix deadlock when G_DISABLE_ASSERT is not defined
This makes the audiomixer unit test time out in master.
Broke with 587e7c4
2015-09-26 10:21:41 +01:00
Sebastian Dröge 94342ca11a audioaggregator: Stop using deprecated gst_segment_to_position() 2015-09-26 00:17:55 +02:00
Sebastian Dröge 3eb52b293e audioaggregator: Only skip the remaining part of a GAP buffer
We might've queued up a GAP buffer that is only partially inside the current
output buffer (i.e. we received it too late!). In that case we should only
skip the part of the GAP buffer that is inside the current output buffer, not
also the remaining part. Otherwise we forward this pad too far into the future
and break synchronization.
2015-09-18 18:00:05 +02:00
Jan Schmidt e88ecc367b Don't throw compiler warnings with G_DISABLE_ASSERT
Disable code that warns about unused variables when G_DISABLE_ASSERT
is defined, as it is in tarballs and pre-releases.
2015-09-18 00:29:51 +10:00
Sebastian Dröge 41fae5fa5d audioaggregator: Fix mixup of running times and segment positions
We have to queue buffers based on their running time, not based on
the segment position.

Also return running time from GstAggregator::get_next_time() instead of
a segment position, as required by the API.

Also only update the segment position after we pushed a buffer, otherwise
we're going to push down a segment event with the next position already.

https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:57:00 +02:00
Sebastian Dröge c91e32bbf7 audioaggregator: Use stream time in the position query instead of segment position
https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:56:51 +02:00
Olivier Crête c2794d1ad0 audiointerleave: Avoid caps processing if not yet negotiated
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête f6507af946 audioaggregator: On timeout, resync pads with not enough data
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête 08df711c0c aggregator: Queue "latency" buffers at each sink pad.
In the case where you have a source giving the GstAggregator smaller
buffers than it uses, when it reaches a timeout, it will consume the
first buffer, then try to read another buffer for the pad. If the
previous element is not fast enough, it may get the next buffer even
though it may be queued just before. To prevent that race, the easiest
solution is to move the queue inside the GstAggregatorPad itself. It
also means that there is no need for strange code cause by increasing
the min latency without increasing the max latency proportionally.

This also means queuing the synchronized events and possibly acting
on them on the src task.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête 9ab4b2e94e audioaggregator: Register function name
Otherwise, it sometimes segfaults with debugging enabled
2015-07-22 19:30:19 -04:00
Olivier Crête ee1a50ef70 audioaggregator: Use 1.0 style buffer allocation 2015-07-22 19:30:12 -04:00
Nirbheek Chauhan 74d7944cbb audioaggregator: Sync pad values before aggregating
We need to sync the pad values before taking the aggregator and pad locks
otherwise the element will just deadlock if there's any property changes
scheduled using GstController since that involves taking the aggregator and pad
locks.

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=749574
2015-07-22 19:50:38 +01:00
Olivier Crête a1cdede940 audioaggregator: Read output buffer duration with lock held 2015-07-21 21:55:25 -04:00
Tim-Philipp Müller f64ebd1d21 audiomixer: fix misleading documentation copied from adder 2015-06-09 14:37:36 +01:00
Sebastian Dröge baff8aa729 Release 1.5.1 2015-06-07 10:55:35 +02:00
Olivier Crête 0fbf2da1bb audiointerleave: Always have "channels" be the actual pad count
Don't force it anywhere

https://bugzilla.gnome.org/show_bug.cgi?id=750252
2015-06-01 19:43:20 -04:00
Olivier Crête 47d7b546c9 audiointerleave: Use the channel count from the set caps
This is the same number that was used to allocate the buffer
2015-06-01 19:42:49 -04:00
Stefan Sauer af5c05caf1 Revert "doc: Workaround gtkdoc issue"
This reverts commit ff6c736fe0.

This is fixed by the gtk-doc 1.23 release.

<para> cannot contain <refsect2>:
http://www.docbook.org/tdg/en/html/para.html
http://www.docbook.org/tdg/en/html/refsect2.html
2015-05-18 20:16:32 +02:00
Nicolas Dufresne 891c7c6149 doc: Workaround gtkdoc issue
With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the
refsect2 into para.
2015-05-16 23:38:14 -04:00
Olivier Crête 5d78c5cca6 audiomixer: Allow downstream caps with a non-default channel-mask
Instead of failing, take the downstream channel mask if the channel
count is 1.
2015-04-01 20:32:41 -04:00
Luis de Bethencourt 1011a50766 audioaggregator: check sink caps are valid 2015-03-24 16:18:22 +00:00
Luis de Bethencourt 8199405dd7 Revert "audioaggregator: check sink caps are valid"
This reverts commit 6d4d0d1cdf.

Never put code with side effects into an assertion, it can be compiled out
2015-03-24 16:17:00 +00:00
Luis de Bethencourt a7cfb6240f audioaggregator: check sink caps are valid
CID #1291622
2015-03-24 15:53:17 +00:00
Olivier Crête edde3c326e audiointerleave: Set src caps in aggregate
This prevents races between the setcaps of the sink pads

https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00