* avi.h : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: avi.h,v 1.4 2002/10/15 00:55:07 fenrir Exp $
+ * $Id: avi.h,v 1.7 2002/11/15 18:10:26 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-#define MAX_PACKETS_IN_FIFO 2
+typedef struct avi_packet_s
+{
+ vlc_fourcc_t i_fourcc;
+ off_t i_pos;
+ uint32_t i_size;
+ vlc_fourcc_t i_type; // only for AVIFOURCC_LIST
+
+ uint8_t i_peek[8]; //first 8 bytes
+
+ int i_stream;
+ int i_cat;
+} avi_packet_t;
+
typedef struct AVIIndexEntry_s
{
- u32 i_id;
- u32 i_flags;
- u32 i_pos;
- u32 i_length;
- u32 i_lengthtotal;
+ vlc_fourcc_t i_id;
+ uint32_t i_flags;
+ uint32_t i_pos;
+ uint32_t i_length;
+ uint32_t i_lengthtotal;
+
} AVIIndexEntry_t;
-typedef struct AVIESBuffer_s
+typedef struct avi_stream_s
{
- struct AVIESBuffer_s *p_next;
-
- pes_packet_t *p_pes;
- int i_posc;
- int i_posb;
-} AVIESBuffer_t;
+ vlc_bool_t b_activated;
-
-typedef struct AVIStreamInfo_s
-{
int i_cat; /* AUDIO_ES, VIDEO_ES */
- int i_activated;
vlc_fourcc_t i_fourcc;
vlc_fourcc_t i_codec;
int i_scale;
int i_samplesize;
- es_descriptor_t *p_es;
- int b_selected; /* newly selected */
+ es_descriptor_t *p_es;
+
AVIIndexEntry_t *p_index;
int i_idxnb;
int i_idxmax;
int i_idxposc; /* numero of chunk */
int i_idxposb; /* byte in the current chunk */
- /* add some buffering */
- AVIESBuffer_t *p_pes_first;
- AVIESBuffer_t *p_pes_last;
- int i_pes_count;
- int i_pes_totalsize;
-} AVIStreamInfo_t;
+} avi_stream_t;
struct demux_sys_t
{
mtime_t i_time;
mtime_t i_length;
mtime_t i_pcr;
- int i_rate;
- riffchunk_t *p_movi;
- int b_seekable;
+ vlc_bool_t b_seekable;
avi_chunk_t ck_root;
- /* Info extrated from avih */
-
- /* number of stream and informations*/
+ off_t i_movi_begin;
+ off_t i_movi_lastchunk_pos; /* XXX position of last valid chunk */
+
+ /* number of streams and information */
int i_streams;
- AVIStreamInfo_t **pp_info;
+ avi_stream_t **pp_info;
- /* current audio and video es */
- AVIStreamInfo_t *p_info_video;
- AVIStreamInfo_t *p_info_audio;
+#ifdef __AVI_SUBTITLE__
+ subtitle_demux_t *p_sub;
+#endif
+
};