[svn r304] Change the movement to the next program info. trunk
authorrosfran
Thu Jan 25 15:17:20 2007 +0000 (2007-01-25)
branchtrunk
changeset 303c96177e93ee2
parent 302 42c40657fc61
child 304 467386b8394a
[svn r304] Change the movement to the next program info.
gst-plugins-mythtv/src/gstmythtvsrc.c
     1.1 --- a/gst-plugins-mythtv/src/gstmythtvsrc.c	Thu Jan 25 15:15:40 2007 +0000
     1.2 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c	Thu Jan 25 15:17:20 2007 +0000
     1.3 @@ -415,9 +415,9 @@
     1.4          goto read_error;
     1.5      } else if (G_UNLIKELY (read == 0)) {
     1.6        if (!src->live_tv)
     1.7 -        goto eos;
     1.8 +        goto done;
     1.9        else
    1.10 -        goto done;
    1.11 +        goto change_progchain;
    1.12      }
    1.13  
    1.14      if (G_UNLIKELY (src->update_prog_chain))
    1.15 @@ -517,6 +517,7 @@
    1.16  
    1.17      gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
    1.18          gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_TIME, 0, -1, 0));
    1.19 +
    1.20      /* go to the next program chain */
    1.21      src->unique_setup = FALSE;
    1.22      src->update_prog_chain = TRUE;
    1.23 @@ -770,8 +771,6 @@
    1.24  static gboolean
    1.25  gst_mythtv_src_next_program_chain (GstMythtvSrc * src)
    1.26  {
    1.27 -  GString *chain_id_local = NULL;
    1.28 -
    1.29    gboolean ret = TRUE;
    1.30  
    1.31    if (!src->live_tv)
    1.32 @@ -805,28 +804,19 @@
    1.33      }
    1.34      /* set up the uri variable */
    1.35      src->uri_name = g_strdup (src->spawn_livetv->proginfo->pathname->str);
    1.36 -    chain_id_local = gmyth_tvchain_get_id (src->spawn_livetv->tvchain);
    1.37 -    if (chain_id_local != NULL) {
    1.38 -      src->live_chain_id = g_strdup (chain_id_local->str);
    1.39 -      GST_DEBUG_OBJECT (src, "Local chain ID = %s", src->live_chain_id);
    1.40 -    }
    1.41 -    src->live_tv_id = src->spawn_livetv->recorder->recorder_num;
    1.42 -    GST_LOG_OBJECT (src, "LiveTV id = %d, URI path = %s",
    1.43 -        src->live_tv_id, src->uri_name);
    1.44 +    
    1.45 +    src->file_transfer = gmyth_livetv_create_file_transfer (src->spawn_livetv);
    1.46 +  } else {
    1.47 +	
    1.48 +	  src->file_transfer = gmyth_file_transfer_new (src->backend_info);
    1.49 +	
    1.50 +	  if (src->file_transfer == NULL) {
    1.51 +	    goto init_failed;
    1.52 +	  }
    1.53 +	
    1.54 +	  ret = gmyth_file_transfer_open (src->file_transfer, src->uri_name);	  
    1.55    }
    1.56  
    1.57 -  src->file_transfer = gmyth_file_transfer_new (src->backend_info);
    1.58 -
    1.59 -  if (src->file_transfer == NULL) {
    1.60 -    goto init_failed;
    1.61 -  }
    1.62 -
    1.63 -  ret = gmyth_file_transfer_open (src->file_transfer, src->uri_name);
    1.64 -
    1.65 -  /* sets the Playback monitor connection */
    1.66 -
    1.67 -  /* sets the FileTransfer instance connection (video/audio download) */
    1.68 -
    1.69    if (ret == FALSE) {
    1.70  #ifndef GST_DISABLE_GST_DEBUG
    1.71      if (src->mythtv_msgs_dbg)
    1.72 @@ -839,10 +829,12 @@
    1.73  
    1.74    src->content_size = src->file_transfer->filesize;
    1.75    if (src->live_tv) {
    1.76 +  	/*
    1.77      src->wait_to_transfer = 0;
    1.78      while (src->wait_to_transfer++ < GMYTHTV_TRANSFER_MAX_WAITS &&
    1.79          src->content_size < GMYTHTV_TRANSFER_MAX_BUFFER)
    1.80        src->content_size = gst_mythtv_src_get_position (src);
    1.81 +    */
    1.82    }
    1.83  
    1.84    src->read_offset = 0;