xine-lib: xine-lib-1.2.13/src/demuxers/demux_asf.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
demux_asf.c File Reference
`#include <stdio.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <xine/xine_internal.h>`
`#include <xine/demux.h>`
`#include <xine/xineutils.h>`
`#include "bswap.h"`
`#include "asfheader.h"`
`#include <xine/xmlparser.h>`

## Data Structures
struct | asf_demux_stream_t
struct | demux_asf_s

## Macros
#define | LOG_MODULE "demux_asf"
#define | LOG_VERBOSE
#define | CODEC_TYPE_AUDIO 0
#define | CODEC_TYPE_VIDEO 1
#define | CODEC_TYPE_CONTROL 2
#define | MAX_NUM_STREAMS 23
#define | DEFRAG_BUFSIZE 65536
#define | WRAP_THRESHOLD 20*90000
#define | MAX_FRAME_DUR 90000
#define | PTS_AUDIO 0
#define | PTS_VIDEO 1
#define | ASF_MODE_NORMAL 0
#define | ASF_MODE_ASX_REF 1
#define | ASF_MODE_HTTP_REF 2
#define | ASF_MODE_ASF_REF 3
#define | ASF_MODE_ENCRYPTED_CONTENT 4
#define | ASF_MODE_NO_CONTENT 5
#define | abs(x) ( ((x)<0) ? -(x) : (x) )

## Typedefs
typedef struct demux_asf_s | demux_asf_t

## Enumerations
enum | asf_error_t { ASF_OK = 0 , ASF_EOF , ASF_SEEK_ERROR , ASF_EOS , ASF_NEW_STREAM , ASF_INVALID_DATA_LENGTH , ASF_INVALID_FRAGMENT_LENGTH , ASF_INVALID_RLEN , ASF_INVALID_PAD_SIZE , ASF_UNFINISHED_PACKET }

## Functions
static asf_guid_t | get_guid_id (demux_asf_t *this, const uint8_t *guid)
static asf_guid_t | get_guid (demux_asf_t *this)
static void | asf_send_audio_header (demux_asf_t *this, int stream)
static void | asf_send_video_header (demux_asf_t *this, int stream)
static int | asf_read_header (demux_asf_t *this)
static int | demux_asf_send_headers_common (demux_asf_t *this)
static void | asf_reorder (demux_asf_t *this, uint8_t *src, int len)
static void | check_newpts (demux_asf_t *this, int64_t pts, int video, int frame_end)
static void | asf_send_buffer_nodefrag (demux_asf_t *this, asf_demux_stream_t *stream, int frag_offset, int64_t timestamp, int frag_len)
static void | asf_send_buffer_defrag (demux_asf_t *this, asf_demux_stream_t *stream, int frag_offset, int64_t timestamp, int frag_len)
static asf_error_t | asf_parse_packet_align (demux_asf_t *this)
static asf_error_t | asf_parse_packet_ecd (demux_asf_t *this, uint32_t *p_hdr_size)
static asf_error_t | asf_parse_packet_payload_header (demux_asf_t *this, uint32_t p_hdr_size)
static asf_error_t | asf_parse_packet_payload_common (demux_asf_t *this, uint8_t raw_id, asf_demux_stream_t **stream, uint32_t *frag_offset, uint32_t *rlen)
static asf_error_t | asf_parse_packet_compressed_payload (demux_asf_t *this, asf_demux_stream_t *stream, uint8_t raw_id, uint32_t frag_offset, int64_t *timestamp)
static asf_error_t | asf_parse_packet_payload (demux_asf_t *this, asf_demux_stream_t *stream, uint8_t raw_id, uint32_t frag_offset, uint32_t rlen, int64_t *timestamp)
static size_t | demux_asf_read_file (demux_asf_t *this, char **pbuf)
static int | demux_asf_parse_http_references (demux_asf_t *this)
static int | demux_asf_parse_asf_references (demux_asf_t *this)
static uint32_t | asx_get_time_value (const xml_node_t *node)
static int | demux_asf_parse_asx_references (demux_asf_t *this)
static int | demux_asf_send_chunk (demux_plugin_t *this_gen)
static void | demux_asf_dispose (demux_plugin_t *this_gen)
static int | demux_asf_get_status (demux_plugin_t *this_gen)
static void | demux_asf_send_headers (demux_plugin_t *this_gen)
static int | demux_asf_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing)
static int | demux_asf_get_stream_length (demux_plugin_t *this_gen)
static uint32_t | demux_asf_get_capabilities (demux_plugin_t *this_gen)
static int | demux_asf_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)
static void * | init_class (xine_t *xine, const void *data)

