mirror of https://code.videolan.org/videolan/vlc
stream_filter: record: set "record-file" var to any parents that created it
Not adding an helper for that, this is hackish and should be avoided.
This commit is contained in:
parent
f85ccf1253
commit
e31cdb43cc
|
@ -154,6 +154,18 @@ static int Control( stream_t *s, int i_query, va_list args )
|
|||
return Stop( s );
|
||||
}
|
||||
|
||||
static void set_record_file_var(vlc_object_t *obj, const char *file)
|
||||
{
|
||||
while ((obj = vlc_object_parent(obj)) != NULL)
|
||||
{
|
||||
if (var_Type(obj, "record-file") != 0)
|
||||
{
|
||||
var_SetString(obj, "record-file", file);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Helpers
|
||||
****************************************************************************/
|
||||
|
@ -199,7 +211,7 @@ static int Start( stream_t *s, const char *dir_path, const char *psz_extension )
|
|||
}
|
||||
|
||||
/* signal new record file */
|
||||
var_SetString( vlc_object_instance(s), "record-file", psz_file );
|
||||
set_record_file_var(VLC_OBJECT(s), psz_file);
|
||||
|
||||
msg_Dbg( s, "Recording into %s", psz_file );
|
||||
free( psz_file );
|
||||
|
|
Loading…
Reference in New Issue