Commit graph

363 commits

Author SHA1 Message Date
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
Olivier Crête
8f9fbfa992 pulsesink: Implement changing the device while playing
https://bugzilla.gnome.org/show_bug.cgi?id=590768
2013-08-22 14:25:30 -04:00
Olivier Crête
691b04e5c9 pulsesrc: Add property to find out the device currently in use
https://bugzilla.gnome.org/show_bug.cgi?id=590768
2013-08-22 13:32:04 -04:00
Olivier Crête
d56f4718c2 pulsesrc: De-duplicate code to get the current source output info
https://bugzilla.gnome.org/show_bug.cgi?id=590768
2013-08-22 13:32:04 -04:00
Olivier Crête
c3642e3ecf pulsesrc: Implement changing the device while playing
https://bugzilla.gnome.org/show_bug.cgi?id=590768
2013-08-22 13:32:04 -04:00
Akihiro Tsukada
fda72021d2 pulsesink: Add support for AAC pass-through
https://bugzilla.gnome.org/show_bug.cgi?id=694445
2013-08-21 21:48:56 +02:00
Olivier Crête
db84b928a3 pulse: Share static caps definition between src and sink
The src was also missing 24-bit sample formats
2013-08-21 15:23:12 -04:00
Olivier Crête
dd5d93f0f6 pulse: Remove unused GstPulseProbe 2013-08-19 12:56:27 -04:00
Wim Taymans
5750a67765 sink: alaw/mulaw caps don't have a layout property 2013-07-12 12:32:42 +02:00
Wim Taymans
8248ff8232 pulse: relax mulaw and alaw format checks
The audio library considers them as encoded formats and does not fill in the
sample width. The audio ringbuffers identifies the format as alaw/mulaw and that
is always 8 bits.
2013-07-12 12:32:42 +02:00
Arun Raghavan
7486e2fc53 Revert "pulsesink: Make 2.0 dependency optional"
This reverts commit 01457027e0.

We'll just depend on PulseAudio 2.0 or above instead of having the bug
partially fixed based on the installed libpulse version.
2013-06-13 14:23:08 +05:30
Arun Raghavan
01457027e0 pulsesink: Make 2.0 dependency optional
The getcaps function we added uses some pa_format_info_get_prop...
accessor functions that were only added in 2.0, so we only have our
getcaps implementation exist if we're compiling against libpulse 2.0 or
above.

Eventually, we could bump the minimum requirement to 2.0 or above.

https://bugzilla.gnome.org/show_bug.cgi?id=686459
2013-06-13 12:44:32 +05:30
Arun Raghavan
c7e65777e1 pulsesink: Cache the getcaps/acceptcaps probe stream
getcaps is called frequently during stream setup, and creating a new
stream each time is very inefficient. There's some more room for
optimisation by caching the queried sink formats as well, but this needs
some more changes to listen for format changes on the sink (for when
supported formats change between probe stream creation and sink
querying).

https://bugzilla.gnome.org/show_bug.cgi?id=686459
2013-06-10 13:05:43 +05:30
Arun Raghavan
14e784f9fc pulsesink: Add a getcaps function
This allows us to have more fine-tuned caps in READY or above. However,
this is _really_ inefficient since we create a new stream and query sink
for every getcaps in READY, which on a simple gst-launch line happens
about 35 times. The next step is to cache getcaps results.

https://bugzilla.gnome.org/show_bug.cgi?id=686459
2013-06-10 13:05:24 +05:30
Arun Raghavan
84238d3ea4 pulsesink: Take a lock on the ringbuffer in acceptcaps
This is needed as a concurrent state change could pull the context or
stream out from under our feet.

https://bugzilla.gnome.org/show_bug.cgi?id=686459
2013-06-10 13:05:16 +05:30
Arun Raghavan
e5fad95306 pulsesink: Get rid of acceptcaps side-effects
The sink info callback should not have side-effects on the GstPulseSink
object since we are sometimes using with a dummy stream in acceptcaps.

https://bugzilla.gnome.org/show_bug.cgi?id=686459
2013-06-06 16:15:48 +05:30
Arun Raghavan
cc5562a8d9 pulsesink: Better error message when server version is too old
We check for the library version at configure time, but the server
version can only really be checked at run-time.

https://bugzilla.gnome.org/show_bug.cgi?id=698768
2013-04-29 11:54:26 +05:30
Sebastian Dröge
b0b0557c48 gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00