FFmpeg
Macros | Functions | Variables
spdifdec.c File Reference
#include "libavutil/bswap.h"
#include "libavcodec/ac3defs.h"
#include "libavcodec/adts_parser.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "spdif.h"

Go to the source code of this file.

Macros

#define SPDIF_MAX_OFFSET   16384
 

Functions

static int spdif_get_offset_and_codec (AVFormatContext *s, enum IEC61937DataType data_type, const char *buf, int *offset, enum AVCodecID *codec)
 
static int spdif_probe (const AVProbeData *p)
 
int ff_spdif_probe (const uint8_t *p_buf, int buf_size, enum AVCodecID *codec)
 
static int spdif_read_header (AVFormatContext *s)
 
static int spdif_get_pkt_size_bits (int type, int code)
 
int ff_spdif_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

const FFInputFormat ff_spdif_demuxer
 

Detailed Description

IEC 61937 demuxer, used for compressed data in S/PDIF

Author
Anssi Hannula

Definition in file spdifdec.c.

Macro Definition Documentation

◆ SPDIF_MAX_OFFSET

#define SPDIF_MAX_OFFSET   16384

Definition at line 114 of file spdifdec.c.

Function Documentation

◆ spdif_get_offset_and_codec()

static int spdif_get_offset_and_codec ( AVFormatContext s,
enum IEC61937DataType  data_type,
const char *  buf,
int offset,
enum AVCodecID codec 
)
static

Definition at line 38 of file spdifdec.c.

Referenced by ff_spdif_probe(), and ff_spdif_read_packet().

◆ spdif_probe()

static int spdif_probe ( const AVProbeData p)
static

Definition at line 116 of file spdifdec.c.

◆ ff_spdif_probe()

int ff_spdif_probe ( const uint8_t *  p_buf,
int  buf_size,
enum AVCodecID codec 
)

Definition at line 122 of file spdifdec.c.

Referenced by set_spdif(), and spdif_probe().

◆ spdif_read_header()

static int spdif_read_header ( AVFormatContext s)
static

Definition at line 173 of file spdifdec.c.

◆ spdif_get_pkt_size_bits()

static int spdif_get_pkt_size_bits ( int  type,
int  code 
)
static

Definition at line 179 of file spdifdec.c.

Referenced by ff_spdif_read_packet().

◆ ff_spdif_read_packet()

int ff_spdif_read_packet ( AVFormatContext s,
AVPacket pkt 
)

Definition at line 189 of file spdifdec.c.

Variable Documentation

◆ ff_spdif_demuxer

const FFInputFormat ff_spdif_demuxer
Initial value:
= {
.p.name = "spdif",
.p.long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (compressed data in S/PDIF)"),
.p.flags = AVFMT_GENERIC_INDEX,
.read_probe = spdif_probe,
.read_header = spdif_read_header,
.read_packet = ff_spdif_read_packet,
}

Definition at line 252 of file spdifdec.c.

ff_spdif_read_packet
int ff_spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: spdifdec.c:189
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:480
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
spdif_probe
static int spdif_probe(const AVProbeData *p)
Definition: spdifdec.c:116
spdif_read_header
static int spdif_read_header(AVFormatContext *s)
Definition: spdifdec.c:173