Commit graph

1149 commits

Author SHA1 Message Date
Mathieu Duponchelle
b2413d46ed audiodecoder: Push pending events before sending EOS.
Segments are added to the pending events, and pushing a segment
is mandatory before sending EOS.

+ Adds a test.

https://bugzilla.gnome.org/show_bug.cgi?id=740853
2014-12-05 12:04:04 +01:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Peter G. Baum
c734fbc139 audio-channels: allow partially valid channel_mask
Since WAVEFORMATEXTENSIBLE allows to have more channels than
bits in the channel mask we should allow this, too, to avoid
loss of information.

https://bugzilla.gnome.org/show_bug.cgi?id=733405
2014-10-14 10:29:56 +02:00
Thiago Santos
a0b25a570a audiodecoder: should post DECODE errors and not ENCODE
Fix error code for audio decoder
2014-10-13 22:26:29 -03:00
Arun Raghavan
c47b005197 audio: Fix up a comment in GstAudioBaseSink
Rewrote the comment to not be PulseAudio-specific.
2014-09-29 19:46:32 +05:30
Arun Raghavan
324ebd19e3 audio: Trivial comment for unhandled MPEG-2 payloading case
The spec mentions a version of the MPEG-2 frame with a base frame and
extension frame. I don't have IEC 13818-3 to figure out what that is,
and don't see any references in search results, so it's a FIXME for now.

https://bugzilla.gnome.org/show_bug.cgi?id=736797
2014-09-27 10:40:27 +05:30
Arun Raghavan
2965b796bc audio: Fixes for MPEG-2 LSF IEC61937 payloading
The low sample frequency case for MPEG-2 is <=12kHz (the 32kHz number
applies to MPEG-1).

https://bugzilla.gnome.org/show_bug.cgi?id=736797
2014-09-27 10:40:27 +05:30
Anuj Jaiswal
798ff6e561 audio: correct condition for MPEG case.
Signed-off-by: Anuj Jaiswal <anuj.jaiswal@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=736797
2014-09-27 10:40:27 +05:30
Thiago Santos
8242676dc2 audiosink: compensate for segment restart with clock's time_offset
When playing chained data the audio ringbuffer is released and
then acquired again. This makes it reset the segbase/segdone
variables, but the next sample will be scheduled to play in
the next position (right after the sample from the previous media)
and, as the segdone is at 0, the audiosink will wait the duration
of this previous media before it can write and play the new data.

What happens is this:
pointer at 0, write to 698-1564, diff 698, segtotal 20, segsize 1764, base 0

it will have to wait the length of 698 samples before being able to write.

In a regular sample playback it looks like:
pointer at 677, write to 696-1052, diff 19, segtotal 20, segsize 1764, base 0

In this case it will write to the next available position and it
doesn't need to wait or fill with silence.

This solution is borrowed from pulsesink that resets the clock to
start again from 0, which makes it reset the time_offset to the time
of the last played sample. This is used to correct the place of
writing in the ringbuffer to the new start (0 again)

https://bugzilla.gnome.org/show_bug.cgi?id=737055
2014-09-24 10:22:54 -03:00
Stefan Sauer
5f0aad6f42 audioencoder: reshuffle code in error handling
Move the assert to the error handling block at the end of the function so the
the logging is still triggered. Reword the logging slightly and add another
comment to hint what went wrong.

Fixes #737138
2014-09-23 11:56:33 +02:00
Sebastian Dröge
3592bd577c audiodecoder: Simplify code a bit 2014-09-18 12:40:26 +03:00
Ognyan Tonchev
2fff66b071 audioencoder: do not leak events when flushing them
https://bugzilla.gnome.org/show_bug.cgi?id=736796
2014-09-18 12:40:19 +03:00
Ognyan Tonchev
c674a0aa64 audiodecoder: Don't leak events
https://bugzilla.gnome.org/show_bug.cgi?id=736788
2014-09-17 14:11:34 +03:00
Ognyan Tonchev
add8f02703 audiocdsrc: do not leak uid after parsing TOC select event
https://bugzilla.gnome.org/show_bug.cgi?id=736739
2014-09-17 09:50:17 +03:00
Garg
47e303269d audiobasesink: Fix deadlock caused by holding object lock while calling clock functions
Issue:
During a PAUSED->PLAYING transition when we are rendering an audio buffer in AudioBaseSink
we make adjustments to the sink's provided clock i.e. fix clock calibration using the external
pipeline clock, within "gst_audio_base_sink_sync_latency function inside gstaudiobasesink.c".
For the calibration adjustment we need to get the sink clock time using "gst_audio_clock_get_time".
But before calling "gst_audio_clock_get_time" we acquire the Object Lock on the Sink. If sink is
a pulsesink, "gst_audio_clock_get_time" internally calls "gst_pulsesink_get_time" which needs to
acquire Pulse Audio Main Loop Lock before querying Pulse Audio for its stream time using
"pa_stream_get_time". Please see "gst_pulsesink_get_time in pulsesink.c".

