Commit graph

1113 commits

Author SHA1 Message Date
Hyunjun Ko
9dc463346e video/audio meta: transform_func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 16:41:23 +03:00
Sebastian Dröge
b495dfa5e6 {audio,video}info: Add GST_TYPE_{AUDIO,VIDEO}_INFO macros 2015-07-06 12:53:15 +03:00
Sebastian Dröge
56add20dc7 audioencoder: Don't try to get buffers from an empty adapter 2015-07-02 13:16:15 +02:00
Sebastian Dröge
f5eebb27a2 {audio,video}{en,de}oder: Also copy POOL metas and make sure to copy over metas when creating subbuffers
POOL meta just means that this specific instance of the meta is related to a
pool, a copy should be made when reasonable and the flag should just not be
set in the copy.
2015-07-01 10:58:07 +02:00
Sebastian Dröge
844fa28c67 audiodecoder: Add transform_meta() vfunc with default implementation
The default implementation copies all metadata without tags, and metadata
with only the audio tag. Same behaviour as in GstAudioFilter.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 10:40:10 +02:00
Sebastian Dröge
cc1719130b audioencoder: Add transform_meta() vfunc with default implementation
The default implementation copies all metadata without tags, and metadata
with only the audio tag. Same behaviour as in GstAudioFilter.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 10:40:10 +02:00
Sebastian Dröge
0acdfeed69 audiofilter: Also copy metas if their API has no tags attached to it
This is the default basetransform behaviour, being more strict than that
is not really useful.
2015-06-29 13:06:33 +02:00
Lyon Wang
829b7298e9 audioringbuffer: Fix alaw/mulaw channel positions
For alaw/mulaw we should also try to initialize the channel positions in the
ringbuffer's audio info. This allow pulsesink to directly use the channel
positions instead of using the default zero-initialized ones, which doesn't
work well.

https://bugzilla.gnome.org/show_bug.cgi?id=751144
2015-06-22 18:29:00 +02:00
Nicolas Dufresne
c101452a4a gi: Use INTROSPECTION_INIT for --add-init-section
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:04:57 -04:00
Nicolas Dufresne
e8aba7db8b gi: Fix warnings in libgstaudio
* Duplicate section
* Miss-named parameter
* Missing transfer none annotation for meta
2015-06-16 14:34:04 -04:00
Carlos Rafael Giani
c5b75394a9 audiobasesink: added custom clock slaving method
This new clock slaving method allows for installing a callback that is
invoked during playback. Inside this callback, a custom slaving
mechanism can be used (for example, a control loop adjusting a PLL or an
asynchronous resampler). Upon request, it can skew the playout pointer
just like the "skew" method. This is useful if the clocks drifted apart
too much, and a quick reset is necessary.

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>

https://bugzilla.gnome.org/show_bug.cgi?id=708362
2015-06-09 21:51:05 +10:00
Mathieu Duponchelle
579967278a audiofilter: copy metadata that only has the "audio" tag.
https://bugzilla.gnome.org/show_bug.cgi?id=750406
2015-06-04 19:16:40 +02:00
Sebastian Dröge
0c43005f54 audiodecoder: Also negotiate with downstream if needed before handling a GAP event 2015-05-08 15:07:56 +02:00
Sebastian Dröge
9e480d11a2 audio: Change the remaining "samples" in the ::delay() vfunc docs to "frames"
https://bugzilla.gnome.org/show_bug.cgi?id=748289
2015-04-27 10:08:17 +02:00
Sebastian Dröge
531b9ba951 audio: The delay vfunc returns the number of frames, not samples
https://bugzilla.gnome.org/show_bug.cgi?id=748289
2015-04-26 21:08:14 +02:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Wonchul Lee
5dffb8a311 audiodecoder: Add sink and src query virtual method
API: GstAudioDecoderClass::src_query()
API: GstAudioDecoderClass::sink_query()

