diff -r dbe90c54acdf -r c96177e93ee2 gst-plugins-mythtv/src/gstmythtvsrc.c --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Jan 24 14:48:47 2007 +0000 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Thu Jan 25 15:17:20 2007 +0000 @@ -415,9 +415,9 @@ goto read_error; } else if (G_UNLIKELY (read == 0)) { if (!src->live_tv) - goto eos; + goto done; else - goto done; + goto change_progchain; } if (G_UNLIKELY (src->update_prog_chain)) @@ -517,6 +517,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 */ src->unique_setup = FALSE; src->update_prog_chain = TRUE; @@ -770,8 +771,6 @@ static gboolean gst_mythtv_src_next_program_chain (GstMythtvSrc * src) { - GString *chain_id_local = NULL; - gboolean ret = TRUE; if (!src->live_tv) @@ -805,28 +804,19 @@ } /* set up the uri variable */ src->uri_name = g_strdup (src->spawn_livetv->proginfo->pathname->str); - 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); - GST_DEBUG_OBJECT (src, "Local chain ID = %s", src->live_chain_id); - } - src->live_tv_id = src->spawn_livetv->recorder->recorder_num; - GST_LOG_OBJECT (src, "LiveTV id = %d, URI path = %s", - src->live_tv_id, src->uri_name); + + src->file_transfer = gmyth_livetv_create_file_transfer (src->spawn_livetv); + } else { + + src->file_transfer = gmyth_file_transfer_new (src->backend_info); + + if (src->file_transfer == NULL) { + goto init_failed; + } + + ret = gmyth_file_transfer_open (src->file_transfer, src->uri_name); } - src->file_transfer = gmyth_file_transfer_new (src->backend_info); - - if (src->file_transfer == NULL) { - goto init_failed; - } - - ret = gmyth_file_transfer_open (src->file_transfer, src->uri_name); - - /* sets the Playback monitor connection */ - - /* sets the FileTransfer instance connection (video/audio download) */ - if (ret == FALSE) { #ifndef GST_DISABLE_GST_DEBUG if (src->mythtv_msgs_dbg) @@ -839,10 +829,12 @@ src->content_size = src->file_transfer->filesize; if (src->live_tv) { + /* src->wait_to_transfer = 0; while (src->wait_to_transfer++ < GMYTHTV_TRANSFER_MAX_WAITS && src->content_size < GMYTHTV_TRANSFER_MAX_BUFFER) src->content_size = gst_mythtv_src_get_position (src); + */ } src->read_offset = 0;