So the situation here is we have acquired the Object lock on Sink and need PA Main Loop Lock.
Now Pulse Audio Main Thread itself might be in the process of posting a stream status
message after Paused to Playing transition which in turn acquires the PA Main loop lock and
needs the Object Lock on Pulse Sink. This causes a deadlock with the earlier render thread.

Fix:
Do not acquire the object Lock on Sink before querying the time on PulseSink clock. This is
similar to the way we have used get_time at other places in the code. Acquire it after the
get_time call. This way PA Main loop will be able to post its stream status message by
acquiring the Sink Object lock and will eventually release its Main Loop lock needed for
gst_pulsesink_get_time to continue.

https://bugzilla.gnome.org/show_bug.cgi?id=736071
2014-09-12 14:21:19 +03:00
Sebastian Dröge
d357f28260 audiodecoder: Fix broken boolean expression
We can seek with end_type==NONE and end_type==SET && end_position=-1. The
check for end_type!=NONE made the second condition impossible.

CID 1226439
2014-08-28 17:00:26 +03:00
Sebastian Dröge
4a69d6ba3b audiodecoder: Don't ignore ::start/stop return values 2014-08-25 13:15:07 +03:00
Jan Schmidt
02d1ab0d1c audiodecoder: Don't drain and flush on SEGMENT events.
As was done for the base video decoder in commit 695675, don't
flush out the decoder on a new SEGMENT event. Segment events
may be a new segment, but are also often segment updates for
the current segment where the old data should be kept. For new
segments, a STREAM_START event will already trigger a drain, but
make sure to flush any remaining partial data then as well.

https://bugzilla.gnome.org/show_bug.cgi?id=734666
2014-08-12 23:54:41 +10:00
Sebastian Rasmussen
a285f7126b audioencoder: Mark caps argument as not being transferred
https://bugzilla.gnome.org/show_bug.cgi?id=734540
2014-08-10 10:45:14 +01:00
Sebastian Dröge
368d75fe75 audiodecoder: Handle CAPS events immediately instead of delaying them
https://bugzilla.gnome.org/show_bug.cgi?id=733147
2014-07-21 09:36:00 +02:00
Sebastian Dröge
1e64667fe0 libs: There is no G_TYPE_CHECK_INTERFACE_TYPE and G_TYPE_CHECK_INTERFACE_CAST
Remove the macros that used them, nobody could've used them anyway.
2014-06-26 16:18:46 +02:00
Sebastian Dröge
909dd7831b audiodecoder: Don't be too picky about the output frame counter
With most decoder libraries, and especially when accessing codecs via
OpenMAX or similar APIs, we don't have the ability to properly related
the output buffers to a number of input samples. And could e.g. get
a fractional number of input buffers decoded at a time.

Previously this would in the end lead to an error message and stopped
playback. Change it to a warning message instead and try to handle it
gracefully. In theory the subclass can now get timestamp tracking
wrong if it completely misuses the API, but if on average it behaves
correct (and gst-omx and others do) it will continue to work properly.

Also add a test for the new behaviour.

We don't change it in the encoder yet as that requires more internal logic
changes AFAIU and I'm not aware of a case where this was a problem so far.
2014-06-20 11:02:55 +02:00
Thibault Saunier
12df7fa49d audiodecoder: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:21 +02:00
Thibault Saunier
967d1fb982 audioencoder: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:16 +02:00
Philip Withnall
ba87655628 audio: Add a missing precondition to gst_audio_format_from_string()
https://bugzilla.gnome.org/show_bug.cgi?id=730874
2014-05-28 11:34:01 +02:00
Thiago Santos
09b8f902ea audiodecoder: return EOS when segment is over
if a buffer is clipped by being completely out of segment, check if this
buffer is after the end of the segment and return EOS upstream

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:26:45 -03:00
Sebastian Dröge
68f5350c66 Release 1.3.1 2014-05-03 17:50:10 +02:00
Haakon Sporsheim
7c97a1c6cf audiodecoder: Make caps writable before fixating
https://bugzilla.gnome.org/show_bug.cgi?id=729114
2014-04-29 09:58:21 +02:00
Tim-Philipp Müller
bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Edward Hervey
74eb5fa995 audiodecoder: Plug caps leaks
We were returning in various places without unreffing the caps, and
we were also leaking (overwriting) the caps we got from _get_current_caps()

