Commit graph

15 commits

Author SHA1 Message Date
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
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
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
15369ba016 audioaggregator: Print a message when a buffer is late
https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00
Olivier Crête
acf7745188 audioaggregator: Don't re-send the caps if they did not change
https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:41:45 -04:00
Olivier Crête
1eef58c3ce audioaggregator: Split base class from audiomixer
Also:
-  Don't modify size on early buffer
   The size is the size of the buffer, not of remaining part.
- Use the input caps when manipulating the input buffer
   Also store in in the sink pad
- Reply to the position query in bytes too
- Put GAP flag on output if all inputs are GAP data
- Only try to clip buffer if the incoming segment is in time or samples
- Use incoming segment with incoming timestamp
   Handle non-time segments and NONE timestamps
- Don't reset the position when pushing out new caps
- Make a number of member variables private
- Correctly handle case where no pad has a buffer
  If none of the pads have buffers that can be handled, don't claim to be EOS.
- Ensure proper locking
- Only support time segments

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