FFmpeg
Data Fields
AVOutputFormat Struct Reference

#include <avformat.h>

Data Fields

const char * name
 
const char * long_name
 Descriptive name for the format, meant to be more human-readable than name. More...
 
const char * mime_type
 
const char * extensions
 comma-separated filename extensions More...
 
enum AVCodecID audio_codec
 default audio codec More...
 
enum AVCodecID video_codec
 default video codec More...
 
enum AVCodecID subtitle_codec
 default subtitle codec More...
 
int flags
 can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH, AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE More...
 
const struct AVCodecTag *const * codec_tag
 List of supported codec_id-codec_tag pairs, ordered by "better choice first". More...
 
const AVClasspriv_class
 AVClass for the private context. More...
 
int priv_data_size
 size of private data so that it can be allocated in the wrapper More...
 
int flags_internal
 Internal flags. More...
 
int(* write_header )(struct AVFormatContext *)
 
int(* write_packet )(struct AVFormatContext *, AVPacket *pkt)
 Write a packet. More...
 
int(* write_trailer )(struct AVFormatContext *)
 
int(* interleave_packet )(struct AVFormatContext *s, AVPacket *pkt, int flush, int has_packet)
 A format-specific function for interleavement. More...
 
int(* query_codec )(enum AVCodecID id, int std_compliance)
 Test if the given codec can be stored in this container. More...
 
