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

Go to the source code of this file.

Data Structures

struct  DVMuxContext
 

Macros

#define MAX_AUDIO_FRAME_SIZE   192000
 

Functions

static void brktimegm (time_t secs, struct tm *tm)
 
static int dv_audio_frame_size (const AVDVProfile *sys, int frame, int sample_rate)
 
static int dv_write_pack (enum dv_pack_type pack_id, DVMuxContext *c, uint8_t *buf, int channel, int seq)
 
static void dv_inject_audio (DVMuxContext *c, int channel, uint8_t *frame_ptr)
 
static void dv_inject_metadata (DVMuxContext *c, uint8_t *frame)
 
static int dv_assemble_frame (AVFormatContext *s, DVMuxContext *c, AVStream *st, uint8_t *data, int data_size, uint8_t **frame)
 
static DVMuxContextdv_init_mux (AVFormatContext *s)
 
static int dv_write_header (AVFormatContext *s)
 
static int dv_write_packet (struct AVFormatContext *s, AVPacket *pkt)
 
static void dv_deinit (AVFormatContext *s)
 

Variables

static const int dv_aaux_packs_dist [12][9]
 
const AVOutputFormat ff_dv_muxer
 

Macro Definition Documentation

◆ MAX_AUDIO_FRAME_SIZE

#define MAX_AUDIO_FRAME_SIZE   192000

Definition at line 45 of file dvenc.c.

Function Documentation

◆ brktimegm()

static void brktimegm ( time_t  secs,
struct tm *  tm 
)
static

Definition at line 76 of file dvenc.c.

Referenced by dv_write_pack().

◆ dv_audio_frame_size()

static int dv_audio_frame_size ( const AVDVProfile sys,
int  frame,
int  sample_rate 
)
static

Definition at line 84 of file dvenc.c.

Referenced by dv_assemble_frame(), dv_inject_audio(), and dv_write_pack().

◆ dv_write_pack()

static int dv_write_pack ( enum dv_pack_type  pack_id,
DVMuxContext c,
uint8_t *  buf,
int  channel,
int  seq 
)
static

Definition at line 98 of file dvenc.c.

Referenced by dv_inject_audio(), and dv_inject_metadata().

◆ dv_inject_audio()

static void dv_inject_audio ( DVMuxContext c,
int  channel,
uint8_t *  frame_ptr 
)
static

Definition at line 190 of file dvenc.c.

Referenced by dv_assemble_frame().

◆ dv_inject_metadata()

static void dv_inject_metadata ( DVMuxContext c,
uint8_t *  frame 
)
static

Definition at line 212 of file dvenc.c.

Referenced by dv_assemble_frame().

◆ dv_assemble_frame()

static int dv_assemble_frame ( AVFormatContext s,
DVMuxContext c,
AVStream st,
uint8_t *  data,
int  data_size,
uint8_t **  frame 
)
static

Definition at line 246 of file dvenc.c.

Referenced by dv_write_packet().

◆ dv_init_mux()

static DVMuxContext* dv_init_mux ( AVFormatContext s)
static

Definition at line 307 of file dvenc.c.

Referenced by dv_write_header().

◆ dv_write_header()

static int dv_write_header ( AVFormatContext s)
static

Definition at line 383 of file dvenc.c.

◆ dv_write_packet()

static int dv_write_packet ( struct AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 411 of file dvenc.c.

◆ dv_deinit()

static void dv_deinit ( AVFormatContext s)
static

Definition at line 431 of file dvenc.c.

Variable Documentation

◆ dv_aaux_packs_dist

const int dv_aaux_packs_dist[12][9]
static
Initial value:
= {
{ 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
{ 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
{ 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
{ 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
{ 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
{ 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
{ 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
{ 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
{ 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
{ 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
{ 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
{ 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
}

Definition at line 61 of file dvenc.c.

Referenced by dv_inject_audio().

◆ ff_dv_muxer

const AVOutputFormat ff_dv_muxer
Initial value:
= {
.name = "dv",
.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
.extensions = "dv",
.priv_data_size = sizeof(DVMuxContext),
.audio_codec = AV_CODEC_ID_PCM_S16LE,
.video_codec = AV_CODEC_ID_DVVIDEO,
.deinit = dv_deinit,
}

Definition at line 439 of file dvenc.c.

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:313
DVMuxContext
Definition: dvenc.c:47
dv_deinit
static void dv_deinit(AVFormatContext *s)
Definition: dvenc.c:431
dv_write_packet
static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition: dvenc.c:411
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
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:731
AV_CODEC_ID_DVVIDEO
@ AV_CODEC_ID_DVVIDEO
Definition: codec_id.h:74
dv_write_header
static int dv_write_header(AVFormatContext *s)
Definition: dvenc.c:383
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:347