xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
asfheader.c File Reference
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <xine/xineutils.h>
#include "bswap.h"
#include "asfheader.h"

Data Structures

struct  asf_reader_t
 
struct  asf_header_internal_t
 

Macros

#define LOG_MODULE   "asfheader"
 
#define LOG_VERBOSE
 
#define iconv_open(TO, FROM)   0
 
#define iconv(CD, INBUF, INLEFT, OUTBUF, OUTLEFT)   iconv_internal(INBUF, INLEFT, OUTBUF, OUTLEFT)
 
#define iconv_close(CD)
 
#define ICONV_CONST   const
 

Typedefs

typedef int iconv_t
 

Functions

static size_t iconv_internal (const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
 
static void asf_reader_init (asf_reader_t *reader, const uint8_t *buffer, int size)
 
static const uint8_t * asf_reader_get_block (asf_reader_t *reader, uint32_t n)
 
static uint8_t * asf_reader_get_bytes (asf_reader_t *reader, uint32_t size)
 
static char * asf_reader_get_string (asf_reader_t *reader, size_t size, iconv_t cd)
 
static int asf_reader_skip (asf_reader_t *reader, uint32_t size)
 
static const uint8_t * asf_reader_get_buffer (asf_reader_t *reader)
 
static int asf_reader_eos (asf_reader_t *reader)
 
static size_t asf_reader_get_size (asf_reader_t *reader)
 
static int asf_header_get_stream_id (asf_header_t *header_pub, uint16_t stream_number)
 
static int asf_header_parse_file_properties (asf_header_t *header, const uint8_t *buffer, int buffer_len)
 
static void asf_header_delete_stream_properties (asf_stream_t *asf_stream)
 
static int asf_header_parse_stream_properties (asf_header_t *header, const uint8_t *buffer, int buffer_len)
 
static void asf_header_delete_stream_extended_properties (asf_stream_extension_t *asf_stream_extension)
 
static int asf_header_parse_stream_extended_properties (asf_header_t *header, const uint8_t *buffer, int buffer_len)
 
static int asf_header_parse_stream_bitrate_properties (asf_header_t *header_pub, const uint8_t *buffer, int buffer_len)
 
static int asf_header_parse_metadata (asf_header_t *header_pub, const uint8_t *buffer, int buffer_len)
 
static int asf_header_parse_header_extension (asf_header_t *header, const uint8_t *buffer, int buffer_len)
 
static int asf_header_parse_content_description (asf_header_t *header_pub, const uint8_t *buffer, int buffer_len)
 
asf_header_tasf_header_new (uint8_t *buffer, int buffer_len)
 
static void asf_header_delete_file_properties (asf_file_t *asf_file)
 
static void asf_header_delete_content (asf_content_t *asf_content)
 
void asf_header_delete (asf_header_t *header_pub)
 
static int asf_header_choose_stream (asf_header_internal_t *header, int stream_type, uint32_t bandwidth)
 
void asf_header_choose_streams (asf_header_t *header_pub, uint32_t bandwidth, int *video_id, int *audio_id)
 
void asf_header_disable_streams (asf_header_t *header_pub, int video_id, int audio_id)
 
asf_guid_t asf_guid_2_num (const uint8_t *guid)
 
void asf_guid_2_str (uint8_t *str, const uint8_t *guid)
 
const char * asf_guid_name (asf_guid_t num)
 

Variables

static const asf_guid_t sorted_nums []
 
static const uint8_t sorted_guids []
 
static const char tab_hex [16] = "0123456789abcdef"
 
static const char * guid_names []
 

Macro Definition Documentation

◆ iconv

#define iconv (   CD,
  INBUF,
  INLEFT,
  OUTBUF,
  OUTLEFT 
)    iconv_internal(INBUF, INLEFT, OUTBUF, OUTLEFT)

◆ iconv_close

#define iconv_close (   CD)

◆ ICONV_CONST

#define ICONV_CONST   const

◆ iconv_open

#define iconv_open (   TO,
  FROM 
)    0

◆ LOG_MODULE

#define LOG_MODULE   "asfheader"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Typedef Documentation

◆ iconv_t

typedef int iconv_t

Function Documentation

◆ asf_guid_2_num()