Spotted by Haakon Sporsheim in #gstreamer
2014-04-25 11:30:37 +02:00
Vincent Penquerc'h
dda777803c audiocdsrc: guard aginst overflow
An audio CD may contain about a tenth of the samples 32 bit can
represent, so it doesn't seem likely this will be hit in practice.

Coverity 1139805
2014-04-10 12:35:03 +01:00
Vincent Penquerc'h
7618699ffd audiobasesink: avoid possible sample count overflow
At 48 kHz, 2<<31 samples is reached before 13 hours so it
sounds plausible this would be hit.

Coverity 1139800, 1139801
2014-04-10 11:06:00 +01:00
Josep Torra
6ce7ade7c6 audioringbuffer: parse channels field from compressed audio caps
Also parse channels as an optional field in the caps for compressed
audio formats.
2014-04-08 12:54:04 +02:00
Vincent Penquerc'h
169166d0a2 audiobasesink: clip start samples to match clipped start time
Clock slaving can clip start time to zero, giving us a shorted
duration than we originally got. To keep in sync, we must then
discard the samples falling before that zero timestamp.

This possibly fixes random distortion caused by constant PA
underflows which are never resynced.
2014-04-04 17:04:06 +01:00
Rafał Mużyło
5496d09eb4 audio: map channels=1,channel-mask=0 to MONO instead of NONE
Fixes problem in audioconvert, which would end up using
a mixmatrix when converting between different mono format
because it thinks MONO positioning is different from
unpositioned channels, which is not the case in this
special case. The mixmatrix would end up being 0.0 so
audioconvert would convert to silence samples.

https://bugzilla.gnome.org/show_bug.cgi?id=724509
2014-02-18 10:41:47 +00:00
Sebastian Dröge
bc92cd8f67 audiosrc: Fix typo in docs
We read *from* the audio device, not to it.
2014-02-09 11:28:48 +01:00
Stefan Sauer
76ec6d3760 docs: doc fixes for audio library
Add sections docs for audiometa. Fix sections docs for audiochannels. Remove old
mixerutil section.
2014-02-03 09:36:43 +01:00
Thiago Santos
e00dc5b879 audioencoder: push pending events and tags before EOS
if there are tags or events pending and an EOS is received, push those
events and tags before the EOS.
2014-01-29 12:33:59 -03:00
Wim Taymans
6a88d6f8cd audiobasesink: make _get_time more threadsafe
We call the _get_time function from the provided clock and we don't lock
the sink object for performance reasons. Make sure we only read and
check variables once so that they don't change while we are executing
the code.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720661
2014-01-21 11:25:18 +01:00
Thiago Santos
695ddbd56f audiodecoder: copy rate and channels from input before fixating output caps
For default caps generation when handling gap events that are sent
before any buffer, try to use caps that are closer to what upstream
provided to avoid fixating rate or channels to 1 as default.

So there are the steps:
1) Try to set rate, channels and channel-mask from upstream if provided
2) Fixate the rate and channels to the default rate and channels from
   audio lib
3) Fixate the caps just to be sure everything is fixed
4) If no channel-mask was provided and channels > 2, use a default
   channel-mask (taken from audioconvert code)

https://bugzilla.gnome.org/show_bug.cgi?id=722144
2014-01-15 15:20:39 -03:00
Thiago Santos
95a56dbda7 audiodecoder: avoid parsing caps event if it is not used
Saves some cpu
2014-01-14 09:34:44 -03:00
Thiago Santos
8cf8332b91 audiodecoder: make sure caps is set before forwarding gap event
Before trying to generate a default fixated caps when handling a gap
event, make sure that the same strategy that is used when handling
a buffer has been attempted. Otherwise audiodecoder will ignore
upstream caps settings such as rate and channels and will likely
end with a caps with channels=1 and rate=1.

https://bugzilla.gnome.org/show_bug.cgi?id=722144
2014-01-14 09:34:44 -03:00
Jan Schmidt
f0b655e1ad audiobasesrc: Avoid unnecessary configuration
Port a change from audiobasesink from def07410, to ignore setcaps
when the caps don't actually change, and avoid a reconfiguration
and reset of the ringbuffer in that case.
2014-01-03 02:20:39 +11:00
Sebastian Dröge
58592a2af3 audio/video-info: Properly initialize the info structures in set_format()
And don't assume in other code that set_format() preserves any fields at
all. These assumptions were already made here for fields that were changed
by set_format().
2013-12-30 10:53:24 +01:00
Sebastian Dröge
65732d9c97 audio/video-info: Initialize the complete struct to 0 in the beginning
Instead of only initializing some parts in some code paths. Also
makes it easier to use the reserved bits of the structs later.