## Variables
static const char * | error_strings []
static const demuxer_info_t | demux_info_asf
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ abs

#define abs | ( |  | x | ) | ( ((x)<0) ? -(x) : (x) )

Referenced by check_newpts().

## ◆ ASF_MODE_ASF_REF

#define ASF_MODE_ASF_REF 3

Referenced by demux_asf_send_chunk(), demux_asf_send_headers(), and open_plugin().

## ◆ ASF_MODE_ASX_REF

#define ASF_MODE_ASX_REF 1

Referenced by demux_asf_send_chunk(), demux_asf_send_headers(), and open_plugin().

## ◆ ASF_MODE_ENCRYPTED_CONTENT

#define ASF_MODE_ENCRYPTED_CONTENT 4

Referenced by asf_read_header(), and demux_asf_send_chunk().

## ◆ ASF_MODE_HTTP_REF

#define ASF_MODE_HTTP_REF 2

Referenced by demux_asf_send_chunk(), demux_asf_send_headers(), and open_plugin().

## ◆ ASF_MODE_NO_CONTENT

#define ASF_MODE_NO_CONTENT 5

Referenced by asf_read_header(), and demux_asf_send_chunk().

## ◆ ASF_MODE_NORMAL

#define ASF_MODE_NORMAL 0

Referenced by demux_asf_seek(), and open_plugin().

## ◆ CODEC_TYPE_AUDIO

#define CODEC_TYPE_AUDIO 0

## ◆ CODEC_TYPE_CONTROL

#define CODEC_TYPE_CONTROL 2

## ◆ CODEC_TYPE_VIDEO

#define CODEC_TYPE_VIDEO 1

## ◆ DEFRAG_BUFSIZE

#define DEFRAG_BUFSIZE 65536

Referenced by asf_read_header(), and asf_send_buffer_defrag().

## ◆ LOG_MODULE

#define LOG_MODULE "demux_asf"

Referenced by asf_read_header().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_FRAME_DUR

#define MAX_FRAME_DUR 90000

## ◆ MAX_NUM_STREAMS

#define MAX_NUM_STREAMS 23

## ◆ PTS_AUDIO

#define PTS_AUDIO 0

Referenced by asf_send_buffer_defrag(), asf_send_buffer_nodefrag(), and demux_asf_seek().

## ◆ PTS_VIDEO

#define PTS_VIDEO 1

Referenced by asf_send_buffer_defrag(), asf_send_buffer_nodefrag(), and demux_asf_seek().

## ◆ WRAP_THRESHOLD

#define WRAP_THRESHOLD 20*90000

Referenced by check_newpts().

## Typedef Documentation

## ◆ demux_asf_t

typedef struct demux_asf_s demux_asf_t

## Enumeration Type Documentation

## ◆ asf_error_t

enum asf_error_t

Enumerator
ASF_OK |
ASF_EOF |
ASF_SEEK_ERROR |
ASF_EOS |
ASF_NEW_STREAM |
ASF_INVALID_DATA_LENGTH |
ASF_INVALID_FRAGMENT_LENGTH |
ASF_INVALID_RLEN |
ASF_INVALID_PAD_SIZE |
ASF_UNFINISHED_PACKET |

## Function Documentation

## ◆ asf_parse_packet_align()

static asf_error_t asf_parse_packet_align | ( | demux_asf_t * | this | ) |
| static

References _x_demux_control_end(), ASF_EOS, ASF_NEW_STREAM, ASF_OK, ASF_SEEK_ERROR, demux_asf_send_headers_common(), get_guid(), GUID_ASF_HEADER, input(), and lprintf.

Referenced by demux_asf_send_chunk().

## ◆ asf_parse_packet_compressed_payload()

static asf_error_t asf_parse_packet_compressed_payload | ( | demux_asf_t * | this,
|  | asf_demux_stream_t * | stream,
|  | uint8_t | raw_id,
|  | uint32_t | frag_offset,
|  | int64_t * | timestamp )
| static

