Commit 890a4fb7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add pf_control to access_output

parent 31456021
/*****************************************************************************
* stream_output.h : stream output module
*****************************************************************************
* Copyright (C) 2002-2005 the VideoLAN team
* Copyright (C) 2002-2007 the VideoLAN team
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
......@@ -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
......
/*****************************************************************************
* stream_output.c : stream output module
*****************************************************************************
* Copyright (C) 2002-2004 the VideoLAN team
* Copyright (C) 2002-2007 the VideoLAN team
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
......@@ -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
*****************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment