Commit graph

2592 commits

Author SHA1 Message Date
Guillaume Desmottes
592b87a463 alsa: coding style fix
Was using tabs instead of spaces.

https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:34:13 -04:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Lubosz Sarnecki
8a443784c4 basetextoverlay: Add new properties and alignment type for unclamped absolute positions
Introduces [x-absolute, y-absolute] properties
for positioning in +/- MAX_DOUBLE range.

Adds new (h/v)alignment type "absolute" where coordinates
map the text area to be exactly inside of video canvas for [0, 0] - [1, 1]:

[0, 0]: Top-Lefts of video and text are aligned
[0.5, 0.5]: Centers are aligned
[1, 1]: Bottom-Rights are aligned

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-03-11 13:20:26 +00:00
Tim-Philipp Müller
241fcaa645 Revert "textoverlay: Do not limit positioning to video area."
This reverts commit a48daf6dd8.

This changed behaviour in a way that's not always
backwards-compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-03-11 13:15:53 +00:00
Tim-Philipp Müller
aade5515ac theora: fix performance category initialisation
Remove unused _register() functions and look up the performance
debug category in a function that's actually called at some point.
2016-03-09 09:56:52 +00:00
Vincent Penquerc'h
603e2fe24a oggdemux: fix chaining causing running time to restart from 0
This fixes:
gst-play-1.0 http://relay-nyc.gameowls.com:8000/chiptune.ogg

https://bugzilla.gnome.org/show_bug.cgi?id=758282
2016-03-04 12:18:53 +00:00
Havard Graff
461cdd8c26 opusdec: plug caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=763059
2016-03-03 20:10:09 +00:00
Vincent Penquerc'h
625bd68da7 opus: fix mono<->stereo up/down-mixing
https://bugzilla.gnome.org/show_bug.cgi?id=761588
2016-02-26 16:15:20 +00:00
Tim-Philipp Müller
8b48fc1569 opusenc: remove deprecated "cbr", "audio", and "constrained-vbr" properties
They have been replaced by "audio-type" and "bitrate-type".

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-26 06:51:17 +00:00
Tim-Philipp Müller
f331412a37 opus: move Opus audio decoder and encoder from -bad to -base
Hook into build system after moving history.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-26 00:20:10 +00:00
Tim-Philipp Müller
a2eb430010 Merge branch 'plugin-move-opus'
Move Opus decoder and encoder from -bad to -base.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 23:51:42 +00:00
Tim-Philipp Müller
a62c7bd54c Fix use of undeclared core debug category symbols
libgstreamer currently exports some debug category
symbols GST_CAT_*, but those are not declared in any
public headers.

Some plugins and libgstvideo just use GST_DEBUG_CATEGORY_EXTERN()
to declare and use those, but that's just not right at
all, and it won't work on Windows with MSVC. Instead look
up the categories via the API.
2016-02-20 11:31:43 +00:00
Lubosz Sarnecki
8e07203798 textoverlay: Expose rendering dimensions as properties.
In order to detect graphical user input on the
textoverlay, the resulting rendering properties
need to be exposed to applications.

Fixes delayx property declaration.

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-02-04 13:25:48 +01:00
Lubosz Sarnecki
a48daf6dd8 textoverlay: Do not limit positioning to video area.
The current position property is limited to X,Y positions
in the range of [0, 1]. This patch allows full control
over the overlay position, including partially outside
of the video area.

https://bugzilla.gnome.org/show_bug.cgi?id=761251
2016-02-04 13:25:48 +01:00
Vincent Penquerc'h
1ef601e7d3 opus: fix FEC
FEC may only be used when PLC is enabled on the audio decoder,
as it relies on empty buffers to generate audio from the next
buffer. Hooking to the gap events doesn't work as the audio
decoder does not like more buffers output than it sends.

