FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dss.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/bswap.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  DSSDemuxContext
 

Macros

#define DSS_HEAD_OFFSET_AUTHOR   0xc
 
#define DSS_AUTHOR_SIZE   16
 
#define DSS_HEAD_OFFSET_START_TIME   0x26
 
#define DSS_HEAD_OFFSET_END_TIME   0x32
 
#define DSS_TIME_SIZE   12
 
#define DSS_HEAD_OFFSET_ACODEC   0x2a4
 
#define DSS_ACODEC_DSS_SP   0x0 /* SP mode */
 
#define DSS_ACODEC_G723_1   0x2 /* LP mode */
 
#define DSS_HEAD_OFFSET_COMMENT   0x31e
 
#define DSS_COMMENT_SIZE   64
 
#define DSS_BLOCK_SIZE   512
 
#define DSS_HEADER_SIZE   (DSS_BLOCK_SIZE * 2)
 
#define DSS_AUDIO_BLOCK_HEADER_SIZE   6
 
#define DSS_FRAME_SIZE   42
 

Functions

static int dss_probe (AVProbeData *p)
 
static int dss_read_metadata_date (AVFormatContext *s, unsigned int offset, const char *key)
 
static int dss_read_metadata_string (AVFormatContext *s, unsigned int offset, unsigned int size, const char *key)
 
static int dss_read_header (AVFormatContext *s)
 
static void dss_skip_audio_header (AVFormatContext *s, AVPacket *pkt)
 
static void dss_sp_byte_swap (DSSDemuxContext *ctx, uint8_t *dst, const uint8_t *src)
 
static int dss_sp_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int dss_723_1_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int dss_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int dss_read_close (AVFormatContext *s)
 
static int dss_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 

Variables

static const uint8_t frame_size [4] = { 24, 20, 4, 1 }
 
AVInputFormat ff_dss_demuxer
 

Macro Definition Documentation

#define DSS_HEAD_OFFSET_AUTHOR   0xc

Definition at line 30 of file dss.c.

Referenced by dss_read_header().

#define DSS_AUTHOR_SIZE   16

Definition at line 31 of file dss.c.

Referenced by dss_read_header().

#define DSS_HEAD_OFFSET_START_TIME   0x26

Definition at line 33 of file dss.c.

#define DSS_HEAD_OFFSET_END_TIME   0x32

Definition at line 34 of file dss.c.

Referenced by dss_read_header().

#define DSS_TIME_SIZE   12

Definition at line 35 of file dss.c.

Referenced by dss_read_metadata_date().

#define DSS_HEAD_OFFSET_ACODEC   0x2a4

Definition at line 37 of file dss.c.

Referenced by dss_read_header().

#define DSS_ACODEC_DSS_SP   0x0 /* SP mode */

Definition at line 38 of file dss.c.

Referenced by dss_read_header(), dss_read_packet(), and dss_read_seek().

#define DSS_ACODEC_G723_1   0x2 /* LP mode */

Definition at line 39 of file dss.c.

Referenced by dss_read_header().

#define DSS_HEAD_OFFSET_COMMENT   0x31e

Definition at line 41 of file dss.c.

Referenced by dss_read_header().

#define DSS_COMMENT_SIZE   64

Definition at line 42 of file dss.c.

Referenced by dss_read_header().

#define DSS_BLOCK_SIZE   512

Definition at line 44 of file dss.c.

Referenced by dss_read_seek(), and dss_skip_audio_header().

#define DSS_HEADER_SIZE   (DSS_BLOCK_SIZE * 2)

Definition at line 45 of file dss.c.

Referenced by dss_read_header(), and dss_read_seek().

#define DSS_AUDIO_BLOCK_HEADER_SIZE   6

Definition at line 46 of file dss.c.

Referenced by dss_read_seek(), and dss_skip_audio_header().

#define DSS_FRAME_SIZE   42

Definition at line 47 of file dss.c.

Referenced by dss_read_header(), dss_sp_byte_swap(), and dss_sp_read_packet().

Function Documentation

static int dss_probe ( AVProbeData p)
static

Definition at line 61 of file dss.c.

static int dss_read_metadata_date ( AVFormatContext s,
unsigned int  offset,
const char *  key 
)
static

Definition at line 69 of file dss.c.

Referenced by dss_read_header().

static int dss_read_metadata_string ( AVFormatContext s,
unsigned int  offset,
unsigned int  size,
const char *  key 
)
static

Definition at line 92 of file dss.c.

Referenced by dss_read_header().

static int dss_read_header ( AVFormatContext s)
static

Definition at line 118 of file dss.c.

static void dss_skip_audio_header ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 180 of file dss.c.

Referenced by dss_723_1_read_packet(), and dss_sp_read_packet().

static void dss_sp_byte_swap ( DSSDemuxContext ctx,
uint8_t dst,
const uint8_t src 
)
static

Definition at line 189 of file dss.c.

Referenced by dss_sp_read_packet().

static int dss_sp_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 212 of file dss.c.

Referenced by dss_read_packet().

static int dss_723_1_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 274 of file dss.c.

Referenced by dss_read_packet().

static int dss_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 329 of file dss.c.

static int dss_read_close ( AVFormatContext s)
static

Definition at line 339 of file dss.c.

static int dss_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 348 of file dss.c.

Variable Documentation

const uint8_t frame_size[4] = { 24, 20, 4, 1 }
static

Definition at line 49 of file dss.c.

Referenced by dss_723_1_read_packet().

AVInputFormat ff_dss_demuxer
Initial value:
= {
.name = "dss",
.long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard (DSS)"),
.priv_data_size = sizeof(DSSDemuxContext),
.extensions = "dss"
}
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static int dss_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: dss.c:348
static int dss_read_close(AVFormatContext *s)
Definition: dss.c:339
static int dss_read_header(AVFormatContext *s)
Definition: dss.c:118
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static int dss_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: dss.c:329
static int dss_probe(AVProbeData *p)
Definition: dss.c:61
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:638
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42

Definition at line 387 of file dss.c.