https://bugzilla.gnome.org/show_bug.cgi?id=720810
2013-12-30 10:15:20 +01:00
Reynaldo H. Verdejo Pinochet
5f07c1ed4e audiobasesrc: Bunch of cosmetic/grammar fixes 2013-12-27 01:36:09 -03:00
Reynaldo H. Verdejo Pinochet
0a6d6e1fff audiobasesrc: Retarget FIXME to 2.0
Properly fixing this one would break API.
2013-12-27 01:36:09 -03:00
Reynaldo H. Verdejo Pinochet
aa1883d5d7 audiobase*: Drop trailing withespaces 2013-12-27 01:36:09 -03:00
Reynaldo H. Verdejo Pinochet
d1b3454299 audiobasesrc: Break some too long lines 2013-12-27 01:36:09 -03:00
Reynaldo H. Verdejo Pinochet
6b17d86692 audiobasesrc: Add FIXME for times in NSECONDS
Timebase is in nanoseconds pretty much everywhere else
2013-12-27 01:36:09 -03:00
Jan Schmidt
c24a1254c9 audiodecoder: Choose a default initial caps before sending GAP
If there are no caps from the audio decoder when handling a GAP
event - as when one is received right at the start on a DVD without
initial audio - then choose any default caps for downstream and
then send the GAP, so the audio sink has a configured format in
which to start the ringbuffer.

Also, make the audio sink reject a GAP without caps with a clearer
error message.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=603921
2013-12-27 04:04:45 +11:00
Reynaldo H. Verdejo Pinochet
21190b9749 gstaudiobasesink: Always reset last_align
Should be done for all the reset_sync() cases. Not
only for the READY to PAUSED one.
2013-12-20 18:06:25 -03:00
Reynaldo H. Verdejo Pinochet
032779ff13 gstaudiobasesink: Reset last_align to 0, not -1
This is the expected behavior in READY -> PAUSED
2013-12-20 18:02:42 -03:00
Reynaldo H. Verdejo Pinochet
c1de7cdefb gstaudiobasesink: Always reset avg_skew on _reset
Only case in which it wasn't (READY to PAUSED) should
have had this value reseted too.
2013-12-20 17:58:43 -03:00
Reynaldo H. Verdejo Pinochet
adf800087c gstaudiobasesink: Retarget FIXME to 2.0
Properly fixing this one would break API
2013-12-20 17:48:22 -03:00
Reynaldo H. Verdejo Pinochet
d35db35258 gstaudiobasesink: Factor out reset sync routine 2013-12-20 17:47:38 -03:00
Reynaldo H. Verdejo Pinochet
b324d67586 gstaudiobasesink: Drop dead _sink_async_play() code 2013-12-20 13:58:34 -03:00
Reynaldo H. Verdejo Pinochet
2f04733a4b gstaudiobasesink: Break some too long lines 2013-12-20 13:58:33 -03:00
Reynaldo H. Verdejo Pinochet
187b106202 gstaudiobasesink: Cosmetics, grammar/spelling
- Drop repeated 'yet' from debug msg
- Drop repeated 'to' from param desc
- Some spelling
2013-12-20 13:58:33 -03:00
Edward Hervey
b97c711def audio/video: Initialize all {audio|video}info fields
Fixes "Unitialized Scalar Variable" issues reported by Coverity.

Has the added advantage of detecting whether somebody *does* use those
fields (ending up with a invalid address).

https://bugzilla.gnome.org/show_bug.cgi?id=720810
2013-12-20 14:47:22 +01:00
Reynaldo H. Verdejo Pinochet
86b0a0d6d0 gstaudiobasesink: Refactor alignment computation for clarity 2013-12-19 18:05:44 -03:00
Todd Agulnick
38d8fa12a5 Some compiler warning fixes to satisfy XCode compiler
https://bugzilla.gnome.org/show_bug.cgi?id=720513
2013-12-16 16:51:29 +01:00
Wim Taymans
df3718ea2b audiobasesink: handle the RESYNC flag
Also resync when a buffer with the RESYNC flag is seen.
2013-12-05 16:27:35 +01:00
Julien Isorce
e68317f070 audiodec/enc: clear reconfigure flag if negotiate succeeds
So that it avoids to send an allocation query twice.
One from an early call to gst_audio_encoder_negotiate from a
subclass, then one from gst_audio_encoder_allocate_output_buffer.
Which means that previously gst_audio_encoder_negotiate was not
clearing the GST_PAD_FLAG_NEED_RECONFIGURE even on success.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=719684
2013-12-05 15:19:16 +00:00
Sebastian Dröge
400d4baf92 audiodecoder: Use FALSE instead of 0 2013-12-05 11:37:09 +01:00
Mark Nauwelaerts
6e639b73ff audiodecoder: no fallback to segment start for reverse playback
See https://bugzilla.gnome.org/show_bug.cgi?id=709965
2013-12-04 19:24:25 +01:00
Mark Nauwelaerts
387e5f0c14 audiodecoder: use segment start as fallback ts if no other available
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709965
2013-12-02 20:36:21 +01:00
Sebastian Dröge
f8477e6b88 audiodecoder: error out if no frames are decoded before eos
Raise an error in case no frames are decoded before EOS and we
have input, meaning that data was received but it was somehow invalid.

