|
xine-lib
1.2.9
|
#include <stdio.h>#include <fcntl.h>#include <unistd.h>#include <string.h>#include <stdlib.h>#include "group_video.h"#include <xine/xine_internal.h>#include <xine/xineutils.h>#include <xine/demux.h>#include "bswap.h"Data Structures | |
| struct | video_index_entry_t |
| struct | audio_index_entry_t |
| struct | _avisuperindex_entry |
| struct | _avistdindex_entry |
| struct | _avistdindex_chunk |
| struct | _avisuperindex_chunk |
| struct | video_index_t |
| struct | audio_index_t |
| struct | idx_grow_t |
| struct | avi_audio_t |
| struct | avi_t |
| struct | demux_avi_s |
| struct | demux_avi_class_t |
Macros | |
| #define | LOG_MODULE "demux_avi" |
| #define | LOG_VERBOSE |
| #define | AVIIF_KEYFRAME 0x00000010L |
| #define | MAX_AUDIO_STREAMS 8 |
| #define | NUM_PREVIEW_BUFFERS 10 |
| #define | AVI_INDEX_OF_INDEXES 0x00 /* when each entry in aIndex */ |
| #define | AVI_INDEX_OF_CHUNKS 0x01 /* when each entry in aIndex */ |
| #define | AVI_INDEX_IS_DATA 0x80 /* when each entry is aIndex is */ |
| #define | AVI_INDEX_2FIELD 0x01 /* when fields within frames */ |
| #define | AVI_ERR_SIZELIM |
| #define | AVI_ERR_OPEN |
| #define | AVI_ERR_READ 3 /* Error reading from AVI File */ |
| #define | AVI_ERR_WRITE |
| #define | AVI_ERR_WRITE_INDEX |
| #define | AVI_ERR_CLOSE |
| #define | AVI_ERR_NOT_PERM |
| #define | AVI_ERR_NO_MEM 8 /* malloc failed */ |
| #define | AVI_ERR_NO_AVI 9 /* Not an AVI file */ |
| #define | AVI_ERR_NO_HDRL |
| #define | AVI_ERR_NO_MOVI |
| #define | AVI_ERR_NO_VIDS 12 /* AVI file contains no video data */ |
| #define | AVI_ERR_NO_IDX |
| #define | AVI_ERR_BAD_SIZE 14 /* A chunk has an invalid size */ |
| #define | AVI_HEADER_UNKNOWN -1 |
| #define | AVI_HEADER_AUDIO 0 |
| #define | AVI_HEADER_VIDEO 1 |
| #define | AVI_HEADER_SIZE 8 |
| #define | WRAP_THRESHOLD 90000 |
| #define | PTS_AUDIO 0 |
| #define | PTS_VIDEO 1 |
| #define | PAD_EVEN(x) ( ((x)+1) & ~1 ) |
| #define | ERR_EXIT(x) |
Typedefs | |
| typedef struct _avisuperindex_entry | avisuperindex_entry |
| typedef struct _avistdindex_entry | avistdindex_entry |
| typedef struct _avistdindex_chunk | avistdindex_chunk |
| typedef struct _avisuperindex_chunk | avisuperindex_chunk |
| typedef struct demux_avi_s | demux_avi_t |
Functions | |
| static uint32_t | odml_len (unsigned char *str) |
| static uint32_t | odml_key (unsigned char *str) |
| static void | check_newpts (demux_avi_t *this, int64_t pts, int video) |
| static int | video_index_append (avi_t *AVI, off_t pos, uint32_t len, uint32_t flags) |
| static int | audio_index_append (avi_t *AVI, int stream, off_t pos, uint32_t len, off_t tot, uint32_t block_no) |
| static int64_t | get_audio_pts (demux_avi_t *this, int track, uint32_t posc, off_t postot, uint32_t posb) |
| static int64_t | get_video_pts (demux_avi_t *this, off_t pos) |
| static int | video_pos_stopper (demux_avi_t *this, void *data) |
| static int | audio_pos_stopper (demux_avi_t *this, void *data) |
| static int | start_pos_stopper (demux_avi_t *this, void *data) |
| static int | start_time_stopper (demux_avi_t *this, void *data) |
| static int | idx_grow (demux_avi_t *this, int(*stopper)(demux_avi_t *, void *), void *stopdata) |
| static video_index_entry_t * | video_cur_index_entry (demux_avi_t *this) |
| static audio_index_entry_t * | audio_cur_index_entry (demux_avi_t *this, avi_audio_t *AVI_A) |
| static void | AVI_close (avi_t *AVI) |
| static void | reset_idx (demux_avi_t *this, avi_t *AVI) |
| static avi_t * | AVI_init (demux_avi_t *this) |
| static void | AVI_seek_start (avi_t *AVI) |
| static int | AVI_read_audio (demux_avi_t *this, avi_audio_t *AVI_A, char *audbuf, uint32_t bytes, int *buf_flags) |
| static int | AVI_read_video (demux_avi_t *this, avi_t *AVI, char *vidbuf, uint32_t bytes, int *buf_flags) |
| static int | demux_avi_next (demux_avi_t *this, int decoder_flags) |
| static int | get_chunk_header (demux_avi_t *this, uint32_t *len, int *audio_stream) |
| static int | demux_avi_next_streaming (demux_avi_t *this, int decoder_flags) |
| static int | demux_avi_seek_internal (demux_avi_t *this) |
| static int | demux_avi_send_chunk (demux_plugin_t *this_gen) |
| static void | demux_avi_dispose (demux_plugin_t *this_gen) |
| static int | demux_avi_get_status (demux_plugin_t *this_gen) |
| static void | demux_avi_send_headers (demux_plugin_t *this_gen) |
| static int | demux_avi_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing) |
| static int | demux_avi_get_stream_length (demux_plugin_t *this_gen) |
| static uint32_t | demux_avi_get_capabilities (demux_plugin_t *this_gen) |
| static int | demux_avi_get_optional_data (demux_plugin_t *this_gen, void *data, int data_type) |
| static demux_plugin_t * | open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input) |
| void * | demux_avi_init_class (xine_t *xine, void *data) |
| #define AVI_ERR_BAD_SIZE 14 /* A chunk has an invalid size */ |
Referenced by AVI_init().
| #define AVI_ERR_CLOSE |
| #define AVI_ERR_NO_AVI 9 /* Not an AVI file */ |
Referenced by AVI_init().
| #define AVI_ERR_NO_HDRL |
| #define AVI_ERR_NO_IDX |
Referenced by AVI_read_audio(), and AVI_read_video().
| #define AVI_ERR_NO_MEM 8 /* malloc failed */ |
Referenced by AVI_init().
| #define AVI_ERR_NO_MOVI |
| #define AVI_ERR_NO_VIDS 12 /* AVI file contains no video data */ |
Referenced by AVI_init().
| #define AVI_ERR_NOT_PERM |
| #define AVI_ERR_OPEN |
| #define AVI_ERR_READ 3 /* Error reading from AVI File */ |
Referenced by AVI_init(), AVI_read_audio(), and AVI_read_video().
| #define AVI_ERR_SIZELIM |
| #define AVI_ERR_WRITE |
| #define AVI_ERR_WRITE_INDEX |
| #define AVI_HEADER_AUDIO 0 |
Referenced by demux_avi_next_streaming(), and get_chunk_header().
| #define AVI_HEADER_SIZE 8 |
Referenced by AVI_init(), get_chunk_header(), and idx_grow().
| #define AVI_HEADER_UNKNOWN -1 |
Referenced by demux_avi_next_streaming(), and get_chunk_header().
| #define AVI_HEADER_VIDEO 1 |
Referenced by demux_avi_next_streaming(), and get_chunk_header().
| #define AVI_INDEX_2FIELD 0x01 /* when fields within frames */ |
| #define AVI_INDEX_IS_DATA 0x80 /* when each entry is aIndex is */ |
| #define AVI_INDEX_OF_CHUNKS 0x01 /* when each entry in aIndex */ |
| #define AVI_INDEX_OF_INDEXES 0x00 /* when each entry in aIndex */ |
| #define AVIIF_KEYFRAME 0x00000010L |
Referenced by demux_avi_seek_internal(), idx_grow(), start_pos_stopper(), and start_time_stopper().
| #define ERR_EXIT | ( | x | ) |
Referenced by AVI_init().
| #define LOG_MODULE "demux_avi" |
Referenced by demux_avi_send_headers().
| #define LOG_VERBOSE |
| #define MAX_AUDIO_STREAMS 8 |
Referenced by AVI_init().
| #define NUM_PREVIEW_BUFFERS 10 |
Referenced by demux_avi_send_headers(), and demux_matroska_send_headers().
| #define PAD_EVEN | ( | x | ) | ( ((x)+1) & ~1 ) |
Referenced by AVI_init(), and idx_grow().
| #define PTS_AUDIO 0 |
Referenced by demux_avi_next().
| #define PTS_VIDEO 1 |
Referenced by demux_avi_next().
| #define WRAP_THRESHOLD 90000 |
| typedef struct _avistdindex_chunk avistdindex_chunk |
| typedef struct _avistdindex_entry avistdindex_entry |
| typedef struct _avisuperindex_chunk avisuperindex_chunk |
| typedef struct _avisuperindex_entry avisuperindex_entry |
| typedef struct demux_avi_s demux_avi_t |
|
static |
References audio_index_t::aindex, audio_index_t::audio_chunks, avi_audio_t::audio_idx, audio_pos_stopper(), avi_audio_t::audio_posc, idx_grow(), lprintf, and NULL.
Referenced by AVI_read_audio(), demux_avi_next(), and demux_avi_seek_internal().
|
static |
|
static |
References audio_index_t::audio_chunks, avi_audio_t::audio_idx, and avi_audio_t::audio_posc.
Referenced by audio_cur_index_entry(), and demux_avi_next().
|
static |
References _x_freep(), audio_index_t::aindex, avi_t::audio, avi_audio_t::audio_idx, avi_t::bih, avi_t::idx, avi_t::n_audio, avi_t::video_idx, video_index_t::vindex, and avi_audio_t::wavex.
Referenced by AVI_init(), and demux_avi_dispose().
|
static |
References _, _x_bmiheader_le2me(), _X_LE_16, _X_LE_32, _X_LE_64, _x_waveformatex_le2me(), _avisuperindex_chunk::aIndex, avi_t::audio, audio_index_t::audio_chunks, avi_audio_t::audio_idx, audio_index_append(), avi_audio_t::audio_strn, avi_audio_t::audio_superindex, avi_audio_t::audio_tag, avi_audio_t::audio_tot, AVI_close(), AVI_ERR_BAD_SIZE, AVI_ERR_NO_AVI, AVI_ERR_NO_MEM, AVI_ERR_NO_VIDS, AVI_ERR_READ, AVI_HEADER_SIZE, palette_entry_s::b, xine_bmiheader::biClrUsed, avi_t::bih, xine_bmiheader::biHeight, _avisuperindex_chunk::bIndexSubType, _avisuperindex_chunk::bIndexType, xine_bmiheader::biWidth, avi_audio_t::block_no, avi_t::compressor, _avisuperindex_chunk::dwChunkId, _avisuperindex_entry::dwDuration, avi_audio_t::dwInitialFrames, avi_t::dwInitialFrames, avi_audio_t::dwRate, avi_t::dwRate, avi_audio_t::dwSampleSize, avi_audio_t::dwScale, avi_t::dwScale, _avisuperindex_entry::dwSize, _avisuperindex_chunk::dwSize, avi_audio_t::dwStart, avi_t::dwStart, ERR_EXIT, _avisuperindex_chunk::fcc, avi_t::fps, palette_entry_s::g, avi_t::height, avi_t::idx, idx_grow(), input(), avi_t::is_opendml, lprintf, MAX_AUDIO_STREAMS, avi_t::max_idx, avi_t::movi_end, avi_t::movi_start, avi_t::n_audio, avi_t::n_idx, xine_waveformatex::nBlockAlign, xine_waveformatex::nChannels, _avisuperindex_chunk::nEntriesInUse, NULL, odml_key(), odml_len(), PAD_EVEN, avi_t::palette, avi_t::palette_count, _avisuperindex_entry::qwOffset, palette_entry_s::r, reset_idx(), avi_t::total_frames, video_index_t::video_frames, avi_t::video_idx, video_index_append(), avi_t::video_posb, avi_t::video_posf, avi_t::video_strn, avi_t::video_superindex, avi_t::video_tag, avi_audio_t::wavex, avi_audio_t::wavex_len, avi_t::width, _avisuperindex_chunk::wLongsPerEntry, xine_log(), XINE_LOG_MSG, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by open_plugin().
|
static |
References audio_cur_index_entry(), avi_audio_t::audio_posb, avi_audio_t::audio_posc, AVI_ERR_NO_IDX, AVI_ERR_READ, BUF_FLAG_FRAME_END, input(), audio_index_entry_t::len, and audio_index_entry_t::pos.
Referenced by demux_avi_next().
|
static |
References AVI_ERR_NO_IDX, AVI_ERR_READ, BUF_FLAG_FRAME_END, input(), video_index_entry_t::len, video_index_entry_t::pos, video_cur_index_entry(), avi_t::video_posb, and avi_t::video_posf.
Referenced by demux_avi_next().
|
static |
References avi_t::audio, avi_audio_t::audio_posb, avi_audio_t::audio_posc, avi_t::n_audio, avi_t::video_posb, and avi_t::video_posf.
Referenced by demux_avi_seek_internal(), and demux_avi_send_headers().
|
static |
References _x_demux_control_newpts(), BUF_FLAG_SEEK, and lprintf.
Referenced by demux_avi_next().
|
static |
References AVI_close().
Referenced by open_plugin().
|
static |
References DEMUX_CAP_NOCAP.
Referenced by open_plugin().
|
static |
References DEMUX_OPTIONAL_UNSUPPORTED.
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
|
static |
References get_video_pts().
Referenced by open_plugin().
| void* demux_avi_init_class | ( | xine_t * | xine, |
| void * | data | ||
| ) |
References default_demux_class_dispose, N_, and open_plugin().
|
static |
References audio_index_t::audio_chunks, audio_cur_index_entry(), avi_audio_t::audio_idx, audio_pos_stopper(), avi_audio_t::audio_posb, avi_audio_t::audio_posc, avi_audio_t::audio_type, AVI_read_audio(), AVI_read_video(), audio_index_entry_t::block_no, check_newpts(), buf_element_s::decoder_flags, buf_element_s::extra_info, extra_info_s::frame_number, buf_element_s::free_buffer, get_audio_pts(), get_video_pts(), idx_grow(), input(), extra_info_s::input_normpos, extra_info_s::input_time, lprintf, buf_element_s::max_size, buf_element_s::mem, NULL, buf_element_s::pts, PTS_AUDIO, PTS_VIDEO, buf_element_s::size, audio_index_entry_t::tot, buf_element_s::type, video_pos_stopper(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by demux_avi_send_chunk(), and demux_avi_send_headers().
|
static |
References avi_audio_t::audio_posc, avi_audio_t::audio_tot, avi_audio_t::audio_type, AVI_HEADER_AUDIO, AVI_HEADER_UNKNOWN, AVI_HEADER_VIDEO, avi_audio_t::block_no, BUF_FLAG_FRAME_END, buf_element_s::decoder_flags, buf_element_s::extra_info, extra_info_s::frame_number, buf_element_s::free_buffer, get_audio_pts(), get_chunk_header(), get_video_pts(), input(), extra_info_s::input_normpos, extra_info_s::input_time, lprintf, buf_element_s::mem, xine_waveformatex::nBlockAlign, NULL, buf_element_s::pts, buf_element_s::size, buf_element_s::type, and avi_audio_t::wavex.
Referenced by demux_avi_send_chunk().
|
static |
References _x_demux_flush_engine(), and DEMUX_OK.
Referenced by open_plugin().
|
static |
References _x_demux_control_newpts(), audio_cur_index_entry(), AVI_seek_start(), AVIIF_KEYFRAME, audio_index_entry_t::block_no, BUF_FLAG_SEEK, DEMUX_FINISHED, DEMUX_OK, video_index_entry_t::flags, get_audio_pts(), get_video_pts(), idx_grow(), input(), audio_index_entry_t::len, lprintf, NULL, video_index_entry_t::pos, start_pos_stopper(), start_time_stopper(), audio_index_entry_t::tot, video_cur_index_entry(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by demux_avi_send_chunk().
|
static |
References demux_avi_next(), demux_avi_next_streaming(), demux_avi_seek_internal(), and DEMUX_FINISHED.
Referenced by open_plugin().
|
static |
References _x_buf_audio_name(), _x_buf_video_name(), _x_demux_control_start(), _x_formattag_to_buf_audio(), _x_fourcc_to_buf_video(), _X_LE_32, _x_meta_info_set(), _x_report_audio_format_tag(), _x_report_video_fourcc(), _x_stream_info_set(), avi_audio_t::audio_type, AVI_seek_start(), BUF_AUDIO_UNKNOWN, BUF_AUDIO_XAN_DPCM, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_PALETTE, BUF_VIDEO_MPEG4, BUF_VIDEO_RGB, BUF_VIDEO_UNKNOWN, BUF_VIDEO_XVID, BUF_VIDEO_XXAN, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, demux_avi_next(), DEMUX_FINISHED, DEMUX_OK, buf_element_s::free_buffer, LOG_MODULE, lprintf, buf_element_s::max_size, xine_waveformatex::nChannels, xine_waveformatex::nSamplesPerSec, NUM_PREVIEW_BUFFERS, buf_element_s::size, buf_element_s::type, avi_audio_t::wavex, avi_audio_t::wavex_len, xine_waveformatex::wBitsPerSample, XINE_META_INFO_AUDIOCODEC, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_AUDIO_FOURCC, XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_STREAM_INFO_VIDEO_FOURCC, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by open_plugin().
|
static |
References avi_audio_t::dwRate, avi_audio_t::dwSampleSize, avi_audio_t::dwScale, avi_audio_t::dwStart, lprintf, xine_waveformatex::nBlockAlign, and avi_audio_t::wavex.
Referenced by demux_avi_next(), demux_avi_next_streaming(), and demux_avi_seek_internal().
|
static |
References _, _X_LE_32, avi_audio_t::audio_tag, avi_audio_t::audio_tot, AVI_HEADER_AUDIO, AVI_HEADER_SIZE, AVI_HEADER_UNKNOWN, AVI_HEADER_VIDEO, idx_grow(), input(), lprintf, xine_log(), and XINE_LOG_MSG.
Referenced by demux_avi_next_streaming().
|
static |
References lprintf.
Referenced by demux_avi_get_stream_length(), demux_avi_next(), demux_avi_next_streaming(), demux_avi_seek_internal(), and start_time_stopper().
|
static |
References _, _x_action_pending(), _X_LE_32, audio_index_append(), avi_audio_t::audio_tag, avi_audio_t::audio_tot, AVI_HEADER_SIZE, AVIIF_KEYFRAME, avi_audio_t::block_no, BUF_VIDEO_DIVX5, BUF_VIDEO_MPEG4, BUF_VIDEO_MSMPEG4_V1, BUF_VIDEO_MSMPEG4_V2, BUF_VIDEO_MSMPEG4_V3, BUF_VIDEO_XVID, xine_progress_data_t::description, input(), lprintf, xine_waveformatex::nBlockAlign, PAD_EVEN, xine_progress_data_t::percent, video_index_append(), avi_audio_t::wavex, XINE_EVENT_PROGRESS, xine_event_send(), xine_log(), and XINE_LOG_MSG.
Referenced by audio_cur_index_entry(), AVI_init(), demux_avi_next(), demux_avi_seek_internal(), get_chunk_header(), reset_idx(), and video_cur_index_entry().
|
static |
References _X_LE_32.
Referenced by AVI_init().
|
static |
References _X_LE_32.
Referenced by AVI_init().
|
static |
References _x_demux_read_header(), AVI_init(), xine_stream_s::content_detection_method, demux_avi_dispose(), demux_avi_get_capabilities(), demux_avi_get_optional_data(), demux_avi_get_status(), demux_avi_get_stream_length(), demux_avi_seek(), demux_avi_send_chunk(), demux_avi_send_headers(), DEMUX_FINISHED, input(), INPUT_CAP_BLOCK, INPUT_IS_SEEKABLE, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by demux_avi_init_class().
|
static |
References avi_t::audio, audio_index_t::audio_chunks, avi_audio_t::audio_idx, idx_grow(), avi_t::movi_start, avi_t::n_audio, video_index_t::video_frames, and avi_t::video_idx.
Referenced by AVI_init().
|
static |
References AVIIF_KEYFRAME.
Referenced by demux_avi_seek_internal().
|
static |
References AVIIF_KEYFRAME, and get_video_pts().
Referenced by demux_avi_seek_internal().
|
static |
References idx_grow(), NULL, video_index_t::video_frames, avi_t::video_idx, video_pos_stopper(), avi_t::video_posf, and video_index_t::vindex.
Referenced by AVI_read_video(), and demux_avi_seek_internal().
|
static |
References video_index_t::alloc_frames, video_index_entry_t::flags, video_index_entry_t::len, video_index_entry_t::pos, video_index_t::video_frames, avi_t::video_idx, and video_index_t::vindex.
Referenced by AVI_init(), and idx_grow().
|
static |
Referenced by demux_avi_next(), and video_cur_index_entry().
1.8.14