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
This is causing us lots of headaches in 0.10 and needs to be done
differently and properly in 0.11. playbin or decodebin should
reconfigure themselves based on reconfigure events, for example.
This introduces a new bin which wraps around pulsesink and depending on
the formats supported by the sink, plugs in/out a decodebin2 as
required. This allows users to switch sinks on the stream and adapts
accordingly (for example, you could watch a movie in passthrough mode on
your receiver which supports AC3 decode, then plug out and switch to a
non-digital profile to continue uninterrupted on analog output).
The bin is required because doing the same with playbin2/playsink will
require API changes that cannot be made in 0.10. With 0.11/1.0, we
should be able to ask for upstream caps renegotiation to deal with all
this.
https://bugzilla.gnome.org/show_bug.cgi?id=657179
This adds support for various compressed formats (AC3, E-AC3, DTS and
MP3) payloaded in IEC 61937 format (used for transmission over S/PDIF,
HDMI and Bluetooth).
The acceptcaps() function allows bins to probe for what formats the sink
being connected to support. This only works after the element is set to
at least READY.
If the underlying sink changes and the format we are streaming is not
available, we emit a message that will allow upstream elements/bins to
block and renegotiate a new format.
Since commit 8bfd80, gst_pulseringbuffer_stop doesn't wait for the
deferred call to be run before returning. This causes a race when
READY->NULL is executed shortly after, which stops the mainloop. This
leaks the element reference which is passed as userdata for the callback
(introduced in commit 7cf996, bug #614765).
The correct fix is to wait in READY->NULL for all outstanding calls to
be fired (since libpulse doesn't provide a DestroyNotify for the
userdata). We get rid of the reference passing from 7cf996 altogether,
since finalization from the callback would anyways lead to a deadlock.
Re-fixes bug #614765.
We also need to share the main-loop threads as this owns the context. Thus have
a class wide main-loop thread. From this we create a context per client-name.
Instead of always looking up the context, we keep this with the instance. The
reverse mapping is only needed in pulse singal handlers. This saves a lot of
locking. Also one signal handler becomes simpler as ther eis only one mainloop
to notify.
Now valgind happy - no leaks, no bad reads/writes.
This reverts major parts of commit 69a397c32f.
Fixes#628996
Allows the application to modify the client name used to connect when
connecting to the PulseAudio daemon. Note however that updating the
property after the element reached the READY state will have no
effect until the next NULL->READY transition.
Fixes bug #627174.
Emit stream-status messages for the pulse thread.
Don't use our own GCond for signaling but simply use the pulse mainloop
mechanisms for synchronisation.
See #587695
First we ignore request to fill the ringbuffer which are less then a segment.
The small request where causing stutter.
Then we disable flushing the stream when running against pa 0.9.12 as this
triggers an assertiong in the sound server and terminates it. It does not happen
with 0.9.10 and 0.9.14.
rather than PA thread.
pa_threaded_mainloop_lock() (a.o.) and by extension get_property should
not be done from a PA thread, but the latter may occur as a result of a
property change notification. Fixes#571204 (though current situation
not ideal, e.g. post message rather than signal).
newer pulseaudio.
Fixes: #567794
* Hook pulsesink's volume property up with the stream volume -- not the
sink volume in PA.
* Read the device description directly from the sink instead of going
via the mixer.
* Properly implement _reset() methods for both sink and source to avoid
deadlocks when shutting down a pipeline.
* Replace all simple pa_threaded_mainloop_wait() by proper loops to
guarantee that we wait for the right event in case multiple events are
fired. While this is not strictly necessary in many cases it
certainly is more correct and makes me sleep better at night.
* Replace CHECK_DEAD_GOTO macros with proper functions
* Extend the number of supported channels to 32 since that is the actual
limit in PA.
* Get rid of _dispose() methods since we don't need them.
* Increase the volume property upper limit of the sink to 1000.
* Reset function pointers after we disconnect a stream/context. Better
fix for bug 556986.
* Reset the state of the element properly if open/prepare fails
* Cork the PA stream when the pipeline is paused. This allows the PA
* daemon to
close audio device on pause and thus save a bit of power.
* Set PA stream properties based on GST tags such as GST_TAG_TITLE,
GST_TAG_ARTIST, and so on.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Original commit message from CVS:
* ext/pulse/pulsesink.c:
* ext/pulse/pulsesink.h:
Use a mutex to protect the current stream pointer, and ignore
callbacks for stream objects that have been destroyed already.
Fixes problems with unprepare/prepare cycles caused by the input
caps changing, without reintroducing bug #556986.
Original commit message from CVS:
* ext/pulse/pulsesink.c: (gst_pulsesink_class_init),
(gst_pulsesink_init), (gst_pulsesink_finalize),
(gst_pulsesink_set_volume), (gst_pulsesink_get_volume),
(gst_pulsesink_set_property), (gst_pulsesink_get_property),
(gst_pulsesink_prepare), (gst_pulsesink_change_state):
* ext/pulse/pulsesink.h:
Add "device-name" property to pulsesink too and currently commented
out and not working support for a "volume" property.