# HG changeset patch # User rosfran # Date 1166625791 0 # Node ID a7a8a3b4182eef082fd19402690a231301c97e4e # Parent 803a006ca67849ebb7fefde5af21b0797cba7b43 [svn r236] Moved newly added program chain setup from plug-in to the GFileTransfer. diff -r 803a006ca678 -r a7a8a3b4182e gst-plugins-mythtv/src/gstmythtvsrc.c --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 20 14:25:38 2006 +0000 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 20 14:43:11 2006 +0000 @@ -361,19 +361,20 @@ sizetoread -= len; } else if ( len < 0 ) - { - read = -1; + { if ( src->live_tv == FALSE ) { - goto eos; + read = -1; + goto eos; } else { if ( len == GMYTHTV_FILE_TRANSFER_READ_ERROR ) { /* -314 */ - //src->update_prog_chain = TRUE; + GST_INFO_OBJECT( src, "[%s] [LiveTV] FileTransfer READ_ERROR!\n", __FUNCTION__ ); goto done; } else if ( len == GMYTHTV_FILE_TRANSFER_NEXT_PROG_CHAIN ) { /* -315 */ + GST_INFO_OBJECT( src, "[%s] [LiveTV] FileTransfer - Go to the next program chain!\n", __FUNCTION__ ); continue; } goto done; @@ -468,24 +469,10 @@ guint buffer_size = ( src->buffer_remain < MAX_READ_SIZE) ? src->buffer_remain : MAX_READ_SIZE; - /* Create the buffer. */ - /* - ret = gst_pad_alloc_buffer ( GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)), - GST_BUFFER_OFFSET_NONE, buffer_size, - GST_PAD_CAPS (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc))), outbuf ); - - if (G_UNLIKELY (ret != GST_FLOW_OK)) { - if ( src->live_tv ) - goto change_progchain; - else - goto done; - } - */ - *outbuf = gst_buffer_new( ); /* gets the first buffer_size bytes from the byte array buffer variable */ - //guint8 *buf = g_memdup( src->bytes_queue->data, buffer_size ); + /* guint8 *buf = g_memdup( src->bytes_queue->data, buffer_size ); */ GST_DEBUG_OBJECT( src, "[%s] read from network? %s!, buffer_remain = %d\n", __FUNCTION__, read == -1 ? "NO, got from buffer" : "YES, go see the backend's log file", src->buffer_remain ); @@ -546,7 +533,7 @@ gst_pad_push_event ( GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)), gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_TIME, 0, -1, 0 ) ); - // go to the next program chain + /* go to the next program chain */ src->unique_setup = FALSE; src->update_prog_chain = TRUE; @@ -676,6 +663,7 @@ if ( src->live_tv ) { src->spawn_livetv = gmyth_livetv_new( ); if ( gmyth_livetv_setup( src->spawn_livetv, src->backend_info ) == FALSE ) { + GST_INFO_OBJECT( src, "[%s] LiveTV setup felt down on error!!\n", __FUNCTION__ ); ret = FALSE; goto init_failed; } @@ -684,6 +672,7 @@ if (NULL == src->file_transfer ) { + GST_INFO_OBJECT( src, "[%s] [LiveTV] FileTransfer equals to NULL!!!\n", __FUNCTION__ ); ret = FALSE; goto init_failed; } @@ -707,6 +696,7 @@ if ( NULL == src->file_transfer ) { + GST_INFO_OBJECT( src, "[%s] FileTransfer equals to NULL!!!\n", __FUNCTION__ ); goto init_failed; } /*GST_INFO_OBJECT( src, "[%s] uri = %s.\n", __FUNCTION__, src->spawn_livetv->file_transfer );*/