Based on the videodecoder change, merged here for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=711094
2013-11-26 12:29:30 +01:00
Sebastian Dröge
b0788ce054 audiodecoder: Allow using -1 for infinite tolerated errors
Allows using -1 to make audiodecoder never post an error message
after decoding errors.

Based on the videodecoder change, merged here for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=711094
2013-11-26 12:20:33 +01:00
Mark Nauwelaerts
b13a722746 audioencoder: also set output buffer DTS 2013-11-16 15:25:38 +01:00
Sebastian Dröge
3fb235c53c audio: Update ORC dist files 2013-11-03 15:58:35 +01:00
Sebastian Dröge
081f009e25 audio-format: Use ORC for filling memory with silence samples 2013-11-03 15:58:35 +01:00
Takashi Iwai
6d659e3c6f audioringbuffer: Don't clear need_reorder flag too early
gst_audio_ring_buffer_set_channel_positions() checks whether the given
positions are identical with the current setup and returns
immediately if so.  But it also clears need_reorder flag before this
comparison, thus this flag might be wrongly cleared if the function is
called twice with the same channel positions.

Move the flag clearance after the check.

https://bugzilla.gnome.org/show_bug.cgi?id=709754
2013-10-09 19:00:33 +02:00
Johannes Dewender
019ef0747d audiocdsrc: Don't consider trailing data tracks for MusicBrainz disc id calculation
MusicBrainz removes trailing data tracks from releases on the server
and also for the calculation of the MusicBrainz Disc ID.

https://bugzilla.gnome.org/show_bug.cgi?id=708991
2013-10-01 22:24:22 +02:00
David Svensson Fors
09d628f8f1 audioringbuffer: check if acquired in set_timestamp
Also use GST_OBJECT_LOCK when accessing object data in set_timestamp.

https://bugzilla.gnome.org/show_bug.cgi?id=702230
2013-10-01 22:12:07 +02:00
Matej Knopp
dbaf1bf0a3 audio: change buffer timestamp when clipping even if data hasn't been trimmed
https://bugzilla.gnome.org/show_bug.cgi?id=708952
2013-09-28 11:39:43 +02:00
Wim Taymans
c9ff3e4f98 audiobasesink: do big correction for large drift
If we are using skew slaving and we drift more than twice the allowed amount, do
a big correction to get back on track more quickly.
2013-09-25 16:03:07 +02:00
Sebastian Dröge
420e229829 audioencoder/decoder: Mark pads as requiring reconfiguration again if negotiation fails
Otherwise we might end up in non-optimal configuration, especially
when a flush happened during reconfiguration.
2013-09-12 09:42:36 +02:00
Wim Taymans
d3641943b3 docs: fix some doc blocks 2013-09-09 15:52:05 +02:00
Mathieu Duponchelle
d1cb9c994b video/audio: #define metadata strings.
For instance "orientation" becomes GST_VIDEO_ORIENTATION_METADATA.
2013-09-09 15:37:02 +02:00
Sebastian Dröge
96ab6db422 audioencoder: Simplify pushing of pending events during negotiation
And also don't send the same caps twice.
2013-08-23 19:17:16 +02:00
Sebastian Dröge
daf017ced8 audiodecoder: Fix last commit and simplify code a lot 2013-08-23 19:10:48 +02:00
Edward Hervey
f9ebfd57f8 audiodecoder: Fix previous commit
(sorry)
2013-08-23 16:59:30 +02:00
Edward Hervey
cd3fe60c68 audiodecoder: Don't push out identical caps
This avoids triggering plenty of extra code/methods/overhead downstream when
we can just quickly check whenever we want to set caps whether they are
identical or not

https://bugzilla.gnome.org/show_bug.cgi?id=706600
2013-08-23 15:22:05 +02:00
Tim-Philipp Müller
6b070784c4 audio: make direct includes work again
Not nice to break people's code if we can avoid it. Could
add a warning in the next cycle, and then require single
includes in the cycle after.

