X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_sout.h;h=d1a75ad8b5b079db9c4bd3b4370bcbe5e0c3ae19;hb=6a66117a34f627ad9560b07cead07663b48f23b6;hp=78202901cb3420b1f690ff0d6844d98597c4c093;hpb=8287b68cd160ab3be539f654aae117bd537f4d40;p=vlc diff --git a/include/vlc_sout.h b/include/vlc_sout.h index 78202901cb..d1a75ad8b5 100644 --- a/include/vlc_sout.h +++ b/include/vlc_sout.h @@ -24,10 +24,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#if !defined( __LIBVLC__ ) - #error You are not libvlc or one of its plugins. You cannot include this file -#endif - #ifndef _VLC_SOUT_H_ #define _VLC_SOUT_H_ @@ -58,6 +54,21 @@ struct sout_instance_t sout_instance_sys_t *p_sys; }; +/** Stream output statistics */ +typedef enum +{ + SOUT_STATISTIC_DECODED_VIDEO, + SOUT_STATISTIC_DECODED_AUDIO, + SOUT_STATISTIC_DECODED_SUBTITLE, + + /* Use them only if you do not goes through a access_out module */ + SOUT_STATISTIC_SENT_PACKET, + SOUT_STATISTIC_SENT_BYTE, + +} sout_statistic_t; + +VLC_EXPORT( void, sout_UpdateStatistic, ( sout_instance_t *p_sout, sout_statistic_t, int ) ); + /**************************************************************************** * sout_stream_id_t: opaque (private for all sout_stream_t) ****************************************************************************/ @@ -78,8 +89,8 @@ struct sout_access_out_t char *psz_path; sout_access_out_sys_t *p_sys; 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 * ); + 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); config_chain_t *p_cfg; @@ -89,8 +100,8 @@ struct sout_access_out_t 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( int, sout_AccessOutRead, ( sout_access_out_t *, block_t * ) ); -VLC_EXPORT( int, sout_AccessOutWrite, ( 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( int, sout_AccessOutControl,( sout_access_out_t *, int, va_list ) ); /** Muxer structure */ @@ -121,8 +132,8 @@ struct sout_mux_t /* XXX private to stream_output.c */ /* if muxer doesn't support adding stream at any time then we first wait * for stream then we refuse all stream and start muxing */ - vlc_bool_t b_add_stream_any_time; - vlc_bool_t b_waiting_stream; + bool b_add_stream_any_time; + bool b_waiting_stream; /* we wait one second after first stream added */ mtime_t i_add_stream_start; }; @@ -130,9 +141,9 @@ struct sout_mux_t enum sout_mux_query_e { /* capabilities */ - MUX_CAN_ADD_STREAM_WHILE_MUXING, /* arg1= vlc_bool_t *, res=cannot fail */ + MUX_CAN_ADD_STREAM_WHILE_MUXING, /* arg1= bool *, res=cannot fail */ /* properties */ - MUX_GET_ADD_STREAM_WAIT, /* arg1= vlc_bool_t *, res=cannot fail */ + MUX_GET_ADD_STREAM_WAIT, /* arg1= bool *, res=cannot fail */ MUX_GET_MIME, /* arg1= char ** res=can fail */ }; @@ -208,23 +219,19 @@ static inline int sout_StreamIdSend( sout_stream_t *s, sout_stream_id_t *id, blo } /**************************************************************************** - * Announce handler mess + * Announce handler ****************************************************************************/ -VLC_EXPORT( int, sout_AnnounceRegister, (sout_instance_t *,session_descriptor_t*, announce_method_t* ) ); -VLC_EXPORT(session_descriptor_t*,sout_AnnounceRegisterSDP, (sout_instance_t *, const char *, const char *, const char *, announce_method_t* ) ); +VLC_EXPORT(session_descriptor_t*,sout_AnnounceRegisterSDP, ( sout_instance_t *, const char *, const char *, announce_method_t* ) ); VLC_EXPORT( int, sout_AnnounceUnRegister, (sout_instance_t *,session_descriptor_t* ) ); -VLC_EXPORT(session_descriptor_t*,sout_AnnounceSessionCreate, (vlc_object_t *obj, const char *cfgpref) ); -VLC_EXPORT(int, sout_SessionSetMedia, (vlc_object_t *obj, session_descriptor_t *, const char *, const char *, int, const char *, int) ); -VLC_EXPORT(void, sout_AnnounceSessionDestroy, (session_descriptor_t *) ); VLC_EXPORT(announce_method_t*, sout_SAPMethod, (void) ); VLC_EXPORT(void, sout_MethodRelease, (announce_method_t *) ); /** SDP */ -VLC_EXPORT( char *, sdp_Start, (const char *name, const char *description, const char *url, const char *email, const char *phone, const struct sockaddr *orig, size_t origlen, const struct sockaddr *addr, size_t addrlen) ); -VLC_EXPORT( char *, sdp_AddMedia, (char **sdp, const char *type, const char *protocol, int dport, unsigned pt, vlc_bool_t bw_indep, unsigned bw, const char *rtpmap, const char *fmtp) ); -VLC_EXPORT( char *, sdp_AddAttribute, (char **sdp, const char *name, const char *fmt, ...) ATTRIBUTE_FORMAT( 3, 4 ) ); +VLC_EXPORT( char *, vlc_sdp_Start, ( vlc_object_t *obj, const char *cfgpref, const struct sockaddr *src, size_t srclen, const struct sockaddr *addr, size_t addrlen ) ); +VLC_EXPORT( char *, sdp_AddMedia, (char **sdp, const char *type, const char *protocol, int dport, unsigned pt, bool bw_indep, unsigned bw, const char *ptname, unsigned clockrate, unsigned channels, const char *fmtp) ); +VLC_EXPORT( char *, sdp_AddAttribute, (char **sdp, const char *name, const char *fmt, ...) LIBVLC_FORMAT( 3, 4 ) ); #ifdef __cplusplus