# HG changeset patch # User renatofilho # Date 1179519339 -3600 # Node ID d9c6cce2b16757023ae2a56fe5f4424cd2f6172f # Parent 726550e48c211231e669e9f84833a834c1fc03a0 [svn r698] fixed some bugs diff -r 726550e48c21 -r d9c6cce2b167 gmyth-stream/gmemcoder/src/gmencoder.c --- a/gmyth-stream/gmemcoder/src/gmencoder.c Fri May 18 19:36:49 2007 +0100 +++ b/gmyth-stream/gmemcoder/src/gmencoder.c Fri May 18 21:15:39 2007 +0100 @@ -635,7 +635,9 @@ if (priv->pipe != NULL) { //TODO: fixe pipeline dispose - //gst_element_set_state (priv->pipe, GST_STATE_NULL); + g_debug ("SETING STATE TO NULL"); + gst_element_set_state (priv->pipe, GST_STATE_NULL); + g_debug ("SETING STATE TO NULL: OK"); //gst_object_unref (priv->pipe); gst_object_unref (priv->src); priv->src = NULL; diff -r 726550e48c21 -r d9c6cce2b167 gmyth/src/gmyth_uri.c --- a/gmyth/src/gmyth_uri.c Fri May 18 19:36:49 2007 +0100 +++ b/gmyth/src/gmyth_uri.c Fri May 18 21:15:39 2007 +0100 @@ -416,8 +416,6 @@ g_return_val_if_fail (uri->uri != NULL, FALSE); g_return_val_if_fail (uri->uri->str != NULL, FALSE); - g_debug ("verify [%s]", uri->uri->str); - if ((strstr (uri->uri->str, "channel") == NULL) || (strstr (uri->uri->str, "livetv") == NULL)) ret = FALSE; diff -r 726550e48c21 -r d9c6cce2b167 gst-gmyth/mythsrc/gstmythtvsrc.c --- a/gst-gmyth/mythsrc/gstmythtvsrc.c Fri May 18 19:36:49 2007 +0100 +++ b/gst-gmyth/mythsrc/gstmythtvsrc.c Fri May 18 21:15:39 2007 +0100 @@ -332,8 +332,6 @@ { mythtv_src->unique_setup = FALSE; - g_debug ("CLEAR"); - if (mythtv_src->spawn_livetv) { g_object_unref (mythtv_src->spawn_livetv); mythtv_src->spawn_livetv = NULL; @@ -353,10 +351,6 @@ g_byte_array_free (mythtv_src->bytes_queue, TRUE); mythtv_src->bytes_queue = NULL; } - - - g_debug ("CLEAR END"); - } static void @@ -722,21 +716,8 @@ src->channel_name = ch; if (src->channel_name != NULL) { - gint try = 0; gboolean result; - - while (try < 100) { - result = gmyth_livetv_channel_name_setup (src->spawn_livetv, src->channel_name); - if (result == TRUE) { - g_debug ("LIVE STARTED"); - break; - } - - g_debug ("FAIL TO START LIVE"); - g_usleep (0.5 * G_USEC_PER_SEC); - try++; - } - + result = gmyth_livetv_channel_name_setup (src->spawn_livetv, src->channel_name); if (result == FALSE) { GST_INFO_OBJECT (src, "LiveTV setup felt down on error"); ret = FALSE; @@ -1015,6 +996,8 @@ GstStateChangeReturn ret = GST_STATE_CHANGE_FAILURE; GstMythtvSrc *src = GST_MYTHTV_SRC (element); + g_debug ("MYTHSRC: state_changed"); + switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: break; @@ -1033,13 +1016,18 @@ break; } + + g_debug ("MYTHSRC: state_changed 1"); + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); if (ret == GST_STATE_CHANGE_FAILURE) return ret; + + g_debug ("MYTHSRC: state_changed2"); + switch (transition) { case GST_STATE_CHANGE_READY_TO_NULL: - g_debug ("STAAAAAAAAAAAATTTTTTTTTEEEEEEEEE NULLLLLLLLLLLLLLLL"); gst_mythtv_src_clear (src); break; case GST_STATE_CHANGE_PLAYING_TO_PAUSED: @@ -1049,6 +1037,7 @@ break; } + g_debug ("MYTHSRC: state_changed: DONE"); return ret; } diff -r 726550e48c21 -r d9c6cce2b167 gst-gmyth/nuvdemux/gstnuvdemux.c --- a/gst-gmyth/nuvdemux/gstnuvdemux.c Fri May 18 19:36:49 2007 +0100 +++ b/gst-gmyth/nuvdemux/gstnuvdemux.c Fri May 18 21:15:39 2007 +0100 @@ -1583,6 +1583,7 @@ { GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; + g_debug ("Nuvdemux state_change"); switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: gst_nuv_demux_reset (GST_NUV_DEMUX (element)); @@ -1592,11 +1593,16 @@ break; } + g_debug ("Nuvdemux state_change: 1"); + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); if (ret == GST_STATE_CHANGE_FAILURE) { goto done; } + + g_debug ("Nuvdemux state_change: 2"); + switch (transition) { case GST_STATE_CHANGE_READY_TO_NULL: gst_nuv_demux_reset (GST_NUV_DEMUX (element)); @@ -1606,6 +1612,9 @@ break; } + + g_debug ("Nuvdemux state_change: DONE"); + done: return ret; }