[svn r236] Moved newly added program chain setup from plug-in to the GFileTransfer.
1.1 --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 20 14:25:38 2006 +0000
1.2 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 20 14:43:11 2006 +0000
1.3 @@ -361,19 +361,20 @@
1.4 sizetoread -= len;
1.5 }
1.6 else if ( len < 0 )
1.7 - {
1.8 - read = -1;
1.9 + {
1.10
1.11 if ( src->live_tv == FALSE )
1.12 {
1.13 - goto eos;
1.14 + read = -1;
1.15 + goto eos;
1.16 }
1.17 else
1.18 {
1.19 if ( len == GMYTHTV_FILE_TRANSFER_READ_ERROR ) { /* -314 */
1.20 - //src->update_prog_chain = TRUE;
1.21 + GST_INFO_OBJECT( src, "[%s] [LiveTV] FileTransfer READ_ERROR!\n", __FUNCTION__ );
1.22 goto done;
1.23 } else if ( len == GMYTHTV_FILE_TRANSFER_NEXT_PROG_CHAIN ) { /* -315 */
1.24 + GST_INFO_OBJECT( src, "[%s] [LiveTV] FileTransfer - Go to the next program chain!\n", __FUNCTION__ );
1.25 continue;
1.26 }
1.27 goto done;
1.28 @@ -468,24 +469,10 @@
1.29
1.30 guint buffer_size = ( src->buffer_remain < MAX_READ_SIZE) ? src->buffer_remain : MAX_READ_SIZE;
1.31
1.32 - /* Create the buffer. */
1.33 - /*
1.34 - ret = gst_pad_alloc_buffer ( GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
1.35 - GST_BUFFER_OFFSET_NONE, buffer_size,
1.36 - GST_PAD_CAPS (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc))), outbuf );
1.37 -
1.38 - if (G_UNLIKELY (ret != GST_FLOW_OK)) {
1.39 - if ( src->live_tv )
1.40 - goto change_progchain;
1.41 - else
1.42 - goto done;
1.43 - }
1.44 - */
1.45 -
1.46 *outbuf = gst_buffer_new( );
1.47
1.48 /* gets the first buffer_size bytes from the byte array buffer variable */
1.49 - //guint8 *buf = g_memdup( src->bytes_queue->data, buffer_size );
1.50 + /* guint8 *buf = g_memdup( src->bytes_queue->data, buffer_size ); */
1.51
1.52 GST_DEBUG_OBJECT( src, "[%s] read from network? %s!, buffer_remain = %d\n", __FUNCTION__,
1.53 read == -1 ? "NO, got from buffer" : "YES, go see the backend's log file", src->buffer_remain );
1.54 @@ -546,7 +533,7 @@
1.55
1.56 gst_pad_push_event ( GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
1.57 gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_TIME, 0, -1, 0 ) );
1.58 - // go to the next program chain
1.59 + /* go to the next program chain */
1.60 src->unique_setup = FALSE;
1.61 src->update_prog_chain = TRUE;
1.62
1.63 @@ -676,6 +663,7 @@
1.64 if ( src->live_tv ) {
1.65 src->spawn_livetv = gmyth_livetv_new( );
1.66 if ( gmyth_livetv_setup( src->spawn_livetv, src->backend_info ) == FALSE ) {
1.67 + GST_INFO_OBJECT( src, "[%s] LiveTV setup felt down on error!!\n", __FUNCTION__ );
1.68 ret = FALSE;
1.69 goto init_failed;
1.70 }
1.71 @@ -684,6 +672,7 @@
1.72
1.73 if (NULL == src->file_transfer )
1.74 {
1.75 + GST_INFO_OBJECT( src, "[%s] [LiveTV] FileTransfer equals to NULL!!!\n", __FUNCTION__ );
1.76 ret = FALSE;
1.77 goto init_failed;
1.78 }
1.79 @@ -707,6 +696,7 @@
1.80
1.81 if ( NULL == src->file_transfer )
1.82 {
1.83 + GST_INFO_OBJECT( src, "[%s] FileTransfer equals to NULL!!!\n", __FUNCTION__ );
1.84 goto init_failed;
1.85 }
1.86 /*GST_INFO_OBJECT( src, "[%s] uri = %s.\n", __FUNCTION__, src->spawn_livetv->file_transfer );*/