FFmpeg
Data Structures | Macros | Functions | Variables
gxfenc.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/intfloat.h"
#include "libavutil/opt.h"
#include "libavutil/mathematics.h"
#include "libavutil/timecode.h"
#include "avformat.h"
#include "internal.h"
#include "gxf.h"

Go to the source code of this file.

Data Structures

struct  GXFTimecode
 
struct  GXFStreamContext
 
struct  GXFContext
 

Macros

#define GXF_SAMPLES_PER_FRAME   32768
 
#define GXF_AUDIO_PACKET_SIZE   65536
 
#define GXF_TIMECODE(c, d, h, m, s, f)   ((c) << 30 | (d) << 29 | (h) << 24 | (m) << 16 | (s) << 8 | (f))
 
#define SERVER_PATH   "EXT:/PDR/default/"
 
#define ES_NAME_PATTERN   "EXT:/PDR/default/ES."
 

Functions

static int gxf_find_lines_index (AVStream *st)
 
static void gxf_write_padding (AVIOContext *pb, int64_t to_pad)
 
static int64_t updatePacketSize (AVIOContext *pb, int64_t pos)
 
static int64_t updateSize (AVIOContext *pb, int64_t pos)
 
static void gxf_write_packet_header (AVIOContext *pb, GXFPktType type)
 
static int gxf_write_mpeg_auxiliary (AVIOContext *pb, AVStream *st)
 
static int gxf_write_dv_auxiliary (AVIOContext *pb, AVStream *st)
 
static int gxf_write_timecode_auxiliary (AVIOContext *pb, GXFContext *gxf)
 
static int gxf_write_track_description (AVFormatContext *s, GXFStreamContext *sc, int index)
 
static int gxf_write_material_data_section (AVFormatContext *s)
 
static int gxf_write_track_description_section (AVFormatContext *s)
 
static int gxf_write_map_packet (AVFormatContext *s, int rewrite)
 
static int gxf_write_flt_packet (AVFormatContext *s)
 
static int gxf_write_umf_material_description (AVFormatContext *s)
 
static int gxf_write_umf_payload (AVFormatContext *s)
 
static int gxf_write_umf_track_description (AVFormatContext *s)
 
static int gxf_write_umf_media_mpeg (AVIOContext *pb, AVStream *st)
 
static int gxf_write_umf_media_timecode (AVIOContext *pb, int drop)
 
static int gxf_write_umf_media_dv (AVIOContext *pb, GXFStreamContext *sc, AVStream *st)
 
static int gxf_write_umf_media_audio (AVIOContext *pb, GXFStreamContext *sc)
 
static int gxf_write_umf_media_description (AVFormatContext *s)
 
static int gxf_write_umf_packet (AVFormatContext *s)
 
static void gxf_init_timecode_track (GXFStreamContext *sc, GXFStreamContext *vsc)
 
static int gxf_init_timecode (AVFormatContext *s, GXFTimecode *tc, const char *tcstr, int fields)
 
static int gxf_write_header (AVFormatContext *s)
 
static int gxf_write_eos_packet (AVIOContext *pb)
 
static int gxf_write_trailer (AVFormatContext *s)
 
static void gxf_deinit (AVFormatContext *s)
 
static int gxf_parse_mpeg_frame (GXFStreamContext *sc, const uint8_t *buf, int size)
 
static int gxf_write_media_preamble (AVFormatContext *s, AVPacket *pkt, int size)
 
static int gxf_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int gxf_compare_field_nb (AVFormatContext *s, const AVPacket *next, const AVPacket *cur)
 