The length of data to generate using FEC from the next packet
is determined by rounding the gap duration to nearest. This
ensures that duration imprecision does not cause quantization
to 2.5 milliseconds less than available. Doing so causes the
Opus API to fail decoding. Such duration imprecision is common
in live cases.

The buffer to consider when determining the length of audio
to be decoded is the previous buffer when using FEC, and the
new buffer otherwise. In the FEC case, this means we determine
the amount of audio from the previous buffer, whether it was
missing or not (and get the data either from this buffer, or
the current one if the previous one was missing).
2016-02-03 16:36:10 +00:00
Vincent Penquerc'h
8e9345ec86 opusdec: fix wrong buffer being checked for missing data
This caused a decoding error if the resulting (wrong) buffer size
was passed to the Opus decoding API.

https://bugzilla.gnome.org/show_bug.cgi?id=758158
2016-02-02 15:22:55 +00:00
Arun Raghavan
af091928f3 alsa: Trivial doc update
alsasink now does more than just raw audio.
2016-01-25 18:31:17 +05:30
Vineeth TM
95bf0ae2ae 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
Nicolas Dufresne
e7a59d2e08 Revert "alsasrc: Disable HW timestamp"
This reverts commit 3642e9a391.
2015-12-14 13:59:02 -05:00
Nicolas Dufresne
3642e9a391 alsasrc: Disable HW timestamp
This is a workaround for broken pulse module.
2015-12-14 13:39:02 -05:00
Reynaldo H. Verdejo Pinochet
71c2ddd07d Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Luis de Bethencourt
6463ff198e opusenc: avoid potential overflow expression
The result of the two expressions will be promoted to guint64 anyway,
perform all the arithmetic in 64 bits to avoid potential overflows.

CID 1338690, CID 1338691
2015-11-12 12:29:33 +00:00
Jan Schmidt
797a0ca376 vorbisdec: Re-init on new caps
If we get new input caps, then reset the decoder
ready for new headers and fresh data. Makes
chained oggs work when reusing the decoder.
2015-11-11 01:33:55 +11:00
Sebastian Dröge
dd741e6412 opusdec: Update sink pad templates
We always require the channel-mapping-field. If it's 0 we require nothing
else, otherwise we need channels, stream-count and coupled count to be
available.
2015-11-05 12:11:19 +01:00
Sebastian Dröge
85984fa946 opusenc: Create an empty taglist if there is none
There always have to be 2 buffers in the streamheaders, even if
the comment buffer is basically empty.
2015-11-04 00:14:13 +02:00
Sebastian Dröge
4ca84a9b1a opus: Add proper support for multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge
fc475ce01a opusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead
oggdemux is outputting the meta now, and only outputs if it should really
apply to the current buffer. Previously we would skip N samples also if we
started the decoder in the middle of the stream.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
328f9088f3 opusenc: Add GstAudioClippingMeta to buffers that need to be clipped
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
6b751360ae opusenc: Disable granule position calculations by the base class
It is doing the wrong thing because of the Opus pre-skip: while the timestamps
are shifted by the pre-skip, the granule positions are not shifted.

oggmux is doing the right thing here already.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
7773e1eb58 opusenc: Add some FIXME comments about calculating padding with LPC
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
4df2ffaad6 opusenc: Encode exactly the amount of samples we got as input and put correct timestamps on it
The first frame has lookahead less samples, the last frame might have some
padding or we might have to encode another frame of silence to get all our
input into the encoded data.

This is because of a) the lookahead at the beginning of the encoding, which
shifts all data by that amount of samples and b) the padding needed to fill
the very last frame completely.

Ideally we would use LPC to calculate something better than silence for the
padding to make the encoding as smooth as possible.

With this we get exactly the same amount of samples again in an
opusenc ! opusdec pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
6ffb90e037 opusenc: Put lookahead/pre-skip into the OpusHead header
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge
cab8671f0c oggdemux: Create full Opus caps with all fields
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:33 +02:00
Sebastian Dröge
0fa8d284c7 oggmux: Use GstAudioClippingMeta for Opus for accurate end clipping
... instead of relying on the segment. For the clipping at the start we assume
a proper value in the OpusHead, as generated by opusparse or opusenc.

