xine-lib 1.2.13-20230125hg15249
|
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "group_video.h"
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/demux.h>
#include "bswap.h"
#include "demux_real_common.h"
Data Structures | |
struct | mdpr_t |
struct | real_index_entry_t |
struct | real_stream_t |
struct | demux_real_t |
Macros | |
#define | LOG_MODULE "demux_real" |
#define | LOG_VERBOSE |
#define | FOURCC_TAG BE_FOURCC |
#define | PROP_TAG FOURCC_TAG('P', 'R', 'O', 'P') |
#define | MDPR_TAG FOURCC_TAG('M', 'D', 'P', 'R') |
#define | CONT_TAG FOURCC_TAG('C', 'O', 'N', 'T') |
#define | DATA_TAG FOURCC_TAG('D', 'A', 'T', 'A') |
#define | RA_TAG FOURCC_TAG('.', 'r', 'a', 0xfd) |
#define | VIDO_TAG FOURCC_TAG('V', 'I', 'D', 'O') |
#define | PREAMBLE_SIZE 8 |
#define | REAL_SIGNATURE_SIZE 8 |
#define | DATA_CHUNK_HEADER_SIZE 10 |
#define | DATA_PACKET_HEADER_SIZE 12 |
#define | INDEX_CHUNK_HEADER_SIZE 20 |
#define | INDEX_RECORD_SIZE 14 |
#define | PN_KEYFRAME_FLAG 0x0002 |
#define | MAX_VIDEO_STREAMS 10 |
#define | MAX_AUDIO_STREAMS 8 |
#define | FRAGMENT_TAB_SIZE 256 |
#define | ALIGN4(q) q = (uint8_t *)(((uintptr_t)q + 3) & ~(uintptr_t)3) |
#define | SET_METADATA_STRING(type) |
#define | abs(x) ( ((x)<0) ? -(x) : (x) ) |
#define | WRAP_THRESHOLD 220000 |
#define | PTS_AUDIO 0 |
#define | PTS_VIDEO 1 |
#define | PTS_BOTH 2 |
#define | NEEDBYTES(n) |
#define | my_strnstr(haystack, haystacklen, needle) memmem(haystack, haystacklen, needle, sizeof(needle)) |
#define abs | ( | x | ) | ( ((x)<0) ? -(x) : (x) ) |
Referenced by check_newpts().
#define ALIGN4 | ( | q | ) | q = (uint8_t *)(((uintptr_t)q + 3) & ~(uintptr_t)3) |
#define CONT_TAG FOURCC_TAG('C', 'O', 'N', 'T') |
Referenced by pnm_get_chunk(), real_parse_headers(), and rmff_new_cont().
#define DATA_CHUNK_HEADER_SIZE 10 |
Referenced by demux_real_send_chunk(), and real_parse_headers().
#define DATA_PACKET_HEADER_SIZE 12 |
Referenced by demux_real_send_chunk().
#define DATA_TAG FOURCC_TAG('D', 'A', 'T', 'A') |
Referenced by real_parse_headers().
#define FOURCC_TAG BE_FOURCC |
#define FRAGMENT_TAB_SIZE 256 |
Referenced by real_parse_headers().
#define INDEX_CHUNK_HEADER_SIZE 20 |
Referenced by real_parse_index().
#define INDEX_RECORD_SIZE 14 |
Referenced by real_parse_index().
#define LOG_MODULE "demux_real" |
Referenced by real_parse_headers().
#define LOG_VERBOSE |
#define MAX_AUDIO_STREAMS 8 |
Referenced by real_parse_headers().
#define MAX_VIDEO_STREAMS 10 |
Referenced by real_parse_headers().
#define MDPR_TAG FOURCC_TAG('M', 'D', 'P', 'R') |
Referenced by pnm_get_chunk(), real_parse_headers(), and rmff_new_mdpr().
#define my_strnstr | ( | haystack, | |
haystacklen, | |||
needle ) memmem(haystack, haystacklen, needle, sizeof(needle)) |
#define NEEDBYTES | ( | n | ) |
#define PN_KEYFRAME_FLAG 0x0002 |
Referenced by demux_real_send_chunk().
#define PREAMBLE_SIZE 8 |
Referenced by demux_real_send_chunk(), and real_parse_headers().
#define PROP_TAG FOURCC_TAG('P', 'R', 'O', 'P') |
Referenced by pnm_get_chunk(), pnm_get_headers(), real_parse_headers(), and rmff_new_prop().
#define PTS_AUDIO 0 |
Referenced by demux_real_send_chunk().
#define PTS_BOTH 2 |
Referenced by demux_real_seek(), and demux_real_send_headers().
#define PTS_VIDEO 1 |
Referenced by demux_real_send_chunk().
#define RA_TAG FOURCC_TAG('.', 'r', 'a', 0xfd) |
Referenced by real_parse_headers().
#define REAL_SIGNATURE_SIZE 8 |
Referenced by real_parse_headers().
#define SET_METADATA_STRING | ( | type | ) |
#define VIDO_TAG FOURCC_TAG('V', 'I', 'D', 'O') |
Referenced by real_parse_headers().
#define WRAP_THRESHOLD 220000 |
Referenced by check_newpts().
|
static |
References _x_demux_control_newpts(), abs, BUF_FLAG_SEEK, and WRAP_THRESHOLD.
Referenced by demux_real_send_chunk().
|
static |
References demux_real_flush(), and real_free_mdpr().
Referenced by open_plugin().
|
static |
Referenced by demux_real_seek().
|
static |
Referenced by demux_real_seek().
|
static |
References NULL.
Referenced by demux_real_dispose(), and demux_real_seek().
|
static |
References DEMUX_CAP_NOCAP.
Referenced by open_plugin().
|
static |
References DEMUX_OPTIONAL_UNSUPPORTED.
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
void * demux_real_init_class | ( | xine_t * | xine, |
const void * | data ) |
References demux_plugin_s::dispose, N_, NULL, open_plugin(), and demux_class_s::open_plugin.
|
static |
References _x_demux_send_mrl_reference(), buf_used(), DEMUX_FINISHED, input(), lprintf, and NULL.
Referenced by demux_real_send_chunk().
|
static |
References _x_demux_flush_engine(), DEMUX_OK, demux_real_find_offs(), demux_real_find_time(), demux_real_flush(), input(), INPUT_CAP_SEEKABLE, lprintf, NULL, real_index_entry_t::offset, and PTS_BOTH.
Referenced by open_plugin().
|
static |
References _X_BE_16, _X_BE_32, _x_demux_read_send_data(), _x_demux_send_data(), _x_is_fourcc(), BUF_AUDIO_AAC, BUF_FLAG_FRAME_END, BUF_FLAG_FRAME_START, BUF_FLAG_KEYFRAME, BUF_FLAG_SPECIAL, BUF_SPECIAL_RV_CHUNK_TABLE, BUF_VIDEO_RV30, BUF_VIDEO_RV40, check_newpts(), buf_element_s::content, DATA_CHUNK_HEADER_SIZE, DATA_PACKET_HEADER_SIZE, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, DEMUX_FINISHED, demux_real_parse_references(), demux_real_sipro_swap(), buf_element_s::extra_info, buf_element_s::free_buffer, input(), extra_info_s::input_normpos, extra_info_s::input_time, lprintf, buf_element_s::max_size, ME_FOURCC, MIN, NEEDBYTES, NULL, PN_KEYFRAME_FLAG, PREAMBLE_SIZE, buf_element_s::pts, PTS_AUDIO, PTS_VIDEO, real_get_reordered_pts(), buf_element_s::size, extra_info_s::total_time, buf_element_s::type, xine_fast_memcpy, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by open_plugin().
|
static |
References _x_stream_info_set(), DEMUX_OK, input(), INPUT_CAP_SEEKABLE, PTS_BOTH, real_parse_headers(), demux_plugin_s::seek, XINE_STREAM_INFO_HAS_AUDIO, and XINE_STREAM_INFO_HAS_VIDEO.
Referenced by open_plugin().
|
static |
References xine_stream_s::content_detection_method, demux_real_dispose(), demux_real_get_capabilities(), demux_real_get_optional_data(), demux_real_get_status(), demux_real_get_stream_length(), demux_real_seek(), demux_real_send_chunk(), demux_real_send_headers(), input(), lprintf, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, NULL, and real_check_stream_type().
Referenced by demux_real_init_class().
|
static |
References _x_demux_read_header(), input(), MIN, and my_strnstr.
Referenced by open_plugin().
|
static |
Referenced by demux_real_dispose(), and real_parse_headers().
|
static |
References BUF_VIDEO_RV20, BUF_VIDEO_RV30, BUF_VIDEO_RV40, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by demux_real_send_chunk().
|
static |
References _X_BE_16, _X_BE_32, _X_ME_32, _x_tag32_me2str(), mdpr_t::avg_bit_rate, real_stream_t::block_align, real_stream_t::cfs, fourcc, real_stream_t::fourcc, real_stream_t::frame_buffer, real_stream_t::frame_num_bytes, real_stream_t::frame_size, real_stream_t::h, real_stream_t::intl, real_stream_t::mdpr, ME_FOURCC, NULL, real_stream_t::sps, mdpr_t::start_time, mdpr_t::stream_number, real_stream_t::sub_packet_cnt, mdpr_t::type_specific_data, mdpr_t::type_specific_len, real_stream_t::w, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by real_parse_headers().
|
static |
References _X_BE_16, _X_BE_32, _x_demux_control_start(), _x_formattag_to_buf_audio(), _x_fourcc_to_buf_video(), _x_is_fourcc(), _X_ME_32, _x_report_video_fourcc(), _x_stream_info_set(), _x_tag32_me2str(), mdpr_t::avg_bit_rate, xine_bmiheader::biHeight, xine_bmiheader::biSize, xine_bmiheader::biWidth, BUF_AUDIO_AAC, BUF_AUDIO_UNKNOWN, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_DECODER_CONFIG, real_stream_t::buf_type, BUF_VIDEO_UNKNOWN, CONT_TAG, buf_element_s::content, DATA_CHUNK_HEADER_SIZE, DATA_TAG, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, DEMUX_FINISHED, buf_element_s::extra_info, real_stream_t::format, fourcc, real_stream_t::fourcc, FRAGMENT_TAB_SIZE, buf_element_s::free_buffer, real_stream_t::index, input(), INPUT_CAP_CLONE, INPUT_CAP_PREVIEW, INPUT_IS_SEEKABLE, extra_info_s::input_normpos, INPUT_OPTIONAL_DATA_CLONE, INPUT_OPTIONAL_DATA_PREVIEW, INPUT_OPTIONAL_SUCCESS, extra_info_s::input_time, LOG_MODULE, lprintf, MAX_AUDIO_STREAMS, MAX_PREVIEW_SIZE, buf_element_s::max_size, MAX_VIDEO_STREAMS, real_stream_t::mdpr, MDPR_TAG, ME_FOURCC, buf_element_s::mem, mdpr_t::mime_type, NULL, PREAMBLE_SIZE, PROP_TAG, RA_TAG, real_free_mdpr(), real_parse_audio_specific_data(), real_parse_index(), real_parse_mdpr(), REAL_SIGNATURE_SIZE, input_plugin_s::seek, SET_METADATA_STRING, buf_element_s::size, mdpr_t::start_time, mdpr_t::stream_number, buf_element_s::type, mdpr_t::type_specific_data, mdpr_t::type_specific_len, VIDO_TAG, XINE_META_INFO_ARTIST, XINE_META_INFO_COMMENT, XINE_META_INFO_TITLE, XINE_META_INFO_YEAR, XINE_STREAM_INFO_AUDIO_BITRATE, XINE_STREAM_INFO_AUDIO_FOURCC, XINE_STREAM_INFO_BITRATE, XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_STREAM_INFO_VIDEO_BITRATE, XINE_STREAM_INFO_VIDEO_FOURCC, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by demux_real_send_headers().
|
static |
References _X_BE_16, _X_BE_32, _x_is_fourcc(), INDEX_CHUNK_HEADER_SIZE, INDEX_RECORD_SIZE, input(), lprintf, NULL, real_index_entry_t::offset, real_index_entry_t::packetno, real_index_entry_t::timestamp, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by real_parse_headers().
|
static |
References _X_BE_16, _X_BE_32, ALIGN4, mdpr_t::avg_bit_rate, mdpr_t::avg_packet_size, mdpr_t::duration, lprintf, mdpr_t::max_bit_rate, mdpr_t::max_packet_size, mdpr_t::mime_type, mdpr_t::mime_type_size, NULL, mdpr_t::object_version, mdpr_t::preroll, mdpr_t::start_time, mdpr_t::stream_name, mdpr_t::stream_name_size, mdpr_t::stream_number, mdpr_t::type_specific_data, mdpr_t::type_specific_len, and xine_hexdump().
Referenced by real_parse_headers().