]> git.sesse.net Git - vlc/blobdiff - include/vlc_block.h
* all: improved perfs (using block_ChainLastAppend).
[vlc] / include / vlc_block.h
index c453a249855b5ff92c7b665e6487b04a25465928..422433ae8a617389c85ff7ca8ca3dd3c5b04bd02 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_block.h: Data blocks management functions
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: vlc_block.h,v 1.2 2003/09/02 20:19:25 gbazin Exp $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  */
 typedef struct block_sys_t block_sys_t;
 
+/** The content doesn't follow the last block, or is probably broken */
+#define BLOCK_FLAG_DISCONTINUITY 0x0001
+/** Intra frame */
+#define BLOCK_FLAG_TYPE_I        0x0002
+/** Inter frame with backward reference only */
+#define BLOCK_FLAG_TYPE_P        0x0004
+/** Inter frame with backward and forward reference */
+#define BLOCK_FLAG_TYPE_B        0x0008
+/** For inter frame when you don't know the real type */
+#define BLOCK_FLAG_TYPE_PB       0x0010
+/** Warm that this block is a header one */
+#define BLOCK_FLAG_HEADER        0x0020
+/** This is the last block of the frame */
+#define BLOCK_FLAG_END_OF_FRAME  0x0040
+
+#define BLOCK_FLAG_PRIVATE_MASK  0xffff0000
+#define BLOCK_FLAG_PRIVATE_SHIFT 16
+
 struct block_t
 {
     block_t     *p_next;
 
-    vlc_bool_t  b_frame_display;
-    vlc_bool_t  b_frame_start;
+    uint32_t    i_flags;
+
     mtime_t     i_pts;
     mtime_t     i_dts;
+    mtime_t     i_length;
+
+    int         i_rate;
 
     int         i_buffer;
     uint8_t     *p_buffer;
@@ -91,6 +112,7 @@ static inline block_t *block_Realloc( block_t *p_block, int i_pre, int i_body )
     return p_block->pf_realloc( p_block, i_pre, i_body );
 }
 VLC_EXPORT( void,       block_ChainAppend,  ( block_t **, block_t * ) );
+VLC_EXPORT( void,       block_ChainLastAppend,  ( block_t ***ppp_last, block_t * ) );
 VLC_EXPORT( void,       block_ChainRelease, ( block_t * ) );
 VLC_EXPORT( int,        block_ChainExtract, ( block_t *, void *, int ) );
 VLC_EXPORT( block_t *,  block_ChainGather,  ( block_t * ) );
@@ -104,7 +126,6 @@ VLC_EXPORT( void,           block_FifoRelease,  ( block_fifo_t * ) );
 VLC_EXPORT( void,           block_FifoEmpty,    ( block_fifo_t * ) );
 VLC_EXPORT( int,            block_FifoPut,      ( block_fifo_t *, block_t * ) );
 VLC_EXPORT( block_t *,      block_FifoGet,      ( block_fifo_t * ) );
-VLC_EXPORT( block_t *,      block_FifoGetFrame, ( block_fifo_t * ) );
 VLC_EXPORT( block_t *,      block_FifoShow,     ( block_fifo_t * ) );
 
 #endif /* VLC_BLOCK_H */