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 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 drops support fof PulseAudio versions prior to 0.9.16, which was
released about 1.5 years ago. Testing with very old versions is not
feasible and we don't want to maintain 2 independent code-paths.
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/pulsesrc.c: (gst_pulsesrc_class_init),
(gst_pulsesrc_create_stream), (gst_pulsesrc_negotiate),
(gst_pulsesrc_prepare):
* ext/pulse/pulseutil.c: (gst_pulse_gst_to_channel_map),
(gst_pulse_channel_map_to_gst):
* ext/pulse/pulseutil.h:
If downstream provides no channel layout and >2 channels should be
used use the default layout that pulseaudio chooses and also
add this layout to the caps. Fixes bug #547258.