void(* get_output_timestamp )(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
 
int(* control_message )(struct AVFormatContext *s, int type, void *data, size_t data_size)
 Allows sending messages from application to device. More...
 
int(* write_uncoded_frame )(struct AVFormatContext *, int stream_index, AVFrame **frame, unsigned flags)
 Write an uncoded AVFrame. More...
 
int(* get_device_list )(struct AVFormatContext *s, struct AVDeviceInfoList *device_list)
 Returns device list with it properties. More...
 
enum AVCodecID data_codec
 default data codec More...
 
int(* init )(struct AVFormatContext *)
 Initialize format. More...
 
void(* deinit )(struct AVFormatContext *)
 Deinitialize format. More...
 
int(* check_bitstream )(struct AVFormatContext *s, struct AVStream *st, const AVPacket *pkt)
 Set up any necessary bitstream filtering and extract any extra data needed for the global header. More...
 

Detailed Description

Examples
muxing.c, and remuxing.c.

Definition at line 503 of file avformat.h.

Field Documentation

◆ name

const char* AVOutputFormat::name

◆ long_name

const char* AVOutputFormat::long_name

Descriptive name for the format, meant to be more human-readable than name.

You should use the NULL_IF_CONFIG_SMALL() macro to define it.

Definition at line 510 of file avformat.h.

Referenced by show_formats_devices(), and show_help_muxer().

◆ mime_type

const char* AVOutputFormat::mime_type

Definition at line 511 of file avformat.h.

Referenced by av_guess_format(), and show_help_muxer().

◆ extensions

const char* AVOutputFormat::extensions

comma-separated filename extensions

Definition at line 512 of file avformat.h.

Referenced by av_guess_format(), and show_help_muxer().

◆ audio_codec

enum AVCodecID AVOutputFormat::audio_codec

default audio codec

Examples
muxing.c.

Definition at line 514 of file avformat.h.

Referenced by av_guess_codec(), avformat_query_codec(), main(), and show_help_muxer().

◆ video_codec

enum AVCodecID AVOutputFormat::video_codec

default video codec

Examples
muxing.c.

Definition at line 515 of file avformat.h.

Referenced by av_guess_codec(), avformat_query_codec(), main(), open_output_file(), and show_help_muxer().

◆ subtitle_codec

enum AVCodecID AVOutputFormat::subtitle_codec

default subtitle codec

Definition at line 516 of file avformat.h.

Referenced by av_guess_codec(), avformat_query_codec(), open_output_file(), and show_help_muxer().

◆ flags

int AVOutputFormat::flags

can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH, AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE

Examples
muxing.c, remuxing.c, and transcoding.c.

Definition at line 523 of file avformat.h.

Referenced by add_stream(), avformat_transfer_internal_stream_timing_info(), dump_stream_format(), init_muxer(), init_output_stream_encode(), main(), new_output_stream(), new_video_stream(), open_output_file(), seg_init(), transcode(), and transcode_init().

◆ codec_tag

const struct AVCodecTag* const * AVOutputFormat::codec_tag

List of supported codec_id-codec_tag pairs, ordered by "better choice first".

The arrays are all terminated by AV_CODEC_ID_NONE.

Definition at line 529 of file avformat.h.

Referenced by avformat_query_codec(), hls_mux_init(), init_muxer(), init_output_stream_streamcopy(), and segment_mux_init().

◆ priv_class

const AVClass* AVOutputFormat::priv_class

◆ priv_data_size

int AVOutputFormat::priv_data_size

size of private data so that it can be allocated in the wrapper

Definition at line 544 of file avformat.h.

Referenced by init_muxer().

◆ flags_internal

int AVOutputFormat::flags_internal

Internal flags.

See FF_FMT_FLAG_* in internal.h.

Definition at line 549 of file avformat.h.

◆ write_header

int(* AVOutputFormat::write_header) (struct AVFormatContext *)

Definition at line 551 of file avformat.h.

◆ write_packet

int(* AVOutputFormat::write_packet) (struct AVFormatContext *, AVPacket *pkt)

Write a packet.

If AVFMT_ALLOW_FLUSH is set in flags, pkt can be NULL in order to flush data buffered in the muxer. When flushing, return 0 if there still is more data to flush, or 1 if everything was flushed and there is no more buffered data.

Definition at line 559 of file avformat.h.

◆ write_trailer

int(* AVOutputFormat::write_trailer) (struct AVFormatContext *)

Definition at line 560 of file avformat.h.

◆ interleave_packet

int(* AVOutputFormat::interleave_packet) (struct AVFormatContext *s, AVPacket *pkt, int flush, int has_packet)

A format-specific function for interleavement.

If unset, packets will be interleaved by dts.

Parameters
sAn AVFormatContext for output. pkt will be added to resp. taken from its packet buffer.
[in,out]pktA packet to be interleaved if has_packet is set; also used to return packets. If no packet is returned (e.g. on error), pkt is blank on return.
flush1 if no further packets are available as input and all remaining packets should be output.
has_packetIf set, pkt contains a packet to be interleaved on input; otherwise pkt is blank on input.
Returns
1 if a packet was output, 0 if no packet could be output, < 0 if an error occurred

Definition at line 577 of file avformat.h.

Referenced by init_muxer(), and seg_write_packet().

◆ query_codec

int(* AVOutputFormat::query_codec) (enum AVCodecID id, int std_compliance)

Test if the given codec can be stored in this container.

Returns
1 if the codec is supported, 0 if it is not. A negative number if unknown. MKTAG('A', 'P', 'I', 'C') if the codec is only supported as AV_DISPOSITION_ATTACHED_PIC

Definition at line 586 of file avformat.h.

Referenced by avformat_query_codec().

◆ get_output_timestamp

void(* AVOutputFormat::get_output_timestamp) (struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)

Definition at line 588 of file avformat.h.

◆ control_message

int(* AVOutputFormat::control_message) (struct AVFormatContext *s, int type, void *data, size_t data_size)

Allows sending messages from application to device.

Definition at line 593 of file avformat.h.

◆ write_uncoded_frame

int(* AVOutputFormat::write_uncoded_frame) (struct AVFormatContext *, int stream_index, AVFrame **frame, unsigned flags)

Write an uncoded AVFrame.

See av_write_uncoded_frame() for details.

The library will free *frame afterwards, but the muxer can prevent it by setting the pointer to NULL.

Definition at line 604 of file avformat.h.

◆ get_device_list

int(* AVOutputFormat::get_device_list) (struct AVFormatContext *s, struct AVDeviceInfoList *device_list)

Returns device list with it properties.

See also
avdevice_list_devices() for more details.

Definition at line 610 of file avformat.h.

◆ data_codec

enum AVCodecID AVOutputFormat::data_codec

default data codec

Definition at line 611 of file avformat.h.

Referenced by av_guess_codec(), and avformat_query_codec().

◆ init

int(* AVOutputFormat::init) (struct AVFormatContext *)

Initialize format.

May allocate data here, and set any AVFormatContext or AVStream parameters that need to be set before packets are sent. This method must not write output.

Return 0 if streams were fully configured, 1 if not, negative AVERROR on failure

Any allocations made here must be freed in deinit().

Definition at line 621 of file avformat.h.

◆ deinit

void(* AVOutputFormat::deinit) (struct AVFormatContext *)

Deinitialize format.

If present, this is called whenever the muxer is being destroyed, regardless of whether or not the header has been written.

If a trailer is being written, this is called after write_trailer().

This is called if init() fails as well.

Definition at line 630 of file avformat.h.

◆ check_bitstream

int(* AVOutputFormat::check_bitstream) (struct AVFormatContext *s, struct AVStream *st, const AVPacket *pkt)

Set up any necessary bitstream filtering and extract any extra data needed for the global header.

Note
pkt might have been directly forwarded by a meta-muxer; therefore pkt->stream_index as well as the pkt's timebase might be invalid. Return 0 if more packets from this stream must be checked; 1 if not.

Definition at line 639 of file avformat.h.

Referenced by dash_check_bitstream(), and seg_check_bitstream().


The documentation for this struct was generated from the following file: