Commit graph

380 commits

Author SHA1 Message Date
Niels De Graef
a9ff9fe94e pulse: Use G_DECLARE_FINAL_TYPE 2020-03-16 09:20:07 +01:00
Tim-Philipp Müller
c9a47c0c8d Remove autotools build system 2019-10-14 11:04:18 +01:00
Aaron Boxer
46989dca96 documentation: fix a number of typos 2019-10-05 22:38:11 +00:00
Mathieu Duponchelle
3429ddde38 docstrings: port ulinks to markdown links 2019-08-23 18:56:01 +02:00
Thibault Saunier
dbd5d5b2a5 pulse-device: Hide the alsa device provider if we provide alsa devices 2019-06-04 16:06:57 +00:00
Thibault Saunier
af01988534 doc: Port documentation to hotdoc 2019-05-13 11:34:56 -04:00
Thibault Saunier
0a6a62aa76 docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
Thibault Saunier
263dfae6d5 pulse: Post DEVICE_CHANGED on modification 2019-02-08 22:02:13 +00:00
Thibault Saunier
7bc5e28d85 pulse: Mark default devices as "default" 2019-02-08 22:02:13 +00:00
Arun Raghavan
f0bdec32c1 pulsesink: Deal with not being able to convert a format to caps
It is possible that PulseAudio adds formats that are not yet supported
in pulsesink, and in those cases, we want to gracefully skip them rather
than cause an assert on a NULL caps.
2019-02-06 15:33:31 +05:30
Arun Raghavan
f5bb377a78 pulse: Fix format info to caps conversion for PCM 2019-01-18 11:06:38 +00:00
Arun Raghavan
4e9a8e5883 Revert "pulsesrc: Move to extended stream API"
This reverts commit 4d67d1bd16.

Using the extended API for the capture path depends on a fix in
PulseAudio
(https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/49).

Until then, let's go back to the standard API.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/552
2019-01-18 11:06:38 +00:00
Arun Raghavan
4d67d1bd16 pulsesrc: Move to extended stream API
This is needed as a precursor to allowing capture of IEC61937
formats. We now also need to include the channel map while converting
format info to caps so that a correct channel mask is generated for
pulsesrc's caps.
2019-01-10 09:16:02 +00:00
Marc-André Lureau
8b155d7188 pulsesrc: fix checking for invalid stream index
PA_INVALID_INDEX, the default value, is unfortunately !0.

Setting the volume before the stream is created will put the ring
buffer in error state. Unfortunately, that's what spice-gtk does.
2019-01-07 11:54:24 +04:00
Arun Raghavan
a24ef929a4 pulse: Expose the correct max rate that we support
PulseAudio defines PA_RATE_MAX as the maximum sampling rate that it
supports. We were previously exposing a maximum rate of INT_MAX, which
is incorrect, but worked because nothing was really using a rate greater
than 384000 kHz.

While playing DSD data, we hit a case where there might be very high
sample rates (>1MHz), and pulsesink fails during stream creation with
such streams because it erroneously advertises that it supports such
rates.

Since PA_RATE_MAX is #define'd to (8*48000U), we can't just use it in
the caps string. Instead, we fix up the rate to what we actually support
whenever we use our macro caps.
2018-11-19 21:28:25 +05:30
Nirbheek Chauhan
8f807477eb meson: Add feature options for all plugins
Checks for GL, Qt5, and C++ are still automagic. FIXMEs have been
added for these so they can be fixed later.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:42:54 +05:30
Xavier Claessens
edd9c8f6b8 Meson: Generate pc file for all plugins in good
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:07:06 +01:00
Nicolas Dufresne
bd2ce0fb67 pulse: Accept MPEG 1 layer 3 version 2.5
https://bugzilla.gnome.org/show_bug.cgi?id=781929
2017-05-16 15:38:00 -04:00
Nicolas Dufresne
b68d936ae0 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:41:19 -04:00
Nicolas Dufresne
ca0ed8a134 Fix plugin filenames to match plugin names
- libgstpulse.so becomes libgstpulseaudio.so
- libgstsouphttpsrc.so becomes libgstsoup.so
- libgstoss4audio.so becomes libgstoss4.so

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-03-08 20:04:20 -05:00
Arun Raghavan
4833f02e47 pulsesrc: Don't negotiate to less than two segments
GstAudioRingBuffer doesn't needs us to have at least 2 segments. We make
sure that if our buffer parameters are such that the maxlength is not at
least 2x fragsize, we still request the ringbuffer to keep that much
space so it continues to work.

https://bugzilla.gnome.org/show_bug.cgi?id=770446
2016-09-25 01:20:14 +05:30
Nirbheek Chauhan
b09f478e80 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.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:21:12 +01:00
Jan Schmidt
46a3c9ac8b Revert "pulsesink: uncork if needed upon commit"
This reverts commit 0dd46accf6.

With some audiosinks, starting the ringbuffer on the first commit
causes audio glitches at startup by starting to output segments
from the ringbuffer before it has been filled / fully prerolled. This
doesn't usually happen with pulsesink because we map the pulseaudio
ringbuffer directly, but we should keep things consistent with
other sinks with regards to startup latency, plus it gives more
headway to avoid glitching, should the initial 2nd segment take
more than 10ms to generate.

