libavformat/asfdec.c File Reference

#include "libavutil/common.h"
#include "libavutil/avstring.h"
#include "libavcodec/mpegaudio.h"
#include "avformat.h"
#include "riff.h"
#include "asf.h"
#include "asfcrypt.h"
#include "avlanguage.h"
#include <assert.h>

Go to the source code of this file.

Defines

#define FRAME_HEADER_SIZE   17
#define print_guid(g)
#define DO_2BITS(bits, var, defval)

Functions

void ff_mms_set_stream_selection (URLContext *h, AVFormatContext *format)
static int guidcmp (const void *g1, const void *g2)
static void get_guid (ByteIOContext *s, ff_asf_guid *g)
static void get_str16_nolen (ByteIOContext *pb, int len, char *buf, int buf_size)
static int asf_probe (AVProbeData *pd)
static int get_value (ByteIOContext *pb, int type)
static void get_tag (AVFormatContext *s, const char *key, int type, int len)
static int asf_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int ff_asf_get_packet (AVFormatContext *s, ByteIOContext *pb)
 Load a single ASF packet into the demuxer.
static int asf_read_frame_header (AVFormatContext *s, ByteIOContext *pb)
static int ff_asf_parse_packet (AVFormatContext *s, ByteIOContext *pb, AVPacket *pkt)
 Parse data from individual ASF packets (which were previously loaded with asf_get_packet()).
static int asf_read_packet (AVFormatContext *s, AVPacket *pkt)
static void asf_reset_header (AVFormatContext *s)
static int asf_read_close (AVFormatContext *s)
static int64_t asf_read_pts (AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
static void asf_build_simple_index (AVFormatContext *s, int stream_index)
static int asf_read_seek (AVFormatContext *s, int stream_index, int64_t pts, int flags)

Variables

static const ff_asf_guid index_guid
static const ff_asf_guid stream_bitrate_guid
AVInputFormat asf_demuxer


Define Documentation

#define DO_2BITS ( bits,
var,
defval   ) 

Value:

switch (bits & 3) \
    { \
    case 3: var = get_le32(pb); rsize += 4; break; \
    case 2: var = get_le16(pb); rsize += 2; break; \
    case 1: var = get_byte(pb); rsize++; break; \
    default: var = defval; break; \
    }

Definition at line 631 of file asfdec.c.

Referenced by asf_read_frame_header(), and ff_asf_get_packet().

#define FRAME_HEADER_SIZE   17

Definition at line 38 of file asfdec.c.

Referenced by asf_read_packet(), ff_asf_parse_packet(), ffm_read_packet(), and ffm_write_packet().

#define print_guid ( g   ) 

Definition at line 96 of file asfdec.c.

Referenced by asf_read_header().


Function Documentation

static void asf_build_simple_index ( AVFormatContext s,
int  stream_index 
) [static]

Definition at line 1096 of file asfdec.c.

Referenced by asf_read_seek().

static int asf_probe ( AVProbeData pd  )  [static]

Definition at line 138 of file asfdec.c.

static int asf_read_close ( AVFormatContext s  )  [static]

Definition at line 1033 of file asfdec.c.

static int asf_read_frame_header ( AVFormatContext s,
ByteIOContext pb 
) [static]

Returns:
<0 if error

Definition at line 731 of file asfdec.c.

Referenced by ff_asf_parse_packet().

static int asf_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 183 of file asfdec.c.

static int asf_read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 977 of file asfdec.c.

static int64_t asf_read_pts ( AVFormatContext s,
int  stream_index,
int64_t *  ppos,
int64_t  pos_limit 
) [static]

Definition at line 1045 of file asfdec.c.

static int asf_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  pts,
int  flags 
) [static]

Definition at line 1132 of file asfdec.c.

static void asf_reset_header ( AVFormatContext s  )  [static]

Definition at line 998 of file asfdec.c.

Referenced by asf_read_close(), asf_read_pts(), and asf_read_seek().

static int ff_asf_get_packet ( AVFormatContext s,
ByteIOContext pb 
) [static]

Load a single ASF packet into the demuxer.

Parameters:
s demux context
pb context to read data from
Returns:
0 on success, <0 on error

This code allows handling of -EAGAIN at packet boundaries (i.e. if the packet sync code above triggers -EAGAIN). This does not imply complete -EAGAIN handling support at random positions in the stream.

Definition at line 646 of file asfdec.c.

Referenced by asf_read_packet().

static int ff_asf_parse_packet ( AVFormatContext s,
ByteIOContext pb,
AVPacket pkt 
) [static]

Parse data from individual ASF packets (which were previously loaded with asf_get_packet()).

Parameters:
s demux context
pb context to read data from
pkt pointer to store packet data into
Returns:
0 if data was stored in pkt, <0 on error or 1 if more ASF packets need to be loaded (through asf_get_packet())

Definition at line 810 of file asfdec.c.

Referenced by asf_read_packet().

void ff_mms_set_stream_selection ( URLContext h,
AVFormatContext format 
)

static void get_guid ( ByteIOContext s,
ff_asf_guid g 
) [static]

Definition at line 99 of file asfdec.c.

Referenced by asf_build_simple_index(), and asf_read_header().

static void get_str16_nolen ( ByteIOContext pb,
int  len,
char *  buf,
int  buf_size 
) [static]

Definition at line 123 of file asfdec.c.

Referenced by asf_read_header(), and get_tag().

static void get_tag ( AVFormatContext s,
const char *  key,
int  type,
int  len 
) [static]

Definition at line 157 of file asfdec.c.

static int get_value ( ByteIOContext pb,
int  type 
) [static]

Definition at line 147 of file asfdec.c.

static int guidcmp ( const void *  g1,
const void *  g2 
) [static]

Definition at line 51 of file asfdec.c.

Referenced by asf_build_simple_index(), asf_probe(), and asf_read_header().


Variable Documentation

const ff_asf_guid index_guid [static]

Initial value:

 {
    0x90, 0x08, 0x00, 0x33, 0xb1, 0xe5, 0xcf, 0x11, 0x89, 0xf4, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xcb
}

Definition at line 41 of file asfdec.c.

Referenced by asf_build_simple_index().

Initial value:

 { 
    0xce, 0x75, 0xf8, 0x7b, 0x8d, 0x46, 0xd1, 0x11, 0x8d, 0x82, 0x00, 0x60, 0x97, 0xc9, 0xa2, 0xb2
}

Definition at line 45 of file asfdec.c.

Referenced by asf_read_header().


Generated on Fri Oct 26 02:36:54 2012 for FFmpeg by  doxygen 1.5.8