gst-plugins-mythtv/src/gstmythtvsrc.c
branchtrunk
changeset 210 b3c3e10c3293
parent 204 5b07de56c816
child 217 aba1e4be0053
     1.1 --- a/gst-plugins-mythtv/src/gstmythtvsrc.c	Wed Dec 06 14:15:39 2006 +0000
     1.2 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c	Wed Dec 06 20:50:15 2006 +0000
     1.3 @@ -696,16 +696,14 @@
     1.4    //    g_string_new( src->uri_name ), -1, src->mythtv_version );
     1.5  	src->file_transfer = gmyth_file_transfer_new(src->backend_info);
     1.6  
     1.7 -  if ( src->file_transfer == NULL ) {
     1.8 +  if ( NULL == src->file_transfer ) 
     1.9 +  {
    1.10      goto init_failed;
    1.11    }
    1.12    GST_INFO_OBJECT( src, "[%s] uri = %s.\n", __FUNCTION__, src->uri_name );
    1.13  
    1.14  	ret = gmyth_file_transfer_open( src->file_transfer, src->uri_name );
    1.15  
    1.16 -  /* sets the Playback monitor connection */
    1.17 -  //ret = gmyth_file_transfer_playback_setup( &(src->file_transfer), src->live_tv );
    1.18 -
    1.19    if ( src->live_tv == TRUE && ret == TRUE ) {
    1.20      /* loop finished, set the max tries variable to zero again... */
    1.21      wait_to_transfer = 0;
    1.22 @@ -730,6 +728,9 @@
    1.23  #endif
    1.24      goto begin_req_failed;
    1.25    }
    1.26 +  
    1.27 +  GST_INFO_OBJECT( src, "MythTV FileTransfer filesize = %lld, content_size = %lld!\n", 
    1.28 +  			src->file_transfer->filesize, src->content_size );
    1.29  
    1.30    src->content_size = src->file_transfer->filesize;
    1.31  
    1.32 @@ -739,10 +740,17 @@
    1.33    src->bytes_queue = g_byte_array_sized_new( INTERNAL_BUFFER_SIZE );
    1.34    src->buffer_remain = 0;
    1.35    
    1.36 -  //gst_pad_push_event ( GST_BASE_SRC_PAD (GST_BASE_SRC (src)),
    1.37 -	//	gst_event_new_new_segment ( TRUE, 1.0, GST_FORMAT_TIME, 0, src->content_size, 0 ) );
    1.38 +  gst_pad_push_event ( GST_BASE_SRC_PAD (GST_BASE_SRC (src)),
    1.39 +		gst_event_new_new_segment ( TRUE, 1.0, GST_FORMAT_TIME, 0, src->content_size, 0 ) );
    1.40  
    1.41  done:
    1.42 +
    1.43 +	if ( chain_id_local != NULL )
    1.44 +	{
    1.45 +		g_string_free( chain_id_local, TRUE );
    1.46 +		chain_id_local = NULL;
    1.47 +	}
    1.48 +		
    1.49    return TRUE;
    1.50  
    1.51    /* ERRORS */