gst_pulsemixer_change_state (GstElement * element, GstStateChange transition)
{
GstPulseMixer *this = GST_PULSEMIXER (element);
+ GstStateChangeReturn res;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
gst_pulsemixer_ctrl_new (G_OBJECT (this), this->server,
this->device, GST_PULSEMIXER_UNKNOWN);
break;
+ default:
+ ;
+ }
+
+ res = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+ switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
if (this->mixer) {
gst_pulsemixer_ctrl_free (this->mixer);
this->mixer = NULL;
}
break;
-
default:
;
}
- if (GST_ELEMENT_CLASS (parent_class)->change_state)
- return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
- return GST_STATE_CHANGE_SUCCESS;
+ return res;
}
g_assert (c);
+ GST_DEBUG_OBJECT (c->object, "ctrl open");
+
c->mainloop = pa_threaded_mainloop_new ();
g_assert (c->mainloop);
/* Get sink info */
if (c->type == GST_PULSEMIXER_UNKNOWN || c->type == GST_PULSEMIXER_SINK) {
+ GST_WARNING_OBJECT (c->object, "Get info for '%s'", c->device);
if (!(o =
pa_context_get_sink_info_by_name (c->context, c->device,
gst_pulsemixer_ctrl_sink_info_cb, c))) {
{
g_assert (c);
+ GST_DEBUG_OBJECT (c->object, "ctrl close");
+
if (c->mainloop)
pa_threaded_mainloop_stop (c->mainloop);
{
GstPulseMixerCtrl *c = NULL;
+ GST_DEBUG_OBJECT (object, "new mixer ctrl for %s", device);
c = g_new (GstPulseMixerCtrl, 1);
c->object = g_object_ref (object);
c->tracklist = NULL;
g_assert (c);
+ GST_DEBUG_OBJECT (c->object, "probe open");
+
c->mainloop = pa_threaded_mainloop_new ();
g_assert (c->mainloop);
{
pa_operation *o = NULL;
+ GST_DEBUG_OBJECT (c->object, "probe enumerate");
+
pa_threaded_mainloop_lock (c->mainloop);
if (c->enumerate_sinks) {
{
g_assert (c);
+ GST_DEBUG_OBJECT (c->object, "probe close");
+
if (c->mainloop)
pa_threaded_mainloop_stop (c->mainloop);