xine-lib  1.2.9
Data Structures | Macros | Typedefs | 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
 
struct  demux_asf_class_t
 

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
 

Functions

static uint8_t get_byte (demux_asf_t *this)
 
static uint16_t get_le16 (demux_asf_t *this)
 
static uint32_t get_le32 (demux_asf_t *this)
 
static uint64_t get_le64 (demux_asf_t *this)
 
static int get_guid_id (demux_asf_t *this, GUID *g)
 
static int 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 int asf_parse_packet_align (demux_asf_t *this)
 
static int asf_parse_packet_ecd (demux_asf_t *this, uint32_t *p_hdr_size)
 
static int asf_parse_packet_payload_header (demux_asf_t *this, uint32_t p_hdr_size)
 
static int 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 int 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 int 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 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_topen_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input)
 
static void * init_class (xine_t *xine, void *data)
 

Variables

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

◆ ASF_MODE_ASX_REF

#define ASF_MODE_ASX_REF   1

◆ ASF_MODE_ENCRYPTED_CONTENT

#define ASF_MODE_ENCRYPTED_CONTENT   4

◆ ASF_MODE_HTTP_REF

#define ASF_MODE_HTTP_REF   2

◆ ASF_MODE_NO_CONTENT

#define ASF_MODE_NO_CONTENT   5

◆ 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

◆ 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

◆ PTS_VIDEO

#define PTS_VIDEO   1

◆ WRAP_THRESHOLD

#define WRAP_THRESHOLD   20*90000

Referenced by check_newpts().

Typedef Documentation

◆ demux_asf_t

typedef struct demux_asf_s demux_asf_t

Function Documentation

◆ asf_parse_packet_align()

static int asf_parse_packet_align ( demux_asf_t this)
static

◆ asf_parse_packet_compressed_payload()

static int 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_parse_packet_ecd()

static int asf_parse_packet_ecd ( demux_asf_t this,
uint32_t *  p_hdr_size 
)
static

◆ asf_parse_packet_payload()

static int 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

◆ asf_parse_packet_payload_common()

static int 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_parse_packet_payload_header()

static int asf_parse_packet_payload_header ( demux_asf_t this,
uint32_t  p_hdr_size 
)
static

◆ asf_read_header()

static int asf_read_header ( demux_asf_t this)
static

◆ asf_reorder()

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

References xine_fast_memcpy.

Referenced by asf_send_buffer_defrag().

◆ asf_send_audio_header()

static void asf_send_audio_header ( demux_asf_t this,
int  stream 
)
static

◆ 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

◆ 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

◆ asf_send_video_header()

static void asf_send_video_header ( demux_asf_t this,
int  stream 
)
static

◆ asx_get_time_value()

static uint32_t asx_get_time_value ( const xml_node_t node)
static

◆ check_newpts()

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

◆ demux_asf_dispose()

static void demux_asf_dispose ( demux_plugin_t this_gen)
static

◆ 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

◆ demux_asf_parse_asx_references()

static int demux_asf_parse_asx_references ( demux_asf_t this)
static

◆ demux_asf_parse_http_references()

static int demux_asf_parse_http_references ( demux_asf_t this)
static

◆ demux_asf_seek()

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

◆ demux_asf_send_chunk()

static int demux_asf_send_chunk ( demux_plugin_t this_gen)
static

◆ demux_asf_send_headers()

static void demux_asf_send_headers ( demux_plugin_t this_gen)
static

◆ demux_asf_send_headers_common()

static int demux_asf_send_headers_common ( demux_asf_t this)
static

◆ get_byte()

static uint8_t get_byte ( demux_asf_t this)
static

◆ get_guid()

static int get_guid ( demux_asf_t this)
static

◆ get_guid_id()

static int get_guid_id ( demux_asf_t this,
GUID g 
)
static

◆ get_le16()

static uint16_t get_le16 ( demux_asf_t this)
static

◆ get_le32()

static uint32_t get_le32 ( demux_asf_t this)
static

◆ get_le64()

static uint64_t get_le64 ( demux_asf_t this)
static

◆ init_class()

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

◆ open_plugin()

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

Variable Documentation

◆ demux_info_asf

const demuxer_info_t demux_info_asf
static
Initial value:
= {
10
}

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
}
#define XINE_VERSION_CODE
Definition: xine_internal.h:56
NULL
Definition: xine_plugin.c:91
#define PLUGIN_DEMUX
Definition: xine_plugin.h:30
static void * init_class(xine_t *xine, void *data)
Definition: demux_asf.c:2139
#define PLUGIN_NONE
Definition: xine_plugin.h:28
static const demuxer_info_t demux_info_asf
Definition: demux_asf.c:2170