mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
input_CreateFilename: take explicit input thread pointer
This should fix meta-data expansion in LibVLC (i.e. when recording).
This commit is contained in:
parent
68bc7fd968
commit
776f719e75
@ -607,7 +607,7 @@ VLC_API void input_DecoderDecode( decoder_t *, block_t *, bool b_do_pace );
|
||||
/**
|
||||
* This function creates a sane filename path.
|
||||
*/
|
||||
VLC_API char * input_CreateFilename( vlc_object_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) VLC_USED;
|
||||
VLC_API char * input_CreateFilename( input_thread_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) VLC_USED;
|
||||
|
||||
/**
|
||||
* It creates an empty input resource handler.
|
||||
|
@ -184,7 +184,7 @@ static int Start( stream_t *s, const char *psz_extension )
|
||||
|
||||
/* Create file name
|
||||
* TODO allow prefix configuration */
|
||||
psz_file = input_CreateFilename( VLC_OBJECT(s), psz_path, INPUT_RECORD_PREFIX, psz_extension );
|
||||
psz_file = input_CreateFilename( s->p_input, psz_path, INPUT_RECORD_PREFIX, psz_extension );
|
||||
|
||||
free( psz_path );
|
||||
|
||||
|
@ -461,7 +461,7 @@ static int EsOutSetRecord( es_out_t *out, bool b_record )
|
||||
|
||||
if( !psz_sout && psz_path )
|
||||
{
|
||||
char *psz_file = input_CreateFilename( VLC_OBJECT(p_input), psz_path, INPUT_RECORD_PREFIX, NULL );
|
||||
char *psz_file = input_CreateFilename( p_input, psz_path, INPUT_RECORD_PREFIX, NULL );
|
||||
if( psz_file )
|
||||
{
|
||||
if( asprintf( &psz_sout, "#record{dst-prefix='%s'}", psz_file ) < 0 )
|
||||
|
@ -55,7 +55,6 @@
|
||||
#include <vlc_fs.h>
|
||||
#include <vlc_strings.h>
|
||||
#include <vlc_modules.h>
|
||||
#include <vlc_playlist.h> // FIXME
|
||||
|
||||
/*****************************************************************************
|
||||
* Local prototypes
|
||||
@ -3103,10 +3102,8 @@ void input_UpdateStatistic( input_thread_t *p_input,
|
||||
|
||||
/**/
|
||||
/* TODO FIXME nearly the same logic that snapshot code */
|
||||
char *input_CreateFilename( vlc_object_t *p_obj, const char *psz_path, const char *psz_prefix, const char *psz_extension )
|
||||
char *input_CreateFilename( input_thread_t *input, const char *psz_path, const char *psz_prefix, const char *psz_extension )
|
||||
{
|
||||
playlist_t *pl = pl_Get(p_obj);
|
||||
input_thread_t *input = playlist_CurrentInput(pl);
|
||||
char *psz_file;
|
||||
DIR *path;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user