Transmuxing in general is not guaranteed to produce the correct values, or
even have a OpusHead (e.g. when having RTP input).

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Sebastian Dröge
a135868262 oggdemux: Add GstAudioClippingMeta for Opus for accurate start/end clipping
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Sebastian Dröge
8a3be7323a oggdemux: Allow start clipping for Opus
The granulepos does not have the pre-skip subtracted while timestamps do,
and the last granulepos will be shorter by the number of samples that should
be dropped because of padding in the end.

As such, extrapolating the granule of the beginning of the first frame will
lead to a negative value, which is not a problem but intentional.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Luis de Bethencourt
2206ba473f oggmux: Print GstClockTimeDiff as a signed integer in debug logs 2015-11-02 16:36:35 +00:00
Luis de Bethencourt
799020804f oggdemux: Use GstClockTimeDiff and print signed integer in debug logs
Use GstClockTimeDiff and Clock macros to print signed integer time
differences in the debug logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-02 16:10:07 +00:00
Sebastian Dröge
9c195e37da opusdec: Assume 48kHz if no sample rate is given in the header 2015-11-02 09:36:46 +02:00
Sebastian Dröge
7cadfcb0b0 opusenc: Place 48kHz first in the caps
For all the other sample rates the encoder will have to resample internally.
2015-11-02 09:36:43 +02:00
Sebastian Dröge
4fe12c1b09 alsa: Use 8 bit pointer type for byte-based pointer arithmetic
Usually these loops only run once, so there's no problem here. But sometimes
they run twice, and by adding the number of bytes to a 16 bit pointer type we
would advance twice as much as we should.

Also use snd_pcm_frames_to_bytes() in alsasrc to calculate
the number of bytes to skip, same as we do in alsasink.

Thanks to Lucio A. Hernandez <lucio.a.hernandez@gmail.com> for reporting.
2015-10-14 00:33:49 +03:00
Antonio Ospite
2c7ed42292 midi: add an ALSA MIDI sequencer source
The alsamidisrc element allows to get input event from ALSA MIDI
sequencer devices, and possibly convert them to sound using some
downstream element like fluiddec.

Fixes #738687
2015-10-01 21:43:21 +02:00
Luis de Bethencourt
8ae0fd3990 visual: merge audiovisalizer base classes
Move the audiovisualizer base class to pbutils, so it can be used by plugins
from other modules

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-10-01 16:05:58 +01:00
Prashant Gotarne
e58ad7a2b4 basetextoverlay: fix typo in debug log message
https://bugzilla.gnome.org/show_bug.cgi?id=755198
2015-09-18 08:50:52 +01:00
Thiago Santos
54a5859960 opusdec: remove check for number of channels
opus decoder can convert from different number of channels, no
need to check, just let it negotiate and create a new decoder if
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=755059
2015-09-15 16:00:43 -03:00
Miguel París Díaz
a4ffb14c55 opusenc: improve deprecated properties docs
https://bugzilla.gnome.org/show_bug.cgi?id=754819
2015-09-11 23:33:19 +02:00
Miguel París Díaz
16e93d206f opusenc: do not throw g_warning when getting deprecated properties
https://bugzilla.gnome.org/show_bug.cgi?id=754819
2015-09-11 23:33:19 +02:00
Prashant Gotarne
7447736be9 basetextoverlay: FIX crash if padding greater than video size
Skipping rendering of textimage if overlay is completely
outside video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=754429
2015-09-03 10:15:39 -04:00
Thiago Santos
f1cbca9480 audioencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough

Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
2015-08-17 10:07:54 -03:00
Thiago Santos
14867e4ebb vorbisenc: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough
2015-08-16 12:30:30 -03:00