https://bugzilla.gnome.org/show_bug.cgi?id=747293
2015-04-23 19:29:20 +01:00
Vincent Penquerc'h
5cb40d7320 audiobasesink: fix ring buffer leak on open failure 2015-04-09 13:00:58 +01:00
Vincent Penquerc'h
4e6b917ba3 audiobasesrc: fix ring buffer leak on open failure 2015-04-09 13:00:57 +01:00
Sebastian Dröge
a21795260f audiodecoder: Don't post error messages while holding the stream lock 2015-04-08 20:49:39 -07:00
Sebastian Dröge
9196c3dcca audiodecoder: Don't get and parse the current srcpad caps
We only get here if we don't have any srcpad caps, and we're going
to override the GstAudioInfo a few lines below anyway without ever
using it if for whatever reason we get caps here.
2015-04-08 20:49:39 -07:00
Sebastian Dröge
0c72d0acdf {audio,video}decoder: Forward SEGMENT_DONE events immediately and drain decoders
Otherwise we're going to wait with draining until the next data comes, which
is a bit suboptimal and might take a long time... or maybe never happens.
2015-04-06 19:20:51 -07:00
Vincent Penquerc'h
2954813b86 audio,video: use gst_segment_is_equal instead of memcmp
memcmp will blindly compare the reserved fields, as well as any
padding the compiler may choose to sprinkle in GstSegment.

Fixes valgrind complaints in unit tests, as well as some found via
https://bugzilla.gnome.org/show_bug.cgi?id=738216
2015-04-03 12:09:41 +01:00
Edward Hervey
3eb35c77cc introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:21:43 +02:00
Arun Raghavan
592fc9cdba audioringbuffer: Log with the ringbuffer object where possible 2015-03-13 23:24:58 +05:30
Mark Nauwelaerts
eeeb2eab82 audiodecoder: only return EOS upon clipping if applicable
See also https://bugzilla.gnome.org/show_bug.cgi?id=709224
2015-03-07 20:10:31 +01:00
Arun Raghavan
557c2c9be1 audiobasesink: Reset audio clock if necessary
When the ringbuffer is deactivated and then acquired, if the audio clock
provided by the sink gets reset to zero, we need to add an offset to the
clock to make sure that subsequent samples are written out at the right
times. While we need to leave this to derived classes to take care of
when they provide their own clock (since that clock may or may not be
reset to zero), we can do this ourselves if we know the provided clock
is our own (which does reset to zero on a re-acquire).
2015-03-03 23:26:54 +05:30
Jan Schmidt
b3053925ac audiodecoder: Don't send pending events before decode
Make sure to update the output segment to track the segment
we're decoding in, but don't actually push it downstream until
after buffers are decoded.

https://bugzilla.gnome.org/show_bug.cgi?id=744806
2015-02-24 01:36:44 +11:00
Mark Nauwelaerts
c321b6bd81 Revert "audiodecoder: drain current segment upon new one to ensure correct flow return"
This reverts commit 696b8cdc40.

See https://bugzilla.gnome.org/show_bug.cgi?id=734617
2015-02-22 16:58:33 +01:00
Mark Nauwelaerts
696b8cdc40 audiodecoder: drain current segment upon new one to ensure correct flow return
See also https://bugzilla.gnome.org/show_bug.cgi?id=709224
2015-02-22 13:23:44 +01:00
Thiago Santos
7e39a51a50 audio: video: fix a few GI annotations
transfer-full -> transfer full
@Since -> Since
2015-02-19 15:51:42 -03:00
Sebastian Dröge
8547594727 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 17:53:49 +02:00
Jan Schmidt
4f961e6d95 audiodecoder: Where possible, skip decode for GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO
If we have timestamps on input buffers and are in trickmode no-audio
mode, then don't pass anything to the subclass for decode and simply
send gap events downstream

Only for forward playback for now - reverse requires accumulating
GAP events and pushing out in reverse order.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-02-06 04:09:37 +11:00
Jan Schmidt
ca231ce321 audiobasesink: Re-work GAP buffer and trick-mode handling
In trickmode no-audio mode, or when receiving a GAP buffer,
discard the contents and render as a GAP event instead.

Make sure when rendering a gap event that the ring buffer will
restart on PAUSED->PLAYING by setting the eos_rendering flag.

