diff -r b3c3e10c3293 -r b250ee0438a2 gst-plugins-mythtv/src/gstmythtvsrc.c --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 06 20:50:15 2006 +0000 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Fri Dec 15 00:21:57 2006 +0000 @@ -48,7 +48,7 @@ #define GMYTHTV_TRANSFER_MAX_WAITS 100 -#define GMYTHTV_TRANSFER_MAX_RESENDS 5 +#define GMYTHTV_TRANSFER_MAX_RESENDS 2 #define GMYTHTV_TRANSFER_MAX_BUFFER 128*1024 //( 32*1024 ) @@ -376,9 +376,11 @@ else { if ( len == GMYTHTV_FILE_TRANSFER_READ_ERROR ) { /* -314 */ - src->update_prog_chain = TRUE; + //src->update_prog_chain = TRUE; goto done; - } + } else if ( len == GMYTHTV_FILE_TRANSFER_NEXT_PROG_CHAIN ) { /* -315 */ + continue; + } goto done; } @@ -680,8 +682,14 @@ goto init_failed; } - /* set up the uri variable */ - src->uri_name = g_strdup( src->spawn_livetv->proginfo->pathname->str ); + src->file_transfer = gmyth_livetv_create_file_transfer(src->spawn_livetv); + + if (NULL == src->file_transfer ) + { + ret = FALSE; + goto init_failed; + } + /* chain_id_local = gmyth_tvchain_get_id( src->spawn_livetv->tvchain ); if ( chain_id_local != NULL ) { src->live_chain_id = g_strdup( chain_id_local->str ); @@ -689,20 +697,21 @@ } 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 ); + GST_LOG_OBJECT( src, "[%s] LiveTV id = %d, URI path = %s.\n", __FUNCTION__, src->live_tv_id, src->uri_name ); + */ + } else { + + src->file_transfer = gmyth_file_transfer_new( src->backend_info ); + + ret = gmyth_file_transfer_open( src->file_transfer, src->uri_name ); + } - //src->file_transfer = gmyth_file_transfer_new( src->live_tv_id, - // g_string_new( src->uri_name ), -1, src->mythtv_version ); - src->file_transfer = gmyth_file_transfer_new(src->backend_info); - if ( NULL == src->file_transfer ) { goto init_failed; } - GST_INFO_OBJECT( src, "[%s] uri = %s.\n", __FUNCTION__, src->uri_name ); - - ret = gmyth_file_transfer_open( src->file_transfer, src->uri_name ); + /*GST_INFO_OBJECT( src, "[%s] uri = %s.\n", __FUNCTION__, src->spawn_livetv->file_transfer );*/ if ( src->live_tv == TRUE && ret == TRUE ) { /* loop finished, set the max tries variable to zero again... */ @@ -718,8 +727,6 @@ sleep( 3 ); } - /* sets the FileTransfer instance connection (video/audio download) */ - //ret = gmyth_file_transfer_setup( &(src->file_transfer), src->live_tv ); if ( ret == FALSE ) { #ifndef GST_DISABLE_GST_DEBUG