References _X_LE_16, _X_LE_32, ASF_EOF, ASF_INVALID_DATA_LENGTH, ASF_OK, asf_send_buffer_defrag(), asf_send_buffer_nodefrag(), asf_demux_stream_t::buf_type, asf_demux_stream_t::defrag, asf_demux_stream_t::fifo, input(), lprintf, asf_demux_stream_t::payload_size, asf_demux_stream_t::resync, asf_demux_stream_t::seq, asf_demux_stream_t::skip, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_asf_seek(), and demux_asf_send_chunk().

## ◆ asf_parse_packet_ecd()

static asf_error_t asf_parse_packet_ecd | ( | demux_asf_t * | this,
|  | uint32_t * | p_hdr_size )
| static

References _x_demux_control_end(), ASF_EOF, ASF_NEW_STREAM, ASF_OK, demux_asf_send_headers_common(), get_guid_id(), GUID_ASF_HEADER, input(), lprintf, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_asf_seek(), and demux_asf_send_chunk().

## ◆ asf_parse_packet_payload()

static asf_error_t asf_parse_packet_payload | ( | demux_asf_t * | this,
|  | asf_demux_stream_t * | stream,
|  | uint8_t | raw_id,
|  | uint32_t | frag_offset,
|  | uint32_t | rlen,
|  | int64_t * | timestamp )
| static

References _X_LE_16, _X_LE_32, ASF_EOF, ASF_INVALID_FRAGMENT_LENGTH, ASF_OK, asf_send_buffer_defrag(), asf_send_buffer_nodefrag(), asf_demux_stream_t::buf_type, asf_demux_stream_t::defrag, asf_demux_stream_t::fifo, input(), lprintf, asf_demux_stream_t::payload_size, asf_demux_stream_t::resync, asf_demux_stream_t::skip, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_asf_seek(), and demux_asf_send_chunk().

## ◆ asf_parse_packet_payload_common()

static asf_error_t asf_parse_packet_payload_common | ( | demux_asf_t * | this,
|  | uint8_t | raw_id,
|  | asf_demux_stream_t ** | stream,
|  | uint32_t * | frag_offset,
|  | uint32_t * | rlen )
| static

References _X_LE_16, _X_LE_32, ASF_EOF, ASF_INVALID_RLEN, ASF_OK, BUF_CONTROL_RESET_DECODER, input(), lprintf, NULL, asf_demux_stream_t::seq, buf_element_s::type, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_asf_seek(), and demux_asf_send_chunk().

## ◆ asf_parse_packet_payload_header()

static asf_error_t asf_parse_packet_payload_header | ( | demux_asf_t * | this,
|  | uint32_t | p_hdr_size )
| static

References _X_LE_16, _X_LE_32, ASF_EOF, ASF_INVALID_PAD_SIZE, ASF_OK, input(), and lprintf.

Referenced by demux_asf_seek(), and demux_asf_send_chunk().

## ◆ asf_read_header()

static int asf_read_header | ( | demux_asf_t * | this | ) |
| static

References _, _x_bmiheader_le2me(), _x_buf_audio_name(), _x_buf_video_name(), _x_formattag_to_buf_audio(), _x_fourcc_to_buf_video(), _X_LE_16, _X_LE_32, _X_LE_64, _x_message(), _x_meta_info_set(), _x_report_audio_format_tag(), _x_report_video_fourcc(), _x_stream_info_set(), _x_tag32_me2str(), _x_waveformatex_le2me(), asf_guid_2_str(), asf_header_delete(), asf_header_new(), ASF_MODE_ENCRYPTED_CONTENT, ASF_MODE_NO_CONTENT, palette_entry_s::b, xine_bmiheader::biClrUsed, xine_bmiheader::biCompression, xine_bmiheader::biSize, BUF_AUDIO_UNKNOWN, asf_demux_stream_t::buf_type, BUF_VIDEO_UNKNOWN, DEFRAG_BUFSIZE, DEMUX_FINISHED, asf_stream_s::encrypted_flag, asf_stream_s::error_correction_data, asf_stream_s::error_correction_data_length, asf_stream_s::error_correction_type, palette_entry_s::g, GUID_ASF_AUDIO_MEDIA, GUID_ASF_AUDIO_SPREAD, GUID_ASF_VIDEO_MEDIA, height, input(), LOG_MODULE, lprintf, mode(), xine_waveformatex::nChannels, xine_waveformatex::nSamplesPerSec, NULL, asf_demux_stream_t::palette, asf_demux_stream_t::palette_count, asf_stream_s::private_data, asf_stream_s::private_data_length, palette_entry_s::r, asf_stream_s::stream_number, asf_stream_s::stream_type, xine_waveformatex::wBitsPerSample, xine_waveformatex::wFormatTag, width, xine_log(), XINE_LOG_MSG, XINE_META_INFO_AUDIOCODEC, XINE_META_INFO_VIDEOCODEC, XINE_MSG_ENCRYPTED_SOURCE, XINE_MSG_READ_ERROR, XINE_STREAM_INFO_BITRATE, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by demux_asf_send_headers_common().