https://bugzilla.gnome.org/show_bug.cgi?id=695889
2013-08-16 14:14:11 +01:00
Youness Alaoui
ca2a515373 audiodecoder: Clear taglist on reception of a STREAM_START event
https://bugzilla.gnome.org/show_bug.cgi?id=705109
2013-08-12 13:02:59 +02:00
Matej Knopp
197376212c audiodecoder: do not leak input caps
https://bugzilla.gnome.org/show_bug.cgi?id=704926
2013-07-26 15:37:04 +01:00
Sebastian Dröge
99ef452fc4 audio/videodecoder: Rename variable in macro from dec to __dec
Otherwise it might shadow another variable in the outside scope
and cause interesting side effects.
2013-07-25 14:11:28 +02:00
Sebastian Dröge
50fd867a43 audioencoder: Don't return not-negotiated if flushing
If the pad is flushing after a failed negotiation, return
GST_FLOW_FLUSHING instead from finish_frame().

https://bugzilla.gnome.org/show_bug.cgi?id=701763
2013-06-30 18:17:42 +02:00
Mathieu Duponchelle
97e68b36c7 audiodecoder: Don't return not-negotiated if flushing
If the pad is flushing after a failed negotiation, return GST_FLOW_FLUSHING.

https://bugzilla.gnome.org/show_bug.cgi?id=701763
2013-06-25 12:51:55 -04:00
Jonas Holmberg
82e5ec553b audioencoder: unref before memset
Unref allocator and input_caps in encoder context before memsetting the
context.
2013-06-19 13:56:28 +02:00
Ognyan Tonchev
f240d34c7e audiobasesrc: add 2 missing gst_buffer_unmap () calls
There are 2 missing calls to gst_buffer_unmap () in the error handling in
create ().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702467
2013-06-17 16:34:26 +02:00
Sebastian Dröge
ff5d3313d4 Release 1.1.1 2013-06-05 18:31:27 +02:00
Sebastian Dröge
c06377b385 audioencoder: Remove private copy of gst_audio_info_is_equal()
And improve the public one a bit based on it.
2013-06-01 09:06:22 +02:00
Sebastian Dröge
5065e76b1c audio: Add gst_audio_info_is_equal() 2013-05-30 23:56:52 +02:00
Sebastian Dröge
b8c6413a8e audio: Always provide a buffer in gst_audio_(enc|dec)oder_allocate_output_buffer()
We have no way of tell the caller of the exact error (e.g. if we're flushing),
so will have to wait until the caller uses API that returns a GstFlowReturn,
for example when pushing this buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=700006
2013-05-24 16:54:46 +02:00
Alexander Schrab
a049b102da alsasrc: Make using driver timestamps possible
https://bugzilla.gnome.org/show_bug.cgi?id=699744
2013-05-20 11:25:17 +02:00
Sebastian Dröge
be154ee9d6 audio-info: Always pass NULL as position parameter to gst_audio_info_set_format()
https://bugzilla.gnome.org/show_bug.cgi?id=700259
2013-05-15 09:26:56 +02:00
Sebastian Dröge
b401f447d2 audio-info: For more than 64 channels don't allow a channel layout
More than 64 channels have all channels unpositioned.

https://bugzilla.gnome.org/show_bug.cgi?id=700259
2013-05-14 09:34:21 +02:00
Sebastian Dröge
351405d8a0 audio: Make sure to push pre-caps events before the caps event 2013-05-08 15:56:34 +02:00
Tim-Philipp Müller
f5c0d61be7 Update disted orc backup files
Generated with 0.4.17 now.
2013-04-22 13:58:33 +01:00
Sebastian Dröge
d537a21075 audioencoder: Ignore caps events if the input caps did not change 2013-04-18 09:58:36 +02:00
Sebastian Dröge
d1a08af605 audiodecoder: Ignore caps events if the input caps did not change 2013-04-18 09:58:36 +02:00
Tim-Philipp Müller
e96ca66c36 docs: add some more audio macros 2013-04-17 09:26:40 +01:00
Sebastian Dröge
98f41f1c39 audioringbuffer: Also reset segbase 2013-04-15 10:13:14 +02:00
Paul HENRYS
587b2721c8 audioringbuffer: Reset segdone when releasing audioringbuffer
https://bugzilla.gnome.org/show_bug.cgi?id=697723
2013-04-15 10:09:49 +02:00
Wim Taymans
76d71da1c4 audiodecoder: don't make negative timestamp
Clamp timestamp interpollation to 0 to avoid going negative. This should not
happen, really, but until the interpolation is improved this seems better.
2013-03-31 13:46:30 +02:00
Wim Taymans
03f658dda2 audiodecoder: forward stream-start immediately 2013-03-30 19:14:37 +01:00
Stefan Sauer
e4ee1dde02 audioencoder: api doc fixes. 2013-03-29 10:33:35 +01:00
Paul HENRYS
78a8531c75 audiobasesrc: Fix ringbuffer handling when settings caps
ringbuffer was released after setting values to its spec field
in gst_audio_base_src_setcaps(). This led to failure in case
gst_audio_base_src_setcaps() is called more than one time.

https://bugzilla.gnome.org/show_bug.cgi?id=696540
2013-03-25 10:16:03 +01:00
Marc Leeman
0fa50b44f0 audioringbuffer: avoid division by 0 when outputting debug info
https://bugzilla.gnome.org/show_bug.cgi?id=695832
2013-03-15 09:06:07 +00:00
Akihiro Tsukada
a32877125f audio: add support for AAC pass-through
https://bugzilla.gnome.org/show_bug.cgi?id=694443
2013-02-27 00:38:05 +00:00
Stefan Sauer
b274ff7c21 audioringbuffer: log a few more details (e.g. obj-name) 2013-02-25 19:55:00 +01:00
Tim-Philipp Müller
6682215d9d audio: fix GST_AUDIO_INFO_ENDIANNESS macro 2013-02-16 13:06:54 +00:00
Tim-Philipp Müller
664adc6e19 gst-libs: use GST_*_1_0 environment variables everywhere
The _1_0 suffixed environment variables override the
non-suffixed ones, so if we're in an environment that
sets the _1_0 suffixed ones, such as jhbuild, we need
to set those to make sure ours actually always get
used.
2013-01-16 10:16:27 +00:00
Tim-Philipp Müller
b4def63f55 audio: don't use uninitialized variable in debug log
https://bugzilla.gnome.org/show_bug.cgi?id=667317
2012-12-29 14:29:53 +00:00
Wim Taymans
fe93457191 audioclock: mark as using some other clock
We need to mark our clock as using some other clock source. Alsa source uses the
clock type to decide if it can use alsa driver timestamps or not.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690465
2012-12-20 16:48:04 +01:00
Wim Taymans
5e04fcd2ef audiobasesrc: init variable
We need to initialize this variable because we can't be sure that the subclass
will set it.
2012-12-20 16:47:56 +01:00
Tim-Philipp Müller
68f366a8d3 audiobasesrc: bail out if subclass posts an error
Use new ringbuffer ERROR state to make all the various
threads bail out correctly when the subclass posts an
error. It's a bit iffy to communicate this properly
between the different bits of code.

https://bugzilla.gnome.org/show_bug.cgi?id=690197
2012-12-17 20:50:32 +00:00
Tim-Philipp Müller
4f49c7a33b audioringbuffer: add GST_AUDIO_RING_BUFFER_STATE_ERROR state
API: GST_AUDIO_RING_BUFFER_STATE_ERROR

https://bugzilla.gnome.org/show_bug.cgi?id=690197
2012-12-17 20:50:32 +00:00
Thiago Santos
929edc2572 audiobasesrc: Always resync the ringbuffer on the first buffer
In SKEW mode, use next_sample == -1 to check for the first sample
when starting to read samples so it resyncs the ringbuffer and
timestamps are ok.

Suggestion from Teemu Katajisto <teemu.katajisto@digia.com>

https://bugzilla.gnome.org/show_bug.cgi?id=648359
2012-12-17 11:47:34 +01:00
Sebastian Dröge
3f82e919dd libs: Use foo/foo.h as single-include header consistently everywhere
https://bugzilla.gnome.org/show_bug.cgi?id=688785
2012-12-12 17:13:10 +00:00
Tim-Philipp Müller
fbff6c6fb1 audioencoder: add some more debug info and remove obsolete comment 2012-12-02 12:33:43 +00:00
Tim-Philipp Müller
8827437b61 audio: remove bogus Since marker from docs
It was causing perl warnings in gtk-doc code.
2012-11-21 23:19:14 +00:00
Evan Nemerson
4d77fba46c libs: Add missing single include headers and use them in GIRs 2012-11-21 11:01:24 +01:00
Tim-Philipp Müller
71e46b2478 gst_adapter_prev_timestamp -> gst_adapter_prev_pts
https://bugzilla.gnome.org/show_bug.cgi?id=675598
2012-11-14 00:03:15 +00:00
Sebastian Dröge
32139f9a3d audio: Use new GType for GThread instead of just G_TYPE_POINTER 2012-11-12 11:45:47 +01:00
Sebastian Dröge
d209727644 audiodecoder: Reset error count to 0 after successfully decoding a frame 2012-11-09 16:48:54 +01:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Miguel Angel Cabrera Moya
244fdcc69a audiobasesink: use the same type as the internal type to return it
https://bugzilla.gnome.org/show_bug.cgi?id=687466
2012-11-02 19:52:38 +00:00
Wim Taymans
5f44303925 audioringbuffer: reset spec on _release
Reset the caps and the audioinfo when releasing the ringbuffer.
Fixed a bug with reusing pulsesink.
2012-10-30 10:33:04 +00:00
Tim-Philipp Müller
a4f2df6341 Revert "g-i: change g-ir-scanner arg --library=libgstfoo-X.la to --library=gstfoo-X"
This reverts commit e39fbe6b7e.

Looks like we need to pass the full .la file after all in a setup
with libtool, or it might not find the library, e.g. like

  ERROR: can't resolve libraries to shared libraries: gstfft-1.0

Conflicts:
	gst-libs/gst/audio/Makefile.am
	gst-libs/gst/pbutils/Makefile.am

Also see https://bugzilla.gnome.org/show_bug.cgi?id=603710
2012-10-29 12:47:05 +00:00
Tim-Philipp Müller
973f4f09ea audio: try harder to make g-i use the build-tree libgsttag
without adding additional --library= tags, which shouldn't be there.

https://bugzilla.gnome.org/show_bug.cgi?id=679315
2012-10-28 17:59:27 +00:00
Tim-Philipp Müller
e39fbe6b7e g-i: change g-ir-scanner arg --library=libgstfoo-X.la to --library=gstfoo-X
As it should be according to the man page.

https://bugzilla.gnome.org/show_bug.cgi?id=679315
2012-10-28 17:35:57 +00:00
Mark Nauwelaerts
45d802b63f audiodecoder: track forced decoding state 2012-10-24 14:46:22 +02:00
Sebastian Dröge
1813701ef2 audiobasesink: Add explanation to the GAP event handling code 2012-10-24 11:22:29 +02:00
Sebastian Dröge
b793d0bfae audiobasesink: Properly handle GAP events
These are now converted into silence buffers if they have
a duration or cause the ringbuffer and clock to be started
if they don't have a duration.

Fixes bug #685273.
2012-10-24 11:19:05 +02:00
Tim-Philipp Müller
277ca04976 audiodecoder: don't leak message strings when error is not fatal
https://bugzilla.gnome.org/show_bug.cgi?id=681192
2012-10-20 11:38:10 +01:00
Tim-Philipp Müller
3ee2ad255b audiocdsrc: mention TOCs in docs 2012-10-17 19:59:57 +01:00
Mark Nauwelaerts
162433795a audio: properly handle clipping of empty buffer 2012-10-15 18:48:01 +02:00
Josep Torra
d8d9f0db97 audiodecoder: set of base_ts for segment formats other than time
Fixes setting of converted segment start as base_ts when estimate rate
is allowed.
2012-10-11 13:17:01 +02:00
Sebastian Dröge
e779002cfd audiodecoder: Don't unref caps twice
Thanks to Josep Torra for noticing.
2012-10-10 15:50:31 +02:00
Wim Taymans
3591df23b1 docs: playbin2 -> playbin 2012-10-09 12:20:10 +02:00
Andoni Morales Alastruey
8a5cf5ef4d audio/video: update documentation for vfunc's that require chaining up 2012-10-08 13:04:02 +02:00
Tim-Philipp Müller
cdb22274e6 audioencoder: make stop() vfunc also optional
Just change default value, since we also don't want to fail
if we want to deactivate and aren't active or want to activate
and are already active.

https://bugzilla.gnome.org/show_bug.cgi?id=685490
2012-10-04 13:40:32 +01:00
Andoni Morales Alastruey
795d366a0c audioencoder: don't fail if the start vfunc is not implemented
Fix behaviour to match documentation and decoder class behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=685490
2012-10-04 13:14:10 +01:00
Michael Smith
92560517e8 Merge branch 'master' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-base 2012-10-03 10:45:26 -07:00
Michael Smith
a29c4f9489 meta registration: use g_once functions to register these threadsafely. 2012-10-03 10:44:59 -07:00
Arun Raghavan
9f9718715a audio: Explicitly specify endianness for IEC 61937 payloading
This is required since some systems (DirectSound and OS X) manage the
final byte order themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=678021
2012-09-19 09:15:16 +05:30
Mark Nauwelaerts
c629a44162 replace gst_tag_list_free with gst_tag_list_unref 2012-09-14 17:53:21 +02:00