diff -r 04cead6ae39b -r 1374c8f47f33 gst-plugins-mythtv/src/gstmythtvsrc.c --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Mon Nov 27 19:24:43 2006 +0000 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Mon Nov 27 22:07:09 2006 +0000 @@ -24,8 +24,6 @@ #include #include -#include - #include #include @@ -311,6 +309,11 @@ g_object_unref (this->spawn_livetv); this->spawn_livetv = NULL; } + + if (this->backend_info) { + g_object_unref (this->backend_info); + this->backend_info = NULL; + } if (this->uri_name) { g_free (this->uri_name); @@ -404,11 +407,12 @@ GST_DEBUG_OBJECT( src, "[%s] offset = %llu, size = %d...\n", __FUNCTION__, src->read_offset, MAX_READ_SIZE ); - GST_DEBUG_OBJECT ( src, "[%s]\t\tCreate: buffer_remain: %d\n", __FUNCTION__, - (gint) src->buffer_remain); + GST_DEBUG_OBJECT ( src, "[%s]\t\tCreate: buffer_remain: %d, buffer_size = %d.\n", __FUNCTION__, + (gint) src->buffer_remain, src->bytes_queue->len ); /* just get from the byte array, no network effort... */ if ( ( src->buffer_remain = src->bytes_queue->len ) < MAX_READ_SIZE ) { + //if ( src->buffer_remain ) { guint buffer_size_inter = INTERNAL_BUFFER_SIZE - src->buffer_remain; GByteArray *buffer = g_byte_array_new(); @@ -641,9 +645,9 @@ } if ( src->live_tv ) { - //gmyth_context_initialize(); + src->backend_info = gmyth_backend_info_new_with_uri( src->uri_name ); src->spawn_livetv = gmyth_livetv_new( ); - if ( gmyth_livetv_setup( src->spawn_livetv ) == FALSE ) { + if ( gmyth_livetv_setup( src->spawn_livetv, src->backend_info ) == FALSE ) { ret = FALSE; goto init_failed; } @@ -655,8 +659,8 @@ src->live_chain_id = g_strdup( chain_id_local->str ); GST_INFO_OBJECT( src, "\t[%s]\tLocal chain ID = %s.\n", __FUNCTION__, src->live_chain_id ); } - if ( src->uri_name == NULL || strlen( src->uri_name ) <= 0 ) - gmyth_context_initialize(); + //if ( src->uri_name == NULL || strlen( src->uri_name ) <= 0 ) + // gmyth_context_initialize(); src->live_tv_id = src->spawn_livetv->recorder->recorder_num; GST_LOG_OBJECT( src, "[%s] LiveTV id = %d, URI path = %s.\n", __FUNCTION__, src->live_tv_id, src->uri_name );