## ◆ asf_reorder()

static void asf_reorder | ( | demux_asf_t * | this,
|  | uint8_t * | src,
|  | int | len )
| static

Referenced by asf_send_buffer_defrag().

## ◆ asf_send_audio_header()

static void asf_send_audio_header | ( | demux_asf_t * | this,
|  | int | stream )
| static

References _x_stream_info_set(), BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, DEMUX_FINISHED, buf_element_s::free_buffer, lprintf, buf_element_s::max_size, xine_waveformatex::nChannels, xine_waveformatex::nSamplesPerSec, asf_stream_s::private_data, asf_stream_s::private_data_length, buf_element_s::size, buf_element_s::type, xine_waveformatex::wBitsPerSample, xine_waveformatex::wFormatTag, XINE_STREAM_INFO_AUDIO_FOURCC, XINE_VERBOSITY_LOG, and xprintf.

Referenced by demux_asf_send_headers_common().

## ◆ asf_send_buffer_defrag()

static void asf_send_buffer_defrag | ( | demux_asf_t * | this,
|  | asf_demux_stream_t * | stream,
|  | int | frag_offset,
|  | int64_t | timestamp,
|  | int | frag_len )
| static

References asf_reorder(), BUF_FLAG_FRAME_END, BUF_MAJOR_MASK, asf_demux_stream_t::buf_type, BUF_VIDEO_BASE, asf_demux_stream_t::buffer, fifo_buffer_s::buffer_pool_size_alloc, check_newpts(), buf_element_s::content, buf_element_s::decoder_flags, DEFRAG_BUFSIZE, buf_element_s::extra_info, asf_demux_stream_t::fifo, asf_demux_stream_t::frag_offset, input(), extra_info_s::input_normpos, extra_info_s::input_time, lprintf, buf_element_s::max_size, asf_demux_stream_t::payload_size, buf_element_s::pts, PTS_AUDIO, PTS_VIDEO, fifo_buffer_s::put, buf_element_s::size, asf_demux_stream_t::timestamp, buf_element_s::type, xine_fast_memcpy, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by asf_parse_packet_compressed_payload(), and asf_parse_packet_payload().

## ◆ asf_send_buffer_nodefrag()

static void asf_send_buffer_nodefrag | ( | demux_asf_t * | this,
|  | asf_demux_stream_t * | stream,
|  | int | frag_offset,
|  | int64_t | timestamp,
|  | int | frag_len )
| static

References BUF_FLAG_FRAME_END, BUF_FLAG_FRAME_START, BUF_MAJOR_MASK, asf_demux_stream_t::buf_type, BUF_VIDEO_BASE, fifo_buffer_s::buffer_pool_size_alloc, check_newpts(), buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::extra_info, asf_demux_stream_t::fifo, asf_demux_stream_t::frag_offset, buf_element_s::free_buffer, input(), extra_info_s::input_normpos, extra_info_s::input_time, lprintf, buf_element_s::max_size, asf_demux_stream_t::payload_size, buf_element_s::pts, PTS_AUDIO, PTS_VIDEO, fifo_buffer_s::put, buf_element_s::size, buf_element_s::type, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by asf_parse_packet_compressed_payload(), and asf_parse_packet_payload().

## ◆ asf_send_video_header()

static void asf_send_video_header | ( | demux_asf_t * | this,
|  | int | stream )
| static

References _x_stream_info_set(), xine_bmiheader::biCompression, xine_bmiheader::biHeight, xine_bmiheader::biWidth, BUF_FLAG_ASPECT, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_PALETTE, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, DEMUX_FINISHED, buf_element_s::free_buffer, buf_element_s::max_size, asf_demux_stream_t::palette, asf_demux_stream_t::palette_count, asf_stream_s::private_data, asf_stream_s::private_data_length, buf_element_s::size, buf_element_s::type, XINE_STREAM_INFO_VIDEO_FOURCC, XINE_VERBOSITY_LOG, and xprintf.

