Commit graph

332 commits

Author SHA1 Message Date
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
Stefan Sauer 33752425e7 pulsesink: add a little more docs to the audioclock 2013-04-11 20:47:18 +02:00
Arun Raghavan 35f3bea558 pulsesink: Update segdone periodically
This makes sure that we update segdone based on the read index received
during latency updates. As the comment notes, we make some compromises
to deal with the fact that segdone is a segment multiple, while the read
index offers finer granularity. The updates are also not very often
(100ms since that is how often automatic timing updates are provided).

All this is required for the baseaudiosink sample alignment code to work
at all.

https://bugzilla.gnome.org/show_bug.cgi?id=694257
2013-02-23 09:26:19 +05:30
Tim-Philipp Müller 0c9b039c22 pulsesink: don't error out if pa_stream_proplist_update() with new tags fails
Shouldn't really happen these days, but if it does, it's not really
a problem either.

https://bugzilla.gnome.org/show_bug.cgi?id=656068
2013-01-19 13:27:48 +00:00
Sebastian Dröge 0726b71ceb ext/sys: Fix some compilation errors caused by circular includes 2012-12-12 17:35:04 +00:00
Sebastian Dröge 5e9adc4936 pulse: Use new GType for GThread instead of just G_TYPE_POINTER 2012-11-12 11:47:43 +01:00
Tim-Philipp Müller 230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Tim-Philipp Müller cd9706e9e9 pulsesrc: don't assert in get_time() when called after shutdown
Which might happen if the source gets set to NULL state before
the rest of the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=686985
2012-10-30 23:26:39 +00:00
Sebastian Dröge 69246dfef7 pulsesink: Flush the ringbuffer on GAP events without duration
This is required to properly start the ringbuffer and clock.
2012-10-24 11:19:52 +02:00
Tim-Philipp Müller 5ab46eff83 pulsesink: fix caps leak in acceptcaps function 2012-10-20 11:32:27 +01:00
Tim-Philipp Müller d2fdc26c38 pulsesink: in accept_caps() check if ring buffer is NULL before de-referencing
And sprinkle some thread-safety (take object lock for
accessing ring buffer, and pa main loop lock for the
context).

https://bugzilla.gnome.org/show_bug.cgi?id=683782
2012-10-19 15:11:07 +01:00
Arun Raghavan 027cc0e463 pulsesrc: Mute stream post-connection if required
A bug in PulseAudio causes PA_STREAM_START_MUTED to be rejected on
record streams. Until this is fixed upstream, we mute the stream
manually at startup. Based on a patch by Alban Browaeys
<prahal@yahoo.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=684469
2012-09-21 16:58:43 +08:00
Arun Raghavan f46475ee37 pulsesink: Specify endianness in IEC 61937 payloading
Corresponds to an API change in gst-plugins-base.

https://bugzilla.gnome.org/show_bug.cgi?id=678021
2012-09-19 09:18:19 +05:30
Wim Taymans e59498c33d pulsesrc: disable reconfigure
See https://bugzilla.gnome.org/show_bug.cgi?id=683902
2012-09-13 10:25:48 +02:00
Wim Taymans c47c410e7b pulsesrc: consider stream alive when not connected yet
When we start and renegotiate, there is a moment where the stream is created but
not yet connected. Make sure all functions deal with this situation correctly
instead of erroring out.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681247
2012-09-10 13:35:15 +02:00
Wim Taymans 619b2bd1a9 pulsesrc: don't fail when not negotiated yet
When get_time is called but we are not yet negotiated, return 0 instead of
posting an error. It's possible that the base class is still negotiating when
our get_time is called.
2012-09-10 12:15:25 +02:00
Wim Taymans 497ff16355 update for audio base src api change 2012-09-10 11:32:25 +02:00
Wim Taymans 148ab7539b pulse: improve debug 2012-09-06 10:43:52 +02:00
Tim-Philipp Müller 4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Sjoerd Simons 01665d9da3 pulsesrc: Only print caps if they're provided 2012-08-27 09:00:45 +02:00
Arun Raghavan ef9c81d495 pulsesrc: Handle negotiation events
This makes sure that we:

a) Destroy an existing stream if a negotiate() request comes in: this is
required when receiving a downstream renegotiation request after a
stream has been created.

b) Create a new stream on prepare(): this is required since we do a
setcaps() in negotiate(), which causes the stream to be dropped by a
ringbuffer release() call (this does not happen during first negotiation
since the release is only done on a running ringbuffer). The subsequent
call to ringbuffer acquire() fails because the stream was lost on
release().

https://bugzilla.gnome.org/show_bug.cgi?id=681247
2012-08-22 11:38:42 +02:00
Arun Raghavan 1a8512986a pulse: Clear unpositioned flag when setting positions
If converting a PA channel map to gst channel positions results in a
valid set of channel positions, we clear the unpositioned flag from the
ringbuffer spec.
2012-08-22 11:38:42 +02:00
Arun Raghavan e317d88eaa pulsesrc: Remove redundant channel-mask setting for stereo case
The gstaudio helper libraries already take care of this case for us.
2012-08-22 11:38:41 +02:00
Arun Raghavan fe83843abe pulsesrc: Don't use memset to set invalid channel positions
This itereates over the GstAudioInfo to set invalid channel positions
rather than use memset() which works right now because it assumes that
GST_AUDIO_CHANNEL_POSITION_INVALID is -1.
2012-08-22 11:38:41 +02:00
Wim Taymans 456c8e8205 pulsesrc: improve clock handling
Post the notify outside of the pa_lock to avoid a deadlock caused by basesrc
calling get_time with the object lock.
Reset the clock on connect.
Post clock-lost and clock-provide messages.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=673977

Conflicts:

	ext/pulse/pulsesrc.c
2012-06-07 15:15:03 +02:00
Mohammed Sameer 3bcae19398 Better GstClock for pulsesrc
This clock uses the actual stream time (pa_stream_get_time) to get a more accurate timestamp.

Conflicts:

	ext/pulse/pulsesrc.c
2012-06-07 15:11:09 +02:00
Sjoerd Simons c5196f6b1b pulsesrc: Listen to source output events, not sink input 2012-05-21 11:57:17 +02:00
Wim Taymans 373333c2b3 pulsesink: improve debug 2012-04-25 10:29:45 +02:00
Wim Taymans c0140982ee pulsesink: start unmuted when requested
When we explicitely set the mute property to FALSE, connect to pulseaudio with
the PA_STREAM_START_UNMUTED flag set, otherwise pulseaudio will use its
previously used value (which might start the stream muted).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=672401
2012-04-25 10:29:45 +02:00
Sebastian Dröge d99eb6d2cb Update everything for the removal of the interface library and mixer/tuner interfaces 2012-04-13 13:15:11 +02:00
Tim-Philipp Müller e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Sebastian Dröge aa2cd462da gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 17:36:38 +02:00