asf_guid_t asf_guid_2_num ( const uint8_t *  guid)

◆ asf_guid_2_str()

void asf_guid_2_str ( uint8_t *  str,
const uint8_t *  guid 
)

References tab_hex.

Referenced by asf_read_header(), and get_guid_id().

◆ asf_guid_name()

const char * asf_guid_name ( asf_guid_t  num)

◆ asf_header_choose_stream()

static int asf_header_choose_stream ( asf_header_internal_t header,
int  stream_type,
uint32_t  bandwidth 
)
static

◆ asf_header_choose_streams()

void asf_header_choose_streams ( asf_header_t header_pub,
uint32_t  bandwidth,
int *  video_id,
int *  audio_id 
)

◆ asf_header_delete()

void asf_header_delete ( asf_header_t header_pub)

◆ asf_header_delete_content()

static void asf_header_delete_content ( asf_content_t asf_content)
static

◆ asf_header_delete_file_properties()

static void asf_header_delete_file_properties ( asf_file_t asf_file)
static

Referenced by asf_header_delete().

◆ asf_header_delete_stream_extended_properties()

static void asf_header_delete_stream_extended_properties ( asf_stream_extension_t asf_stream_extension)
static

◆ asf_header_delete_stream_properties()

static void asf_header_delete_stream_properties ( asf_stream_t asf_stream)
static

◆ asf_header_disable_streams()

void asf_header_disable_streams ( asf_header_t header_pub,
int  video_id,
int  audio_id 
)

◆ asf_header_get_stream_id()

static int asf_header_get_stream_id ( asf_header_t header_pub,
uint16_t  stream_number 
)
static

◆ asf_header_new()

asf_header_t * asf_header_new ( uint8_t *  buffer,
int  buffer_len 
)

◆ asf_header_parse_content_description()

static int asf_header_parse_content_description ( asf_header_t header_pub,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_header_parse_file_properties()

static int asf_header_parse_file_properties ( asf_header_t header,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_header_parse_header_extension()

static int asf_header_parse_header_extension ( asf_header_t header,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_header_parse_metadata()

static int asf_header_parse_metadata ( asf_header_t header_pub,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_header_parse_stream_bitrate_properties()

static int asf_header_parse_stream_bitrate_properties ( asf_header_t header_pub,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_header_parse_stream_extended_properties()

static int asf_header_parse_stream_extended_properties ( asf_header_t header,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_header_parse_stream_properties()

static int asf_header_parse_stream_properties ( asf_header_t header,
const uint8_t *  buffer,
int  buffer_len 
)
static

◆ asf_reader_eos()

static int asf_reader_eos ( asf_reader_t reader)
static

◆ asf_reader_get_block()

static const uint8_t * asf_reader_get_block ( asf_reader_t reader,
uint32_t  n 
)
static

◆ asf_reader_get_buffer()

static const uint8_t * asf_reader_get_buffer ( asf_reader_t reader)
static

◆ asf_reader_get_bytes()

static uint8_t * asf_reader_get_bytes ( asf_reader_t reader,
uint32_t  size 
)
static

◆ asf_reader_get_size()

static size_t asf_reader_get_size ( asf_reader_t reader)
static

◆ asf_reader_get_string()

static char * asf_reader_get_string ( asf_reader_t reader,
size_t  size,
iconv_t  cd 
)
static

◆ asf_reader_init()

static void asf_reader_init ( asf_reader_t reader,
const uint8_t *  buffer,
int  size 
)
static

◆ asf_reader_skip()

static int asf_reader_skip ( asf_reader_t reader,
uint32_t  size 
)
static

◆ iconv_internal()

static size_t iconv_internal ( const char **  inbuf,
size_t *  inbytesleft,
char **  outbuf,
size_t *  outbytesleft 
)
static

References _X_LE_16.

Variable Documentation

◆ guid_names

const char* guid_names[]
static

Referenced by asf_guid_name().

◆ sorted_guids

const uint8_t sorted_guids[]
static

Referenced by asf_guid_2_num().

◆ sorted_nums

const asf_guid_t sorted_nums[]
static

Referenced by asf_guid_2_num().

◆ tab_hex

const char tab_hex[16] = "0123456789abcdef"
static