This mostly reverts commit 8557ee and replaces it. The problem
with the previous approach is that it hangs in wait_preroll()
on a PLAYING-PAUSED transition because it doesn't commit state
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-02-06 04:09:37 +11:00
Jan Schmidt
c35e3e7c7d audiodecoder: Remove pointless else{} around some code 2015-02-06 04:02:48 +11:00
Jan Schmidt
7c0f885ad2 audiodecoder: Fix reverse playback when there's only one gather set.
The decoder can fail to drain on EOS if there was only one gather
set, because it will never have sent the segment event downstream
and set the output segment, and fail to detect that the rate < 0.0

Make sure to send pending events before sending all the gather data
for decode.
2015-02-06 04:02:48 +11:00
Sebastian Dröge
823cb40642 audio{enc,dec}oder: Always directly post latency messages on the bus when the subclass sets the latency
Instead of doing it only in setcaps for the encoder, and never at all for the
decoder.
2015-02-03 12:15:25 +01:00
Sebastian Dröge
f2a762a3a0 audio{enc,dec}oder: Handle max_latency == GST_CLOCK_TIME_NONE
And initialize the latencies with 0 and NONE.
2015-02-03 12:12:18 +01:00
Jan Schmidt
efe54e50e9 audiobasesink: Don't render a GAP silence buffer
Don't render out silence samples to a buffer, just
start the clock running, since any buffer with the
GAP flag will be discarded in render() now anyway.
2015-01-31 00:45:33 +11:00
Jan Schmidt
1df69786c3 audiobasesink: Make sure the ringbuffer is started before waiting
Don't call the basesink wait_event implementation until we're sure
the ringbuffer is running, because it might wait on a non-running
clock.
2015-01-31 00:45:33 +11:00
Jan Schmidt
8557eead82 audiobasesink: drop GAP buffers, or all buffers in trickmode no-audio mode
Make the base audio sink throw away buffers marked GAP, or all
incoming buffers when performing a trick play with
GST_SEGMENT_TRICKMODE_NO_AUDIO flag set, and make sure to start
the ringbuffer when that happens so the clock starts running.

Preserve the timing calculations when rendering, so state is all
updated the same, but just don't render samples.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-01-31 00:45:32 +11:00
Jan Schmidt
caff09300b audiobasesink: Make sure the ringbuffer really starts when we need it to
Some audio sink sub-classes (pulsesink) don't start their clock
when the ringbuffer starts, but always have to on EOS. When we
explicitly need to start the ringbuffer, make sure sub-classes will
do it by (ab)using the existing eos_rendering flag.
2015-01-28 16:30:42 +11:00
Luis de Bethencourt
783204824d orc: update orc files 2015-01-27 13:39:14 +00:00
Jan Schmidt
ef42a163e4 audiodecoder: Fix typo in documentation
Fix a couple of harmless warnings in the gtk-doc parsing
2015-01-27 02:12:08 +11:00
Sebastian Dröge
564f001aa8 audio-format: Constify the audio format table 2015-01-21 09:39:30 +01:00
Sebastian Dröge
e63ad51dab audiosrc: Fill in the correct silence
For unsigned raw formats this is not all zeroes, and for non-raw formats
we just continue to assume all zeroes for now.

https://bugzilla.gnome.org/show_bug.cgi?id=739446
2015-01-21 09:37:30 +01:00
Thomas Roos
f0f854d501 audiosink: Fill in the correct silence
For unsigned raw formats this is not all zeroes, and for non-raw formats
we just continue to assume all zeroes for now.

https://bugzilla.gnome.org/show_bug.cgi?id=739446
2015-01-21 09:35:55 +01:00
Sebastian Dröge
5b7d9e1954 audio: Keep caps features when building the downstream filter
Based on 5fd4e3e0b6 for video
by Alessandro Decina.
2015-01-15 10:51:37 +01:00
Mark Nauwelaerts
13ee94ef10 audioringbuffer: start ringbuffer if needed upon commit
... to provide for a running clock.
2015-01-10 13:03:20 +01:00
Nirbheek Chauhan
54e4baa523 audiobasesrc: Explicitly document that buffer-time and latency-time may be ignored 2014-12-27 10:24:45 +01:00