Referenced by demux_asf_send_headers_common().

## ◆ asx_get_time_value()

static uint32_t asx_get_time_value | ( | const xml_node_t * | node | ) |
| static

References xml_parser_get_property().

Referenced by demux_asf_parse_asx_references().

## ◆ check_newpts()

static void check_newpts | ( | demux_asf_t * | this,
|  | int64_t | pts,
|  | int | video,
|  | int | frame_end )
| static

References _x_demux_control_newpts(), abs, BUF_FLAG_SEEK, lprintf, and WRAP_THRESHOLD.

Referenced by asf_send_buffer_defrag(), asf_send_buffer_nodefrag(), and demux_asf_seek().

## ◆ demux_asf_dispose()

static void demux_asf_dispose | ( | demux_plugin_t * | this_gen | ) |
| static

References asf_header_delete(), asf_demux_stream_t::buffer, and NULL.

Referenced by open_plugin().

## ◆ demux_asf_get_capabilities()

static uint32_t demux_asf_get_capabilities | ( | demux_plugin_t * | this_gen | ) |
| static

References DEMUX_CAP_NOCAP.

Referenced by open_plugin().

## ◆ demux_asf_get_optional_data()

static int demux_asf_get_optional_data | ( | demux_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type )
| static

References DEMUX_OPTIONAL_UNSUPPORTED.

Referenced by open_plugin().

## ◆ demux_asf_get_status()