static int gxf_interleave_packet (AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
 

Variables

struct {
   int   height
 
   int   index
 
gxf_lines_tab []
 
static const AVCodecTag gxf_media_types []
 
AVOutputFormat ff_gxf_muxer
 

Macro Definition Documentation

#define GXF_SAMPLES_PER_FRAME   32768

Definition at line 31 of file gxfenc.c.

Referenced by gxf_interleave_packet(), and gxf_write_header().

#define GXF_AUDIO_PACKET_SIZE   65536

Definition at line 32 of file gxfenc.c.

Referenced by gxf_write_packet().

#define GXF_TIMECODE (   c,
  d,
  h,
  m,
  s,
  f 
)    ((c) << 30 | (d) << 29 | (h) << 24 | (m) << 16 | (s) << 8 | (f))

Definition at line 34 of file gxfenc.c.

Referenced by gxf_write_timecode_auxiliary(), and gxf_write_umf_material_description().

#define SERVER_PATH   "EXT:/PDR/default/"

Definition at line 118 of file gxfenc.c.

Referenced by gxf_write_material_data_section().

#define ES_NAME_PATTERN   "EXT:/PDR/default/ES."

Definition at line 119 of file gxfenc.c.

Referenced by gxf_write_track_description(), and gxf_write_umf_media_description().

Function Documentation

static int gxf_find_lines_index ( AVStream st)
static

Definition at line 121 of file gxfenc.c.

Referenced by gxf_write_header().

static void gxf_write_padding ( AVIOContext pb,
int64_t  to_pad 
)
static

Definition at line 135 of file gxfenc.c.

Referenced by gxf_write_packet(), and updatePacketSize().

static int64_t updatePacketSize ( AVIOContext pb,
int64_t  pos 
)
static
static int64_t updateSize ( AVIOContext pb,
int64_t  pos 
)
static
static void gxf_write_packet_header ( AVIOContext pb,
GXFPktType  type 
)
static
static int gxf_write_mpeg_auxiliary ( AVIOContext pb,
AVStream st 
)
static

Definition at line 181 of file gxfenc.c.

Referenced by gxf_write_track_description().

static int gxf_write_dv_auxiliary ( AVIOContext pb,
AVStream st 
)
static

Definition at line 220 of file gxfenc.c.

Referenced by gxf_write_track_description().

static int gxf_write_timecode_auxiliary ( AVIOContext pb,
GXFContext gxf 
)
static

Definition at line 233 of file gxfenc.c.

Referenced by gxf_write_track_description().

static int gxf_write_track_description ( AVFormatContext s,
GXFStreamContext sc,
int  index 
)
static

Definition at line 247 of file gxfenc.c.

Referenced by gxf_write_track_description_section().

static int gxf_write_material_data_section ( AVFormatContext s)
static

Definition at line 308 of file gxfenc.c.

Referenced by gxf_write_map_packet().

static int gxf_write_track_description_section ( AVFormatContext s)
static

Definition at line 359 of file gxfenc.c.

Referenced by gxf_write_map_packet().

static int gxf_write_map_packet ( AVFormatContext s,
int  rewrite 
)
static

Definition at line 376 of file gxfenc.c.

Referenced by gxf_write_header(), gxf_write_packet(), and gxf_write_trailer().

static int gxf_write_flt_packet ( AVFormatContext s)
static

Definition at line 408 of file gxfenc.c.

Referenced by gxf_write_header(), and gxf_write_trailer().

static int gxf_write_umf_material_description ( AVFormatContext s)
static

Definition at line 433 of file gxfenc.c.

Referenced by gxf_write_umf_packet().

static int gxf_write_umf_payload ( AVFormatContext s)
static

Definition at line 479 of file gxfenc.c.

Referenced by gxf_write_umf_packet().

static int gxf_write_umf_track_description ( AVFormatContext s)
static

Definition at line 499 of file gxfenc.c.

Referenced by gxf_write_umf_packet().

static int gxf_write_umf_media_mpeg ( AVIOContext pb,
AVStream st 
)
static

Definition at line 519 of file gxfenc.c.

Referenced by gxf_write_umf_media_description().

static int gxf_write_umf_media_timecode ( AVIOContext pb,
int  drop 
)
static

Definition at line 542 of file gxfenc.c.

Referenced by gxf_write_umf_media_description().

static int gxf_write_umf_media_dv ( AVIOContext pb,
GXFStreamContext sc,
AVStream st 
)
static

Definition at line 555 of file gxfenc.c.

Referenced by gxf_write_umf_media_description().

static int gxf_write_umf_media_audio ( AVIOContext pb,
GXFStreamContext sc 
)
static

Definition at line 572 of file gxfenc.c.

Referenced by gxf_write_umf_media_description().

static int gxf_write_umf_media_description ( AVFormatContext s)
static

Definition at line 583 of file gxfenc.c.

Referenced by gxf_write_umf_packet().

static int gxf_write_umf_packet ( AVFormatContext s)
static

Definition at line 645 of file gxfenc.c.

Referenced by gxf_write_header(), and gxf_write_trailer().

static void gxf_init_timecode_track ( GXFStreamContext sc,
GXFStreamContext vsc 
)
static

Definition at line 666 of file gxfenc.c.

Referenced by gxf_write_header().

static int gxf_init_timecode ( AVFormatContext s,
GXFTimecode tc,
const char *  tcstr,
int  fields 
)
static

Definition at line 681 of file gxfenc.c.

Referenced by gxf_write_header().

static int gxf_write_header ( AVFormatContext s)
static

Definition at line 700 of file gxfenc.c.

static int gxf_write_eos_packet ( AVIOContext pb)
static

Definition at line 838 of file gxfenc.c.

Referenced by gxf_write_trailer().

static int gxf_write_trailer ( AVFormatContext s)
static

Definition at line 846 of file gxfenc.c.

static void gxf_deinit ( AVFormatContext s)
static

Definition at line 874 of file gxfenc.c.

static int gxf_parse_mpeg_frame ( GXFStreamContext sc,
const uint8_t buf,
int  size 
)
static

Definition at line 882 of file gxfenc.c.

Referenced by gxf_write_media_preamble().

static int gxf_write_media_preamble ( AVFormatContext s,
AVPacket pkt,
int  size 
)
static

Definition at line 894 of file gxfenc.c.

Referenced by gxf_write_packet().

static int gxf_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 941 of file gxfenc.c.

static int gxf_compare_field_nb ( AVFormatContext s,
const AVPacket next,
const AVPacket cur 
)
static

Definition at line 988 of file gxfenc.c.

Referenced by gxf_interleave_packet().

static int gxf_interleave_packet ( AVFormatContext s,
AVPacket out,
AVPacket pkt,
int  flush 
)
static

Definition at line 1011 of file gxfenc.c.

Variable Documentation

int height

Definition at line 89 of file gxfenc.c.

int index

Definition at line 89 of file gxfenc.c.

const { ... } gxf_lines_tab[]
Initial value:
= {
{ 480, 1 },
{ 512, 1 },
{ 576, 2 },
{ 608, 2 },
{ 1080, 4 },
{ 720, 6 },
}

Referenced by gxf_find_lines_index().

const AVCodecTag gxf_media_types[]
static
AVOutputFormat ff_gxf_muxer
Initial value:
= {
.name = "gxf",
.long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"),
.extensions = "gxf",
.priv_data_size = sizeof(GXFContext),
.audio_codec = AV_CODEC_ID_PCM_S16LE,
.video_codec = AV_CODEC_ID_MPEG2VIDEO,
.deinit = gxf_deinit,
}
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:729
static int gxf_write_header(AVFormatContext *s)
Definition: gxfenc.c:700
static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush)
Interleave an AVPacket correctly so it can be muxed.
Definition: mux.c:1087
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
Definition: gxfenc.c:1011
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:98
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:51
static int gxf_write_trailer(AVFormatContext *s)
Definition: gxfenc.c:846
static void gxf_deinit(AVFormatContext *s)
Definition: gxfenc.c:874
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:346
static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: gxfenc.c:941

Definition at line 1028 of file gxfenc.c.