[vlc-devel] commit: sout_AccessOutNew: allow any VLC object type, not just sout instance ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri Aug 29 17:52:59 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Fri Aug 29 17:42:32 2008 +0300| [6e9df1a6258d221c0d505259249bc905782875d7] | committer: Rémi Denis-Courmont 

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e9df1a6258d221c0d505259249bc905782875d7
---

 include/vlc_sout.h                |   16 +++++++++-------
 src/stream_output/stream_output.c |    3 ++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index 3be54cb..a1a245e 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -97,7 +97,7 @@ struct sout_access_out_t
     int                     (*pf_seek)( sout_access_out_t *, off_t );
     ssize_t                 (*pf_read)( 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;
 };
@@ -107,12 +107,14 @@ enum access_out_query_e
     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( void,               sout_AccessOutDelete, ( sout_access_out_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_AccessOutWrite,  ( sout_access_out_t *, block_t * ) );
-VLC_EXPORT( int,                sout_AccessOutControl,( sout_access_out_t *, int, ... ) );
+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( 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_AccessOutWrite, ( sout_access_out_t *, block_t * ) );
+VLC_EXPORT( int, sout_AccessOutControl, ( sout_access_out_t *, int, ... ) );
 
 static inline bool sout_AccessOutCanControlPace( sout_access_out_t *p_ao )
 {
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 4d99323..e853235 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -288,10 +288,11 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input,
     return i_ret;
 }
 
+#undef sout_AccessOutNew
 /*****************************************************************************
  * 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 )
 {
     static const char typename[] = "access out";




More information about the vlc-devel mailing list