static int demux_asf_get_status | ( | demux_plugin_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ demux_asf_get_stream_length()

static int demux_asf_get_stream_length | ( | demux_plugin_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ demux_asf_parse_asf_references()

static int demux_asf_parse_asf_references | ( | demux_asf_t * | this | ) |
| static

References _x_demux_send_mrl_reference(), demux_asf_read_file(), DEMUX_FINISHED, NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_asf_send_chunk().

## ◆ demux_asf_parse_asx_references()

static int demux_asf_parse_asx_references | ( | demux_asf_t * | this | ) |
| static

References _x_demux_send_mrl_reference(), asx_get_time_value(), buf_used(), xml_node_s::child, xml_node_s::data, demux_asf_read_file(), DEMUX_FINISHED, xml_node_s::name, xml_node_s::next, NULL, XINE_VERBOSITY_DEBUG, xml_parser_build_tree_r(), XML_PARSER_CASE_INSENSITIVE, xml_parser_finalize_r(), xml_parser_free_tree(), xml_parser_get_property(), xml_parser_init_r(), XML_PARSER_OK, and xprintf.

Referenced by demux_asf_send_chunk().

## ◆ demux_asf_parse_http_references()

static int demux_asf_parse_http_references | ( | demux_asf_t * | this | ) |
| static

References _x_demux_send_mrl_reference(), demux_asf_read_file(), DEMUX_FINISHED, input(), NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by demux_asf_send_chunk().

## ◆ demux_asf_read_file()

static size_t demux_asf_read_file | ( | demux_asf_t * | this,
|  | char ** | pbuf )
| static

References buf_used(), input(), and NULL.

Referenced by demux_asf_parse_asf_references(), demux_asf_parse_asx_references(), and demux_asf_parse_http_references().

## ◆ demux_asf_seek()

static int demux_asf_seek | ( | demux_plugin_t * | this_gen,
|  | off_t | start_pos,
|  | int | start_time,
|  | int | playing )
| static

References _x_demux_flush_engine(), ASF_MODE_NORMAL, asf_parse_packet_compressed_payload(), asf_parse_packet_ecd(), asf_parse_packet_payload(), asf_parse_packet_payload_common(), asf_parse_packet_payload_header(), check_newpts(), DEMUX_FINISHED, DEMUX_OK, error_strings, input(), INPUT_CAP_SEEKABLE, lprintf, mode(), NULL, PTS_AUDIO, PTS_VIDEO, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ demux_asf_send_chunk()

static int demux_asf_send_chunk | ( | demux_plugin_t * | this_gen | ) |
| static

References ASF_MODE_ASF_REF, ASF_MODE_ASX_REF, ASF_MODE_ENCRYPTED_CONTENT, ASF_MODE_HTTP_REF, ASF_MODE_NO_CONTENT, asf_parse_packet_align(), asf_parse_packet_compressed_payload(), asf_parse_packet_ecd(), asf_parse_packet_payload(), asf_parse_packet_payload_common(), asf_parse_packet_payload_header(), demux_asf_parse_asf_references(), demux_asf_parse_asx_references(), demux_asf_parse_http_references(), DEMUX_FINISHED, error_strings, input(), mode(), NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ demux_asf_send_headers()

static void demux_asf_send_headers | ( | demux_plugin_t * | this_gen | ) |
| static

References _x_demux_control_start(), ASF_MODE_ASF_REF, ASF_MODE_ASX_REF, ASF_MODE_HTTP_REF, demux_asf_send_headers_common(), DEMUX_FINISHED, DEMUX_OK, get_guid(), GUID_ASF_HEADER, input(), INPUT_CAP_SEEKABLE, lprintf, mode(), demux_plugin_s::seek, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ demux_asf_send_headers_common()

static int demux_asf_send_headers_common | ( | demux_asf_t * | this | ) |
| static

References _x_demux_control_start(), _X_LE_16, _x_meta_info_set(), _x_stream_info_set(), asf_header_choose_streams(), asf_read_header(), asf_send_audio_header(), asf_send_video_header(), DEMUX_FINISHED, asf_stream_s::error_correction_data, asf_stream_s::error_correction_data_length, asf_stream_s::error_correction_type, GUID_ASF_AUDIO_SPREAD, NULL, XINE_META_INFO_ARTIST, XINE_META_INFO_COMMENT, XINE_META_INFO_TITLE, XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by asf_parse_packet_align(), asf_parse_packet_ecd(), and demux_asf_send_headers().

## ◆ get_guid()

static asf_guid_t get_guid | ( | demux_asf_t * | this | ) |
| static

References DEMUX_FINISHED, get_guid_id(), GUID_ERROR, input(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by asf_parse_packet_align(), and demux_asf_send_headers().

## ◆ get_guid_id()

static asf_guid_t get_guid_id | ( | demux_asf_t * | this,
|  | const uint8_t * | guid )
| static

References asf_guid_2_num(), asf_guid_2_str(), GUID_ERROR, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by asf_parse_packet_ecd(), and get_guid().

## ◆ init_class()

static void * init_class | ( | xine_t * | xine,
|  | const void * | data )
| static

References demux_plugin_s::dispose, N_, NULL, demux_class_s::open_plugin, and open_plugin().

## ◆ open_plugin()

static demux_plugin_t * open_plugin | ( | demux_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | input_plugin_t * | input )
| static

References _x_demux_read_header(), asf_guid_2_num(), ASF_MODE_ASF_REF, ASF_MODE_ASX_REF, ASF_MODE_HTTP_REF, ASF_MODE_NORMAL, xine_stream_s::content_detection_method, demux_asf_dispose(), demux_asf_get_capabilities(), demux_asf_get_optional_data(), demux_asf_get_status(), demux_asf_get_stream_length(), demux_asf_seek(), demux_asf_send_chunk(), demux_asf_send_headers(), DEMUX_FINISHED, GUID_ASF_HEADER, input(), INPUT_CAP_SEEKABLE, INPUT_OPTIONAL_DATA_PREVIEW, INPUT_OPTIONAL_UNSUPPORTED, lprintf, MAX_PREVIEW_SIZE, METHOD_BY_CONTENT, METHOD_BY_MRL, METHOD_EXPLICIT, mode(), NULL, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by init_class().

## Variable Documentation

## ◆ demux_info_asf

const demuxer_info_t demux_info_asf
| static

Initial value:
= {
.priority = 10,
}

## ◆ error_strings

const char* error_strings[]
| static

Initial value:
= {
"success",
"unexpected end of input",
"seek error",
"end of stream",
"unexpected new stream",
"invalid data length",
"invalid fragment length",
"invalid rlen",
"invalid pad size",
"unfinished packet"
}

Referenced by demux_asf_seek(), and demux_asf_send_chunk().

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_DEMUX, 27, "asf", XINE_VERSION_CODE, &demux_info_asf, init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_class
static void * init_class(xine_t *xine, const void *data)
Definition demux_asf.c:2136
demux_info_asf
static const demuxer_info_t demux_info_asf
Definition demux_asf.c:2166
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_DEMUX
#define PLUGIN_DEMUX
Definition xine_plugin.h:31
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29