From: RĂ©mi Denis-Courmont Date: Sat, 10 Feb 2007 14:43:45 +0000 (+0000) Subject: Add pf_control to access_output X-Git-Tag: 0.9.0-test0~8664 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=890a4fb73ae376b3a6d610dda8ab219b7bad26ce;p=vlc Add pf_control to access_output --- diff --git a/include/vlc_sout.h b/include/vlc_sout.h index 9bd385bbf1..74926ea01d 100644 --- a/include/vlc_sout.h +++ b/include/vlc_sout.h @@ -1,7 +1,7 @@ /***************************************************************************** * stream_output.h : stream output module ***************************************************************************** - * Copyright (C) 2002-2005 the VideoLAN team + * Copyright (C) 2002-2007 the VideoLAN team * $Id$ * * Authors: Christophe Massiot @@ -69,11 +69,7 @@ struct sout_access_out_t VLC_COMMON_MEMBERS module_t *p_module; - - sout_instance_t *p_sout; - char *psz_access; - config_chain_t *p_cfg; int i_writes; /** Local counter reset each time it is transferred to stats */ @@ -84,6 +80,10 @@ struct sout_access_out_t int (*pf_seek)( sout_access_out_t *, off_t ); int (*pf_read)( sout_access_out_t *, block_t * ); int (*pf_write)( sout_access_out_t *, block_t * ); + int (*pf_control)( sout_access_out_t *, int, va_list); + + config_chain_t *p_cfg; + sout_instance_t *p_sout; }; VLC_EXPORT( sout_access_out_t *,sout_AccessOutNew, ( sout_instance_t *, char *psz_access, char *psz_name ) ); @@ -91,6 +91,7 @@ VLC_EXPORT( void, sout_AccessOutDelete, ( sout_access_out_t * ) ); VLC_EXPORT( int, sout_AccessOutSeek, ( sout_access_out_t *, off_t ) ); VLC_EXPORT( int, sout_AccessOutRead, ( sout_access_out_t *, block_t * ) ); VLC_EXPORT( int, sout_AccessOutWrite, ( sout_access_out_t *, block_t * ) ); +VLC_EXPORT( int, sout_AccessOutControl,( sout_access_out_t *, int, va_list ) ); /** Muxer structure */ struct sout_mux_t diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index b76aa56653..c878b22ae7 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -1,7 +1,7 @@ /***************************************************************************** * stream_output.c : stream output module ***************************************************************************** - * Copyright (C) 2002-2004 the VideoLAN team + * Copyright (C) 2002-2007 the VideoLAN team * $Id$ * * Authors: Christophe Massiot @@ -299,6 +299,7 @@ sout_access_out_t *sout_AccessOutNew( sout_instance_t *p_sout, p_access->pf_seek = NULL; p_access->pf_read = NULL; p_access->pf_write = NULL; + p_access->pf_control = NULL; p_access->p_module = NULL; p_access->i_writes = 0; @@ -385,6 +386,15 @@ int sout_AccessOutWrite( sout_access_out_t *p_access, block_t *p_buffer ) return p_access->pf_write( p_access, p_buffer ); } +/** + * sout_AccessOutControl + */ +int sout_AccessOutControl (sout_access_out_t *access, int query, va_list args) +{ + return (access->pf_control) ? access->pf_control (access, query, args) + : VLC_EGENERIC; +} + /***************************************************************************** * sout_MuxNew: create a new mux *****************************************************************************/