]> git.sesse.net Git - vlc/blobdiff - include/stream_output.h
* src/libvlc.h, src/input/input.c:
[vlc] / include / stream_output.h
index c3dc50fa2f8752a78daf8c33bd1968a74be19c7a..d0787a57d548a72e6f67a72c27687d55cb29d6af 100644 (file)
@@ -2,7 +2,7 @@
  * stream_output.h : stream output module
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: stream_output.h,v 1.18 2003/12/07 17:09:33 gbazin Exp $
+ * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Laurent Aimar <fenrir@via.ecp.fr>
 #define SOUT_BUFFER_FLAGS_PRIVATE_MASK  0xffff0000
 #define SOUT_BUFFER_FLAGS_PRIVATE_SHIFT 16
 
+/*
+ * Flags originating from block_t (FIXME: this is temporary).
+ */
+#define SOUT_BUFFER_FLAGS_BLOCK_MASK    0x0000ff00
+#define SOUT_BUFFER_FLAGS_BLOCK_SHIFT   8
+
 struct sout_buffer_t
 {
     size_t                  i_allocated_size;
@@ -121,6 +127,8 @@ struct sout_access_out_t
     sout_access_out_sys_t   *p_sys;
     int                     (* pf_seek  )( sout_access_out_t *,
                                            off_t );
+    int                     (* pf_read  )( sout_access_out_t *,
+                                           sout_buffer_t * );
     int                     (* pf_write )( sout_access_out_t *,
                                            sout_buffer_t * );
 };
@@ -177,7 +185,7 @@ struct  sout_mux_t
     /* creater private */
     void                    *p_sys_owner;
 #endif
-    
+
     /* 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 */
@@ -225,19 +233,23 @@ struct sout_instance_t
 {
     VLC_COMMON_MEMBERS
 
-    char * psz_sout;
-    char * psz_chain;
+    char *psz_sout;
+    char *psz_chain;
+
+    /* meta data (Read only) XXX it won't be set before the first packet received */
+    vlc_meta_t          *p_meta;
 
     /* muxer data */
-    int                     i_preheader;    /* max over all muxer */
+    int                 i_preheader;    /* max over all muxer */
 
-    int                     i_padding;      /* needed by some decoders */
+    int                 i_padding;      /* needed by some decoders */
+    int                 i_out_pace_nocontrol;   /* count of output that can't control the space */
 
-    vlc_mutex_t             lock;
-    sout_stream_t           *p_stream;
+    vlc_mutex_t         lock;
+    sout_stream_t       *p_stream;
 
     /* sout private */
-    sout_instance_sys_t     *p_sys;
+    sout_instance_sys_t *p_sys;
 };
 
 static inline sout_cfg_t *sout_cfg_find( sout_cfg_t *p_cfg, char *psz_name )
@@ -280,8 +292,7 @@ VLC_EXPORT( sout_buffer_t *, sout_FifoGet,        ( sout_fifo_t * ) );
 VLC_EXPORT( sout_buffer_t *, sout_FifoShow,       ( sout_fifo_t * ) );
 
 
-#define sout_InputNew( a, b ) __sout_InputNew( VLC_OBJECT(a), b )
-VLC_EXPORT( sout_packetizer_input_t *, __sout_InputNew,       ( vlc_object_t *, es_format_t * ) );
+VLC_EXPORT( sout_packetizer_input_t *, sout_InputNew,( sout_instance_t *, es_format_t * ) );
 VLC_EXPORT( int,            sout_InputDelete,      ( sout_packetizer_input_t * ) );
 VLC_EXPORT( int,            sout_InputSendBuffer,  ( sout_packetizer_input_t *, sout_buffer_t* ) );
 
@@ -295,6 +306,7 @@ VLC_EXPORT( void,           sout_BufferChain,  ( sout_buffer_t **, sout_buffer_t
 VLC_EXPORT( sout_access_out_t *, sout_AccessOutNew, ( sout_instance_t *, char *psz_access, 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 *, sout_buffer_t * ) );
 VLC_EXPORT( int,                 sout_AccessOutWrite,  ( sout_access_out_t *, sout_buffer_t * ) );
 
 VLC_EXPORT( sout_mux_t *,       sout_MuxNew,          ( sout_instance_t*, char *, sout_access_out_t * ) );