libavformat/asfdec.c File Reference

#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
#include "riff.h"
#include "asf.h"
#include "asfcrypt.h"
#include "avlanguage.h"
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  ASFContext

Defines

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

Functions

static int asf_probe (AVProbeData *pd)
static int get_value (AVIOContext *pb, int type)
static void get_tag (AVFormatContext *s, const char *key, int type, int len)
static int asf_read_file_properties (AVFormatContext *s, int64_t size)
static int asf_read_stream_properties (AVFormatContext *s, int64_t size)
static int asf_read_ext_stream_properties (AVFormatContext *s, int64_t size)
static int asf_read_content_desc (AVFormatContext *s, int64_t size)
static int asf_read_ext_content_desc (AVFormatContext *s, int64_t size)
static int asf_read_language_list (AVFormatContext *s, int64_t size)
static int asf_read_metadata (AVFormatContext *s, int64_t size)
static int asf_read_marker (AVFormatContext *s, int64_t size)
static int asf_read_header (AVFormatContext *s)
static int ff_asf_get_packet (AVFormatContext *s, AVIOContext *pb)
 Load a single ASF packet into the demuxer.
static int asf_read_frame_header (AVFormatContext *s, AVIOContext *pb)
static int ff_asf_parse_packet (AVFormatContext *s, AVIOContext *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 AVOption options []
static const AVClass asf_class
AVInputFormat ff_asf_demuxer


Define Documentation

#define ASF_MAX_STREAMS   127

Definition at line 96 of file asfdec.c.

Referenced by asf_read_pts(), and asf_read_stream_properties().

#define DO_2BITS ( bits,
var,
defval   ) 

Value:

switch (bits & 3) \
    { \
    case 3: var = avio_rl32(pb); rsize += 4; break; \
    case 2: var = avio_rl16(pb); rsize += 2; break; \
    case 1: var = avio_r8(pb);   rsize++; break; \
    default: var = defval; break; \
    }

Definition at line 708 of file asfdec.c.

Referenced by asf_read_frame_header(), and ff_asf_get_packet().

#define FRAME_HEADER_SIZE   17

Definition at line 97 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 144 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 1217 of file asfdec.c.

Referenced by asf_read_seek().

static int asf_probe ( AVProbeData pd  )  [static]

Definition at line 147 of file asfdec.c.

static int asf_read_close ( AVFormatContext s  )  [static]

Definition at line 1158 of file asfdec.c.

static int asf_read_content_desc ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 436 of file asfdec.c.

Referenced by asf_read_header().

static int asf_read_ext_content_desc ( AVFormatContext s,
int64_t  size 
) [static]

My sample has that stream set to 0 maybe that mean the container. Asf stream count start at 1. I am using 0 to the container value since it's unused

Definition at line 455 of file asfdec.c.

Referenced by asf_read_header().

static int asf_read_ext_stream_properties ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 388 of file asfdec.c.

Referenced by asf_read_header().

static int asf_read_file_properties ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 197 of file asfdec.c.

Referenced by asf_read_header().

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

Returns:
<0 if error

Definition at line 817 of file asfdec.c.

Referenced by ff_asf_parse_packet().

static int asf_read_header ( AVFormatContext s  )  [static]

Definition at line 573 of file asfdec.c.

static int asf_read_language_list ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 490 of file asfdec.c.

Referenced by asf_read_header().

static int asf_read_marker ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 540 of file asfdec.c.

Referenced by asf_read_header().

static int asf_read_metadata ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 508 of file asfdec.c.

Referenced by asf_read_header().

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

Definition at line 1105 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 1165 of file asfdec.c.

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

Definition at line 1271 of file asfdec.c.

static int asf_read_stream_properties ( AVFormatContext s,
int64_t  size 
) [static]

Definition at line 221 of file asfdec.c.

Referenced by asf_read_header().

static void asf_reset_header ( AVFormatContext s  )  [static]

Definition at line 1124 of file asfdec.c.

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

static int ff_asf_get_packet ( AVFormatContext s,
AVIOContext 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 723 of file asfdec.c.

Referenced by asf_read_packet().

static int ff_asf_parse_packet ( AVFormatContext s,
AVIOContext 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 909 of file asfdec.c.

Referenced by asf_read_packet().

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

Definition at line 166 of file asfdec.c.

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

Definition at line 156 of file asfdec.c.


Variable Documentation

const AVClass asf_class [static]

Initial value:

 {
    .class_name = "asf demuxer",
    .item_name  = av_default_item_name,
    .option     = options,
    .version    = LIBAVUTIL_VERSION_INT,
}

Definition at line 86 of file asfdec.c.

Initial value:

 {
    .name           = "asf",
    .long_name      = NULL_IF_CONFIG_SMALL("ASF format"),
    .priv_data_size = sizeof(ASFContext),
    .read_probe     = asf_probe,
    .read_header    = asf_read_header,
    .read_packet    = asf_read_packet,
    .read_close     = asf_read_close,
    .read_seek      = asf_read_seek,
    .read_timestamp = asf_read_pts,
    .flags          = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH,
    .priv_class     = &asf_class,
}

Definition at line 1312 of file asfdec.c.

Referenced by ff_wms_parse_sdp_a_line().

const AVOption options[] [static]

Initial value:

 {
    {"no_resync_search", "Don't try to resynchronize by looking for a certain optional start code", 0x42, AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
    { NULL },
}

Definition at line 81 of file asfdec.c.


Generated on Fri Oct 26 02:48:01 2012 for FFmpeg by  doxygen 1.5.8