Commit 6e9df1a6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

sout_AccessOutNew: allow any VLC object type, not just sout instance

parent 631a4861
...@@ -97,7 +97,7 @@ struct sout_access_out_t ...@@ -97,7 +97,7 @@ struct sout_access_out_t
int (*pf_seek)( sout_access_out_t *, off_t ); int (*pf_seek)( sout_access_out_t *, off_t );
ssize_t (*pf_read)( sout_access_out_t *, block_t * ); ssize_t (*pf_read)( sout_access_out_t *, block_t * );
ssize_t (*pf_write)( sout_access_out_t *, block_t * ); ssize_t (*pf_write)( sout_access_out_t *, block_t * );
int (*pf_control)( sout_access_out_t *, int, va_list); int (*pf_control)( sout_access_out_t *, int, va_list );
config_chain_t *p_cfg; config_chain_t *p_cfg;
}; };
...@@ -107,12 +107,14 @@ enum access_out_query_e ...@@ -107,12 +107,14 @@ enum access_out_query_e
ACCESS_OUT_CONTROLS_PACE, /* arg1=bool *, can fail (assume true) */ ACCESS_OUT_CONTROLS_PACE, /* arg1=bool *, can fail (assume true) */
}; };
VLC_EXPORT( sout_access_out_t *,sout_AccessOutNew, ( sout_instance_t *, const char *psz_access, const char *psz_name ) ); VLC_EXPORT( sout_access_out_t *,sout_AccessOutNew, ( vlc_object_t *, const char *psz_access, const char *psz_name ) );
#define sout_AccessOutNew( obj, access, name ) \
sout_AccessOutNew( VLC_OBJECT(obj), access, name )
VLC_EXPORT( void, sout_AccessOutDelete, ( sout_access_out_t * ) ); VLC_EXPORT( void, sout_AccessOutDelete, ( sout_access_out_t * ) );
VLC_EXPORT( int, sout_AccessOutSeek, ( sout_access_out_t *, off_t ) ); VLC_EXPORT( int, sout_AccessOutSeek, ( sout_access_out_t *, off_t ) );
VLC_EXPORT( ssize_t, sout_AccessOutRead, ( sout_access_out_t *, block_t * ) ); VLC_EXPORT( ssize_t, sout_AccessOutRead, ( sout_access_out_t *, block_t * ) );
VLC_EXPORT( ssize_t, sout_AccessOutWrite, ( sout_access_out_t *, block_t * ) ); VLC_EXPORT( ssize_t, sout_AccessOutWrite, ( sout_access_out_t *, block_t * ) );
VLC_EXPORT( int, sout_AccessOutControl,( sout_access_out_t *, int, ... ) ); VLC_EXPORT( int, sout_AccessOutControl, ( sout_access_out_t *, int, ... ) );
static inline bool sout_AccessOutCanControlPace( sout_access_out_t *p_ao ) static inline bool sout_AccessOutCanControlPace( sout_access_out_t *p_ao )
{ {
......
...@@ -288,10 +288,11 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input, ...@@ -288,10 +288,11 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input,
return i_ret; return i_ret;
} }
#undef sout_AccessOutNew
/***************************************************************************** /*****************************************************************************
* sout_AccessOutNew: allocate a new access out * sout_AccessOutNew: allocate a new access out
*****************************************************************************/ *****************************************************************************/
sout_access_out_t *sout_AccessOutNew( sout_instance_t *p_sout, sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
const char *psz_access, const char *psz_name ) const char *psz_access, const char *psz_name )
{ {
static const char typename[] = "access out"; static const char typename[] = "access out";
......
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