libavformat/oma.c File Reference

This is a demuxer for Sony OpenMG Music files. More...

#include "avformat.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/des.h"
#include "pcm.h"
#include "riff.h"
#include "id3v2.h"

Go to the source code of this file.

Data Structures

struct  OMAContext

Defines

#define EA3_HEADER_SIZE   96
#define ID3v2_EA3_MAGIC   "ea3"
#define OMA_ENC_HEADER_SIZE   16

Enumerations

enum  {
  OMA_CODECID_ATRAC3 = 0, OMA_CODECID_ATRAC3P = 1, OMA_CODECID_MP3 = 3, OMA_CODECID_LPCM = 4,
  OMA_CODECID_WMA = 5
}

Functions

static void hex_log (AVFormatContext *s, int level, const char *name, const uint8_t *value, int len)
static int kset (AVFormatContext *s, const uint8_t *r_val, const uint8_t *n_val, int len)
static int rprobe (AVFormatContext *s, uint8_t *enc_header, const uint8_t *r_val)
static int nprobe (AVFormatContext *s, uint8_t *enc_header, int size, const uint8_t *n_val)
static int decrypt_init (AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
static int oma_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int oma_read_packet (AVFormatContext *s, AVPacket *pkt)
static int oma_read_probe (AVProbeData *p)
static int oma_read_seek (struct AVFormatContext *s, int stream_index, int64_t timestamp, int flags)

Variables

static const AVCodecTag codec_oma_tags []
static const uint64_t leaf_table []
AVInputFormat ff_oma_demuxer


Detailed Description

This is a demuxer for Sony OpenMG Music files.

Known file extensions: ".oma", "aa3" The format of such files consists of three parts:

CODEC SUPPORT: Only ATRAC3 codec is currently supported!

Definition in file oma.c.


Define Documentation

#define EA3_HEADER_SIZE   96

Definition at line 51 of file oma.c.

Referenced by oma_read_header(), and oma_read_probe().

#define ID3v2_EA3_MAGIC   "ea3"

Definition at line 52 of file oma.c.

Referenced by oma_read_header(), and oma_read_probe().

#define OMA_ENC_HEADER_SIZE   16

Definition at line 53 of file oma.c.

Referenced by decrypt_init(), nprobe(), and rprobe().


Enumeration Type Documentation

anonymous enum

Enumerator:
OMA_CODECID_ATRAC3 
OMA_CODECID_ATRAC3P 
OMA_CODECID_MP3 
OMA_CODECID_LPCM 
OMA_CODECID_WMA 

Definition at line 55 of file oma.c.


Function Documentation

static int decrypt_init ( AVFormatContext s,
ID3v2ExtraMeta em,
uint8_t *  header 
) [static]

Definition at line 196 of file oma.c.

Referenced by oma_read_header().

static void hex_log ( AVFormatContext s,
int  level,
const char *  name,
const uint8_t *  value,
int  len 
) [static]

Definition at line 94 of file oma.c.

Referenced by decrypt_init().

static int kset ( AVFormatContext s,
const uint8_t *  r_val,
const uint8_t *  n_val,
int  len 
) [static]

Definition at line 105 of file oma.c.

Referenced by decrypt_init(), and nprobe().

static int nprobe ( AVFormatContext s,
uint8_t *  enc_header,
int  size,
const uint8_t *  n_val 
) [static]

Definition at line 160 of file oma.c.

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

Definition at line 279 of file oma.c.

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

Definition at line 386 of file oma.c.

static int oma_read_probe ( AVProbeData p  )  [static]

Definition at line 405 of file oma.c.

static int oma_read_seek ( struct AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
) [static]

Definition at line 433 of file oma.c.

static int rprobe ( AVFormatContext s,
uint8_t *  enc_header,
const uint8_t *  r_val 
) [static]

Definition at line 133 of file oma.c.

Referenced by nprobe().


Variable Documentation

const AVCodecTag codec_oma_tags[] [static]

Initial value:

 {
    .name           = "oma",
    .long_name      = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"),
    .priv_data_size = sizeof(OMAContext),
    .read_probe     = oma_read_probe,
    .read_header    = oma_read_header,
    .read_packet    = oma_read_packet,
    .read_seek      = oma_read_seek,
    .flags          = AVFMT_GENERIC_INDEX,
    .extensions     = "oma,omg,aa3",
    .codec_tag      = (const AVCodecTag* const []){codec_oma_tags, 0},
}

Definition at line 455 of file oma.c.

const uint64_t leaf_table[] [static]

Initial value:

 {
    0xd79e8283acea4620, 0x7a9762f445afd0d8,
    0x354d60a60b8c79f1, 0x584e1cde00b07aee,
    0x1573cd93da7df623, 0x47f98d79620dd535
}

Definition at line 70 of file oma.c.


Generated on Fri Oct 26 02:43:52 2012 for FFmpeg by  doxygen 1.5.8