FFmpeg
Data Structures | Macros | Functions | Variables
dv.c File Reference
#include <time.h>
#include "avformat.h"
#include "internal.h"
#include "libavcodec/dv_profile.h"
#include "libavcodec/dv.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/timecode.h"
#include "dv.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  DVPacket
 For DV, one packet corresponds exactly to one frame. More...
 
struct  DVDemuxContext
 
struct  RawDVContext
 

Macros

#define PARTIAL_FRAME_SIZE   (3 * 80)
 

Functions

static uint16_t dv_audio_12to16 (uint16_t sample)
 
static const uint8_t * dv_extract_pack (const uint8_t *frame, enum dv_pack_type t)
 
static int dv_extract_audio (const uint8_t *frame, uint8_t **ppcm, const AVDVProfile *sys)
 
static int dv_extract_audio_info (DVDemuxContext *c, const uint8_t *frame)
 
static int dv_extract_video_info (DVDemuxContext *c, const uint8_t *frame)
 
static int dv_extract_timecode (DVDemuxContext *c, const uint8_t *frame, char *tc)
 
static int dv_init_demux (AVFormatContext *s, DVDemuxContext *c)
 
DVDemuxContextavpriv_dv_init_demux (AVFormatContext *s)
 
int avpriv_dv_get_packet (DVDemuxContext *c, AVPacket *pkt)
 
int avpriv_dv_produce_packet (DVDemuxContext *c, AVPacket *pkt, uint8_t *buf, int buf_size, int64_t pos)
 
static int64_t dv_frame_offset (AVFormatContext *s, DVDemuxContext *c, int64_t timestamp, int flags)
 
void ff_dv_offset_reset (DVDemuxContext *c, int64_t frame_offset)
 
static int dv_read_timecode (AVFormatContext *s)
 
static int dv_read_header (AVFormatContext *s)
 
static int dv_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int dv_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 
static int dv_probe (const AVProbeData *p)
 

Variables

static const int dv_audio_frequency [3]
 
const AVInputFormat ff_dv_demuxer
 

Macro Definition Documentation

◆ PARTIAL_FRAME_SIZE

#define PARTIAL_FRAME_SIZE   (3 * 80)

Function Documentation

◆ dv_audio_12to16()

static uint16_t dv_audio_12to16 ( uint16_t  sample)
inlinestatic

Definition at line 64 of file dv.c.

Referenced by dv_extract_audio().

◆ dv_extract_pack()

static const uint8_t* dv_extract_pack ( const uint8_t *  frame,
enum dv_pack_type  t 
)
static

◆ dv_extract_audio()

static int dv_extract_audio ( const uint8_t *  frame,
uint8_t **  ppcm,
const AVDVProfile sys 
)
static

Definition at line 128 of file dv.c.

Referenced by avpriv_dv_produce_packet().

◆ dv_extract_audio_info()

static int dv_extract_audio_info ( DVDemuxContext c,
const uint8_t *  frame 
)
static

Definition at line 231 of file dv.c.

Referenced by avpriv_dv_produce_packet().

◆ dv_extract_video_info()

static int dv_extract_video_info ( DVDemuxContext c,
const uint8_t *  frame 
)
static

Definition at line 292 of file dv.c.

Referenced by avpriv_dv_produce_packet().

◆ dv_extract_timecode()

static int dv_extract_timecode ( DVDemuxContext c,
const uint8_t *  frame,
char *  tc 
)
static

Definition at line 316 of file dv.c.

Referenced by dv_read_timecode().

◆ dv_init_demux()

static int dv_init_demux ( AVFormatContext s,
DVDemuxContext c 
)
static

Definition at line 334 of file dv.c.

Referenced by avpriv_dv_init_demux(), and dv_read_header().

◆ avpriv_dv_init_demux()

DVDemuxContext* avpriv_dv_init_demux ( AVFormatContext s)

Definition at line 349 of file dv.c.

Referenced by avi_read_header(), iec61883_read_header(), and mov_finalize_stsd_codec().

◆ avpriv_dv_get_packet()

int avpriv_dv_get_packet ( DVDemuxContext c,
AVPacket pkt 
)

Definition at line 365 of file dv.c.

Referenced by avi_read_packet(), dv_read_packet(), iec61883_parse_queue_dv(), and mov_read_packet().

◆ avpriv_dv_produce_packet()

int avpriv_dv_produce_packet ( DVDemuxContext c,
AVPacket pkt,
uint8_t *  buf,
int  buf_size,
int64_t  pos 
)

Definition at line 388 of file dv.c.

Referenced by avi_read_packet(), dv_read_packet(), iec61883_parse_queue_dv(), and mov_read_packet().

◆ dv_frame_offset()

static int64_t dv_frame_offset ( AVFormatContext s,
DVDemuxContext c,
int64_t  timestamp,
int  flags 
)
static

Definition at line 436 of file dv.c.

Referenced by dv_read_seek().

◆ ff_dv_offset_reset()

void ff_dv_offset_reset ( DVDemuxContext c,
int64_t  frame_offset 
)

Definition at line 455 of file dv.c.

Referenced by avi_read_seek(), and dv_read_seek().

◆ dv_read_timecode()

static int dv_read_timecode ( AVFormatContext s)
static

Definition at line 471 of file dv.c.

Referenced by dv_read_header().

◆ dv_read_header()

static int dv_read_header ( AVFormatContext s)
static

Definition at line 501 of file dv.c.

◆ dv_read_packet()

static int dv_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 551 of file dv.c.

◆ dv_read_seek()

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

Definition at line 577 of file dv.c.

◆ dv_probe()

static int dv_probe ( const AVProbeData p)
static

Definition at line 591 of file dv.c.

Variable Documentation

◆ dv_audio_frequency

const int dv_audio_frequency[3]
static
Initial value:
= {
48000, 44100, 32000,
}

Definition at line 116 of file dv.c.

Referenced by dv_extract_audio(), and dv_extract_audio_info().

◆ ff_dv_demuxer

const AVInputFormat ff_dv_demuxer
Initial value:
= {
.name = "dv",
.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
.priv_data_size = sizeof(RawDVContext),
.extensions = "dv,dif",
}

Definition at line 633 of file dv.c.

dv_probe
static int dv_probe(const AVProbeData *p)
Definition: dv.c:591
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
dv_read_header
static int dv_read_header(AVFormatContext *s)
Definition: dv.c:501
dv_read_packet
static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: dv.c:551
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
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:117
RawDVContext
Definition: dv.c:466
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
dv_read_seek
static int dv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: dv.c:577