C_SEND,
C_DEL,
C_CONTROL,
-
- C_MAX
};
typedef struct
TAB_INIT( p_sys->i_es, p_sys->pp_es );
- /* TODO config
- * timeshift-granularity
- * timeshift-path
- */
- p_sys->i_tmp_size_max = 50 * 1024*1024;
- p_sys->psz_tmp_path = GetTmpPath( NULL );
+ /* */
+ const int i_tmp_size_max = var_CreateGetInteger( p_input, "input-timeshift-granularity" );
+ if( i_tmp_size_max < 0 )
+ p_sys->i_tmp_size_max = 50*1024*1024;
+ else
+ p_sys->i_tmp_size_max = __MAX( i_tmp_size_max, 1*1024*1024 );
+ msg_Dbg( p_input, "using timeshift granularity of %d bytes",
+ (int)p_sys->i_tmp_size_max );
+
+ char *psz_tmp_path = var_CreateGetNonEmptyString( p_input, "input-timeshift-path" );
+ p_sys->psz_tmp_path = GetTmpPath( psz_tmp_path );
+ msg_Dbg( p_input, "using timeshift path '%s'", p_sys->psz_tmp_path );
return p_out;
}
if( !p_storage )
{
CmdClean( p_cmd );
+ vlc_mutex_unlock( &p_ts->lock );
+ /* TODO warn the user (but only once) */
return;
}
}
}
+ /* TODO return error and warn the user (but only once) */
TsStoragePushCmd( p_ts->p_storage_w, p_cmd, p_ts->p_storage_r == p_ts->p_storage_w );
vlc_cond_signal( &p_ts->wait );
}
else
{
- fprintf( stderr, "----------------- 2: %m\n" );
+ //fprintf( stderr, "TsStoragePopCmd: %m\n" );
p_cmd->send.p_block = block_Alloc( 1 );
}
}