FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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"
#include "audiointerleave.h"

Go to the source code of this file.

Data Structures

struct  GXFTimecode
 
struct  GXFStreamContext
 
struct  GXFContext
 

Macros

#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 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, AVPacket *next, 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 []
 
static const int GXF_samples_per_frame [] = { 32768, 0 }
 
AVOutputFormat ff_gxf_muxer
 

Macro Definition Documentation

#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,
 
)    ((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 668 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 683 of file gxfenc.c.

Referenced by gxf_write_header().

static int gxf_write_header ( AVFormatContext s)
static

Definition at line 702 of file gxfenc.c.

static int gxf_write_eos_packet ( AVIOContext pb)
static

Definition at line 841 of file gxfenc.c.

Referenced by gxf_write_trailer().

static int gxf_write_trailer ( AVFormatContext s)
static

Definition at line 849 of file gxfenc.c.

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

Definition at line 884 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 896 of file gxfenc.c.

Referenced by gxf_write_packet().

static int gxf_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 943 of file gxfenc.c.

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

Definition at line 990 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 1012 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.

Referenced by acb_search(), add_index_entry(), add_tone(), adpcm_decode_frame(), aix_read_packet(), alac_linear_predictor(), alloc_table(), analyze_sample_buffer(), ape_read_seek(), apply_dependent_coupling(), apply_dependent_coupling_fixed(), apply_independent_coupling(), apply_independent_coupling_fixed(), asf_read_seek(), asv1_encode_block(), asv1_put_level(), asv2_encode_block(), asv2_put_level(), av_get_standard_channel_layout(), av_parser_parse2(), av_resample(), av_shr_i(), avf_read_header(), avfilter_graph_parse2(), avfilter_graph_parse_ptr(), avformat_match_stream_specifier(), avi_read_idx1(), avi_read_packet(), avi_read_seek(), avs_array_elt(), build_basis(), build_canonical_huff(), build_def_list(), build_frame_code(), build_table(), build_vlc(), callback(), categorize(), cdxl_decode_ham6(), cdxl_decode_ham8(), check_4block_inter(), check_block(), codec2subblock(), comp_block(), comp_interp_index(), compute_scale_factors(), copy_restart_frame_params(), copy_TMPL(), cqueue_peek(), d3d11va_transfer_data(), decode(), decode_bgr_1(), decode_cabac_luma_residual(), decode_cabac_residual_internal(), decode_fixed_sparse(), decode_frame(), decode_gain_info(), decode_i2_frame(), decode_init(), decode_luma_residual(), decode_mb_mode(), decode_p_block(), decode_plane_bitstream(), decode_q_branch(), decode_vectors(), detect_peak(), direct_search(), dnxhd_encode_init(), dnxhd_init_vlc(), draw_glyph(), dss_sp_unpack_coeffs(), dv_decode_ac(), encode_dc(), encode_q_branch(), encode_q_branch2(), estimate_pitch(), execute_code(), fcb_search(), ff_add_index_entry(), ff_dct_unquantize_h263_inter_msa(), ff_dct_unquantize_h263_intra_msa(), ff_ebur128_loudness_range_multiple(), ff_fft_lut_init(), ff_gmc_c(), ff_h261_reorder_mb_index(), ff_h264_build_ref_list(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_decode_ref_pic_list_reordering(), ff_huffyuv_generate_bits_table(), ff_init_ff_sine_windows(), ff_init_filters(), ff_mediacodec_dec_decode(), ff_mjpeg_decode_dht(), ff_mjpeg_decode_dqt(), ff_mjpeg_decode_frame(), ff_mjpeg_decode_sos(), ff_mlp_rematrix_channel(), ff_mov_init_hinting(), ff_mpeg1_encode_init(), ff_seek_frame_binary(), ff_srtp_decrypt(), ff_srtp_encrypt(), ff_v4l2_buffer_initialize(), ff_vaapi_decode_make_slice_buffer(), fill_slice_long(), filter(), filter_frame(), finish_file(), flac_seek(), gather_data_for_cel(), gen_fcb_excitation(), get(), get_bits1(), get_block_bits(), get_block_rate(), get_dc(), get_mvdata_interlaced(), get_rl_index(), get_sample_rate(), get_surface(), handle_pac(), hds_flush(), heap_bubble_down(), heap_bubble_up(), hpel_motion_search(), hvcc_array_add_nal_unit(), hw_device_init_from_string(), idct_put(), img_read_seek(), init_ff_cos_tabs(), init_pass2(), init_uni_h261_rl_tab(), init_uni_h263_rl_tab(), init_uni_mpeg4_rl_tab(), input_to_sample_buffer(), interpolate_delay(), iterative_me(), ivr_read_packet(), lag_decode_line(), libAVMemInputPin_Receive(), libopenjpeg_copy_to_packed16(), libopenjpeg_copy_to_packed8(), libopenjpeg_copyto16(), libopenjpeg_copyto8(), libopenjpeg_guess_pix_fmt(), lin_calc(), lsp2lpc(), matroska_add_index_entries(), matroska_read_seek(), mediacodec_wrap_hw_buffer(), mlp_encode_frame(), mlp_encode_init(), mov_create_timecode_track(), mov_fix_index(), mov_get_stsc_samples(), mov_read_close(), mov_read_sidx(), mov_read_tfhd(), mov_read_udta_string(), mov_seek_auxiliary_info(), mov_seek_fragment(), mov_switch_root(), mov_write_stsc_tag(), mov_write_stss_tag(), mov_write_tfrf_tag(), mpc8_read_seek(), mpc_read_seek(), mpeg4_encode_block(), mpeg4_get_block_length(), mv_read_packet(), mxf_compute_ptses_fake_index(), mxf_decrypt_triplet(), mxf_edit_unit_absolute_offset(), mxf_read_packet_old(), nsv_read_seek(), nut_write_packet(), open_filter_param(), open_output_file(), output_client_manifest(), paf_video_decode(), parse_aux_data(), parse_coding_header(), parse_dmix_coeffs(), parse_forced_key_frames(), parse_subframe_audio(), probe(), process_block(), pseudocolor_filter_16(), pseudocolor_filter_16_10(), pseudocolor_filter_16_10d(), pseudocolor_filter_16_11(), pseudocolor_filter_16_11d(), qpel_motion_search(), quant_array_idx(), quantize(), read_packet(), read_seek(), read_tfra(), resample(), resample_common_TMPL(), resample_cubic(), resample_linear(), resample_linear_TMPL(), resample_nearest(), resample_one(), rl2_read_seek(), rpza_decode_stream(), rtsp_send_reply(), sad_hpel_motion_search(), scalar_dequant_float(), scan_mmco_reset(), seek_frame_generic(), set(), set_best_codebook(), set_blocks(), set_major_params(), shall_we_drop(), silk_decode_frame(), silk_decode_lpc(), silk_lsf2lpc(), small_diamond_search(), step_collect_psy_metrics(), store_table(), svq3_decode_block(), svq3_decode_mb(), synthfilt_build_sb_samples(), tak_parse(), true_peak_limiter(), truemotion1_decode_16bit(), truemotion1_decode_24bit(), tta_read_seek(), unlayer_stream(), unpack_parse_unit(), update_palette_index(), value_string(), vc1_decode_ac_coeff(), vc1_decode_b_mb(), vc1_decode_p_mb(), voc_read_seek(), vqa_decode_chunk(), webm_clusters_start_with_keyframe(), webp_get_vlc(), wma_decode_block(), wrap_texture_buf(), write_abst(), write_manifest(), xan_wc3_output_pixel_run(), and xpm_decode_frame().

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
const int GXF_samples_per_frame[] = { 32768, 0 }
static

Definition at line 666 of file gxfenc.c.

Referenced by gxf_write_header().

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,
}
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:671
static int gxf_write_header(AVFormatContext *s)
Definition: gxfenc.c:702
static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush)
Interleave an AVPacket correctly so it can be muxed.
Definition: mux.c:1228
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
Definition: gxfenc.c:1012
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:219
static int gxf_write_trailer(AVFormatContext *s)
Definition: gxfenc.c:849
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:337
static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: gxfenc.c:943

Definition at line 1020 of file gxfenc.c.