https://bugzilla.gnome.org/show_bug.cgi?id=657076
2016-04-16 02:21:14 +10:00
Vineeth TM
1071309870 good: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763076
2016-03-24 14:32:20 +02:00
Nirbheek Chauhan
e686ec0c97 pulse: Don't leak caps and structures in the device provider 2015-11-05 17:54:48 +00:00
Wim Taymans
0421d40d9c pulse: add properties to GstDevice
Add the extra properties we get from pulse to the GstDevice we expose
with the device monitor
2015-07-15 18:29:21 +02:00
Arun Raghavan
8e236fa2e1 pulsesrc: Fix mapping of latency parameters to buffer attributes 2015-06-12 12:49:28 +05:30
Arun Raghavan
3751c87f00 pulsesink: Make sure to filter caps in all cases during CAPS query
We were skipping the filter step while returning template caps, for
example.
2015-03-09 11:55:40 +05:30
Jimmy Ohn
f9a8f0ebfe pulsesink: Enhance code readability in pulsesink_query
In pulsesink_query function, we use a switch for the query
type. In the CAPS case, there is no 'break', instead we
return right away. Use a break and return at the end of
the function instead for better code readability.

https://bugzilla.gnome.org/show_bug.cgi?id=744461
2015-02-13 22:27:49 +00:00
Jimmy Ohn
bf10d33b9b pulsesink: Free format_info in query_getcaps
If we can not create probe stream in query_getcaps function, it will appear
memory leakage from format info.
The following patch prevent memory leakage in pulsesink.

https://bugzilla.gnome.org/show_bug.cgi?id=743178
2015-01-26 12:07:20 -03:00
Mark Nauwelaerts
0dd46accf6 pulsesink: uncork if needed upon commit
... to provide for a running clock.
2015-01-10 13:04:44 +01:00
Tim-Philipp Müller
31b8cfecc2 pulse, v4l2: add missing G_END_DECLS in some places 2014-10-28 21:32:06 +00:00
Tim-Philipp Müller
666b596aa2 pulse: remove some unused typedefs 2014-10-23 15:46:29 +01:00
Arun Raghavan
163155715f pulsesink: Temporarily disable stream status posting
We need a mechanism in PulseAudio to allow running code outside the
mainloop lock. Then we'd be able to post to the bus (taking the
GST_OBJECT_LOCK), without worrying about locking order with the mainloop
lock, which is the current cause of deadlocks while trying to post the
stream status messages.

https://bugzilla.gnome.org/show_bug.cgi?id=736071
2014-10-22 23:12:38 +05:30
Arun Raghavan
2a3adec2f7 pulse: Add some documentation about threading and synchronisation
This gives a quick introduction to how the pulsesink/pulsesrc code
interacts with the pa_threaded_mainloop that we start up to communicate
with the server.
2014-09-30 06:28:50 +05:30
Arun Raghavan
0ed08ac3fd pulsesink: Make emitting stream status messages synchronous
The stream status messages are emitted in the PA mainloop thread, which
means the mainloop lock is taken, followed by the Gst object lock (by
gst_element_post_message()). In all other locations, the order of
locking is reversed (this is unavoidable in a bunch of cases where the
object lock is taken by GstBaseSink or GstAudioBaseSink, and then we get
control to take the mainloop lock).

The only way to guarantee that the defer callback for stream status
messages doesn't deadlock is to either stop posting those messages, or
make sure that the message emission is completed before we proceed to
any point that might take the object lock before the mainloop lock
(which is what we do after this patch).

https://bugzilla.gnome.org/show_bug.cgi?id=736071
2014-09-30 06:28:50 +05:30
Sebastian Dröge
6be8225fde pulsesrc: Fix compiler warning when compiling with G_DISABLE_ASSERT 2014-06-29 20:02:14 +02:00
Tim-Philipp Müller
e9613c8512 pulse: fix compiler warnings when compiling with -DG_DISABLE_ASSERT
Compiler complains about uninitialised variables in the impossible
'default' code path in device provider source/sink switch-case.
2014-06-29 17:06:30 +01:00
Olivier Crête
a9c385686a Rename GstDeviceMonitor to GstDeviceProvider 2014-06-26 14:57:36 -04:00
Tim-Philipp Müller
dd165a4b1a pulse, v4l2: update for device "klass" -> "device-class" rename 2014-06-21 01:32:03 +01:00
Olivier Crête
39bbccdf79 pulsedevicemonitor: Index are per facility, not global
So need to keep the type of device in the device object
2014-05-04 01:14:39 -04:00
Olivier Crête
6c8e42944a pulsedevicemonitor: pa_subscription_event_t are enums, not flags
Coverity 1195132
2014-05-04 01:14:39 -04:00
Olivier Crête
019a0009af pulse: Add device monitors
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 20:37:54 -04:00
Tim-Philipp Müller
5f0ea73d28 pulse: fix format info to caps conversion for mulaw 2014-03-16 15:55:00 +00:00
Olivier Crête
e714ab9dba pulse: Make gst_pulse_format_info_to_caps() shared
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 15:28:29 +00:00
Stefan Sauer
3abad7af66 pulsesink: fix crash when getting the current-device in NULL->READY
The "goto unlock" is wrong as in this code path we haven't take the lock yet.
Fixes #724619
2014-02-18 11:28:18 +01:00
Olivier Crête
dc782af133 pulsesink: Free device_info in accepts caps
https://bugzilla.gnome.org/show_bug.cgi?id=719811
2013-12-04 16:24:06 -05:00
Tim-Philipp Müller
d506409af5 docs: get rid of 'Since: 0.10.x' markers
And some gtk-doc markup fixes.
2013-11-18 14:47:35 +00:00
Olivier Crête
e00b8f0a4a pulsesink: Add property to find out the device currently in use
https://bugzilla.gnome.org/show_bug.cgi?id=590768
2013-08-22 15:03:29 -04:00
Olivier Crête
d379e237c1 pulsesink: De-duplicate code to get the current sink input info
https://bugzilla.gnome.org/show_bug.cgi?id=590768
2013-08-22 14:37:28 -04:00