FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dvenc.c File Reference
#include <time.h>
#include <stdarg.h>
#include "avformat.h"
#include "internal.h"
#include "libavcodec/dv_profile.h"
#include "libavcodec/dv.h"
#include "dv.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 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,...)
 
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 (DVMuxContext *c, AVStream *st, uint8_t *data, int data_size, uint8_t **frame)
 
static DVMuxContextdv_init_mux (AVFormatContext *s)
 
static void dv_delete_mux (DVMuxContext *c)
 
static int dv_write_header (AVFormatContext *s)
 
static int dv_write_packet (struct AVFormatContext *s, AVPacket *pkt)
 
static int dv_write_trailer (struct AVFormatContext *s)
 

Variables

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

Macro Definition Documentation

#define MAX_AUDIO_FRAME_SIZE   192000

Definition at line 44 of file dvenc.c.

Referenced by dv_assemble_frame(), and dv_init_mux().

Function Documentation

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

Definition at line 75 of file dvenc.c.

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

static int dv_write_pack ( enum dv_pack_type  pack_id,
DVMuxContext c,
uint8_t buf,
  ... 
)
static

Definition at line 89 of file dvenc.c.

Referenced by dv_inject_audio(), and dv_inject_metadata().

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

Definition at line 186 of file dvenc.c.

Referenced by dv_assemble_frame().

static void dv_inject_metadata ( DVMuxContext c,
uint8_t frame 
)
static

Definition at line 208 of file dvenc.c.

Referenced by dv_assemble_frame().

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

Definition at line 241 of file dvenc.c.

Referenced by dv_write_packet().

static DVMuxContext* dv_init_mux ( AVFormatContext s)
static

Definition at line 301 of file dvenc.c.

Referenced by dv_write_header().

static void dv_delete_mux ( DVMuxContext c)
static

Definition at line 383 of file dvenc.c.

Referenced by dv_write_trailer().

static int dv_write_header ( AVFormatContext s)
static

Definition at line 390 of file dvenc.c.

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

Definition at line 418 of file dvenc.c.

static int dv_write_trailer ( struct AVFormatContext s)
static

Definition at line 437 of file dvenc.c.

Variable Documentation

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 60 of file dvenc.c.

Referenced by dv_inject_audio().

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,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static int dv_write_header(AVFormatContext *s)
Definition: dvenc.c:390
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
static int dv_write_trailer(struct AVFormatContext *s)
Definition: dvenc.c:437
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:497
static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition: dvenc.c:418
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:86

Definition at line 443 of file dvenc.c.