FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
omadec.c File Reference

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

#include <inttypes.h>
#include "libavutil/channel_layout.h"
#include "avformat.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/des.h"
#include "libavutil/mathematics.h"
#include "oma.h"
#include "pcm.h"
#include "id3v2.h"

Go to the source code of this file.

Data Structures

struct  OMAContext
 

Macros

#define OMA_RPROBE_M_VAL   48 + 1
 

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, unsigned size, const uint8_t *r_val)
 
static int nprobe (AVFormatContext *s, uint8_t *enc_header, unsigned size, const uint8_t *n_val)
 
static int decrypt_init (AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
 
static int oma_read_header (AVFormatContext *s)
 
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 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:

Supported decoders: ATRAC3, ATRAC3+, MP3, LPCM

Definition in file omadec.c.

Macro Definition Documentation

#define OMA_RPROBE_M_VAL   48 + 1

Definition at line 121 of file omadec.c.

Referenced by rprobe().

Function Documentation

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

Definition at line 80 of file omadec.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 92 of file omadec.c.

Referenced by decrypt_init(), and nprobe().

static int rprobe ( AVFormatContext s,
uint8_t enc_header,
unsigned  size,
const uint8_t r_val 
)
static

Definition at line 123 of file omadec.c.

Referenced by nprobe().

static int nprobe ( AVFormatContext s,
uint8_t enc_header,
unsigned  size,
const uint8_t n_val 
)
static

Definition at line 153 of file omadec.c.

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

Definition at line 195 of file omadec.c.

Referenced by oma_read_header().

static int oma_read_header ( AVFormatContext s)
static

Definition at line 288 of file omadec.c.

static int oma_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 414 of file omadec.c.

static int oma_read_probe ( AVProbeData p)
static

Definition at line 452 of file omadec.c.

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

Definition at line 473 of file omadec.c.

Variable Documentation

const uint64_t leaf_table[]
static
Initial value:
= {
0xd79e8283acea4620, 0x7a9762f445afd0d8,
0x354d60a60b8c79f1, 0x584e1cde00b07aee,
0x1573cd93da7df623, 0x47f98d79620dd535
}

Definition at line 56 of file omadec.c.

AVInputFormat ff_oma_demuxer
Initial value:
= {
.name = "oma",
.long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"),
.priv_data_size = sizeof(OMAContext),
.extensions = "oma,omg,aa3",
.codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0},
}
static int oma_read_header(AVFormatContext *s)
Definition: omadec.c:288
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: omadec.c:414
const AVCodecTag ff_oma_codec_tags[]
Definition: oma.c:28
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:620
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:473
static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: omadec.c:473
static int flags
Definition: cpu.c:47
static int oma_read_probe(AVProbeData *p)
Definition: omadec.c:452

Definition at line 499 of file omadec.c.