file_if.h
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:4k
源码类别:
DVD
开发平台:
C/C++
- #ifndef __FILE_IF_H__
- #define __FILE_IF_H__
- #include "avi_if.h"
- #include "file_var.h"
- #include "file_def.h"
- // macros for file_type
- #define RESET_FILE_TYPE() (file_type = FILE_TYPE_UNKNOWN)
- #define SET_FILE_TYPE(x) (file_type = (x))
- #define GET_FILE_TYPE(x) (file_type)
- #define IS_FILE_TYPE_AVI() (file_type == FILE_TYPE_AVI)
- #define IS_FILE_TYPE_ASF() (file_type == FILE_TYPE_ASF)
- #define IS_FILE_TYPE_QT() (file_type == FILE_TYPE_QT)
- // macros for file_media_support
- #define RESET_FILE_SUPPORT_MEDIA() (file_media_support = FILE_MODE_ALL)
- #define SET_FILE_SUPPORT_MEDIA(x) (file_media_support = (x))
- #define ADD_FILE_SUPPORT_MEDIA(x) (file_media_support|= (x))
- #define SUB_FILE_SUPPORT_MEDIA(x) (file_media_support &= ~(x))
- #define GET_FILE_SUPPORT_MEDIA() (file_media_support)
- #define FILE_AUDIO_SUPPORTED() ((file_media_support&FILE_SUPPORT_AUDIO) > 0)
- #define FILE_VIDEO_SUPPORTED() ((file_media_support&FILE_SUPPORT_VIDEO) > 0)
- #define FILE_SUPIC_SUPPORTED() ((file_media_support&FILE_SUPPORT_SUPIC) > 0)
- #define FILE_AVI_IDX1_SUPPORTED() ((file_media_support&FILE_SUPPORT_AVI_IDX1) > 0)
- // macros for file_media_flag
- #define RESET_FILE_MEDIA_FLAG() (file_media_flag = FILE_STRM_FLAG_NONE | FILE_AV_INTERLEAVED)
- #define SET_FILE_MEDIA_FLAG(x) (file_media_flag = (x))
- #define ADD_FILE_MEDIA_FLAG(x) (file_media_flag |= (x))
- #define SUB_FILE_MEDIA_FLAG(x) (file_media_flag &= ~(x))
- #define GET_FILE_MEDIA_FLAG() (file_media_flag)
- #define FILE_HAS_AUDIO() ((file_media_flag&FILE_AUDIO) > 0)
- #define FILE_HAS_VIDEO() ((file_media_flag&FILE_VIDEO) > 0)
- #define FILE_HAS_SUPIC() ((file_media_flag&FILE_SUPIC) > 0)
- #define FILE_UNSUPPORT_AUDIO() ((file_media_flag&FILE_SUPPORTED_AUDIO) == 0)
- #define FILE_UNSUPPORT_VIDEO() ((file_media_flag&FILE_SUPPORTED_VIDEO) == 0)
- #define FILE_UNSUPPORT_SUPIC() ((file_media_flag&FILE_SUPPORTED_SUPIC) == 0)
- #define IS_FILE_AUDIO_VBR() ((file_media_flag&FILE_AUDIO_VBR) > 0)
- #define IS_FILE_AV_INTERLEAVED() ((file_media_flag&FILE_AV_INTERLEAVED) > 0)
- // macros for file_play_state
- #define RESET_FILE_PLAY_STATE() (file_play_state = FILE_NORMAL_STATE)
- #define SET_FILE_PLAY_STATE(x) (file_play_state = (x))
- #define ADD_FILE_PLAY_STATE(x) (file_play_state |= (x))
- #define SUB_FILE_PLAY_STATE(x) (file_play_state &= ~(x))
- #define GET_FILE_PLAY_STATE() (file_play_state)
- #define IS_FILE_DROP_AUDIO() ((file_play_state&FILE_DROPA_STATE) > 0)
- #define IS_FILE_DROP_VIDEO() ((file_play_state&FILE_DROPV_STATE) > 0)
- #define IS_FILE_DROP_SUPIC() ((file_play_state&FILE_DROPS_STATE) > 0)
- // macros for file_error_flag
- #define IS_FILE_ERROR() (file_error_flag >= AVI_ERR_CNT_THRESHOLD)
- #define CLEAR_FILE_ERROR() (file_error_flag = 0)
- // APIs
- int file_init_playback(UINT32 msf, UINT32 len);
- int file_init_audio();
- int file_init_video();
- int file_init_supic();
- int file_set_audio_stream(int aud_strm_num);
- int file_set_video_stream(int vid_strm_num);
- int file_set_supic_stream(int sup_strm_num);
- //void calc_accm_audio_fPTS();
- int do_file_video();
- int do_file_audio();
- int do_file_drop();
- ifunc file_restruct_sync_table;
- ifunc5 file_preparser;
- u32func2 file_ready_to_jump;
- ifunc4 file_get_next_sync;
- ifunc2 file_init_audio_stream;
- ifunc2 file_init_video_stream;
- ifunc2 file_init_supic_stream;
- #if 0
- int file_preparser_init(UINT32 msf, UINT32 len, UINT32 mode);
- UINT32 file_set_aud_stream(int aud_strm_num);
- UINT32 file_set_vid_stream(int vid_strm_num);
- UINT32 file_set_sup_stream(int sup_strm_num);
- ifunc file_preparser;
- ifunc file_is_errored;
- ifunc file_clear_error;
- ifunc file_reset_buffer;
- ifunc file_sync_audio_buffer;
- ifunc2 file_set_audio_fPTS;
- ifunc2 file_set_goto;
- ifunc file_set_goto_next_frame;
- ifunc2 file_fast_get_next_I;
- ifunc avi_error_get_next_I;
- ifunc2 file_set_fast;
- ifunc2 file_set_slow;
- #endif
- #endif // __FILE_IF_H__