Commit ff747186 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

pulse: remove pulseaudiosink helper bin

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.
parent 2799bcd3
......@@ -9,21 +9,6 @@
<package>GStreamer Good Plug-ins git</package>
<origin>Unknown package origin</origin>
<elements>
<element>
<name>pulseaudiosink</name>
<longname>Bin wrapping pulsesink</longname>
<class>Sink/Audio/Bin</class>
<description>Correctly handles sink changes when streaming compressed formats to pulsesink</description>
<author>Arun Raghavan &lt;arun.raghavan@collabora.co.uk&gt;</author>
<pads>
<caps>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<details>audio/x-raw-int, endianness=(int){ 1234, 4321 }, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-raw-float, endianness=(int){ 1234, 4321 }, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, endianness=(int){ 1234, 4321 }, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, signed=(boolean)false, width=(int)8, depth=(int)8, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, endianness=(int){ 1234, 4321 }, signed=(boolean)true, width=(int)24, depth=(int)24, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, endianness=(int){ 1234, 4321 }, signed=(boolean)true, width=(int)32, depth=(int)24, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-ac3, framed=(boolean)true; audio/x-eac3, framed=(boolean)true; audio/x-dts, framed=(boolean)true, block-size=(int){ 512, 1024, 2048 }; audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)[ 1, 2 ], parsed=(boolean)true</details>
</caps>
</pads>
</element>
<element>
<name>pulsemixer</name>
<longname>PulseAudio Mixer</longname>
......@@ -64,4 +49,4 @@
</pads>
</element>
</elements>
</plugin>
\ No newline at end of file
</plugin>
......@@ -7,7 +7,6 @@ libgstpulse_la_SOURCES = \
pulsemixertrack.c \
pulseprobe.c \
pulsesink.c \
pulseaudiosink.c \
pulsesrc.c \
pulseutil.c
......
......@@ -49,12 +49,6 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_PULSESRC))
return FALSE;
/* FIXME 0.11: this helper bin sink should just go away, reconfiguration
* should be handled using reconfigure events */
if (!gst_element_register (plugin, "pulseaudiosink", GST_RANK_PRIMARY + 11,
GST_TYPE_PULSE_AUDIO_SINK))
return FALSE;
if (!gst_element_register (plugin, "pulsemixer", GST_RANK_NONE,
GST_TYPE_PULSEMIXER))
return FALSE;
......
This diff is collapsed.
......@@ -426,6 +426,8 @@ gst_pulsering_context_subscribe_cb (pa_context * c,
GST_INFO_OBJECT (psink, "emitting sink-changed");
/* FIXME: send reconfigure event instead and let decodebin/playbin
* handle that. Also take care of ac3 alignment. See "pulse-format-lost" */
renego = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
gst_structure_new_empty ("pulse-sink-changed"));
......@@ -742,9 +744,22 @@ gst_pulsering_stream_event_cb (pa_stream * p, const char *name,
g_free (psink->device);
psink->device = g_strdup (pa_proplist_gets (pl, "device"));
/* FIXME: send reconfigure event instead and let decodebin/playbin
* handle that. Also take care of ac3 alignment */
renego = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
gst_structure_new_empty ("pulse-format-lost"));
#if 0
if (g_str_equal (gst_structure_get_name (st), "audio/x-eac3")) {
GstStructure *event_st = gst_structure_new ("ac3parse-set-alignment",
"alignment", G_TYPE_STRING, pbin->dbin ? "frame" : "iec61937", NULL);
if (!gst_pad_push_event (pbin->sinkpad,
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, event_st)))
GST_WARNING_OBJECT (pbin->sinkpad, "Could not update alignment");
}
#endif
if (!gst_pad_push_event (GST_BASE_SINK (psink)->sinkpad, renego)) {
/* Nobody handled the format change - emit an error */
GST_ELEMENT_ERROR (psink, STREAM, FORMAT, ("Sink format changed"),
......@@ -1938,8 +1953,6 @@ done:
pa_threaded_mainloop_signal (mainloop, 0);
}
/* NOTE: If you're making changes here, see if pulseaudiosink acceptcaps also
* needs to be changed accordingly. */
static gboolean
gst_pulsesink_query_acceptcaps (GstPulseSink * psink, GstCaps * caps)
{
......
......@@ -121,23 +121,6 @@ GType gst_pulsesink_get_type (void);
_PULSE_SINK_CAPS_COMMON \
_PULSE_SINK_CAPS_1_0
/* FIXME 0.11: pulseaudiosink helper bin must die */
#define GST_TYPE_PULSE_AUDIO_SINK \
(gst_pulse_audio_sink_get_type())
#define GST_PULSE_AUDIO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSE_AUDIO_SINK,GstPulseAudioSink))
#define GST_PULSE_AUDIO_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSE_AUDIO_SINK,GstPulseAudioSinkClass))
#define GST_IS_PULSE_AUDIO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSE_AUDIO_SINK))
#define GST_IS_PULSE_AUDIO_SINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSE_AUDIO_SINK))
#define GST_PULSE_AUDIO_SINK_CAST(obj) \
((GstPulseAudioSink *)(obj))
GType gst_pulse_audio_sink_get_type (void);
G_END_DECLS
#endif /* __GST_PULSESINK_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment