FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | FFOutputFormat |
Macros | |
#define | FF_OFMT_FLAG_ALLOW_FLUSH (1 << 1) |
This flag indicates that the muxer stores data internally and supports flushing it. More... | |
#define | FF_OFMT_FLAG_MAX_ONE_OF_EACH (1 << 2) |
If this flag is set, it indicates that for each codec type whose corresponding default codec (i.e. More... | |
#define | FF_OFMT_FLAG_ONLY_DEFAULT_CODECS (1 << 3) |
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat.audio/video/subtitle_codec; if any of the latter is unset (i.e. More... | |
Enumerations | |
enum | AVWriteUncodedFrameFlags { AV_WRITE_UNCODED_FRAME_QUERY = 0x0001 } |
Flags for AVFormatContext.write_uncoded_frame() More... | |
Functions | |
static const FFOutputFormat * | ffofmt (const AVOutputFormat *fmt) |
int | ff_interleave_add_packet (AVFormatContext *s, AVPacket *pkt, int(*compare)(AVFormatContext *, const AVPacket *, const AVPacket *)) |
Add packet to an AVFormatContext's packet_buffer list, determining its interleaved position using compare() function argument. More... | |
int | ff_interleave_packet_per_dts (AVFormatContext *s, AVPacket *pkt, int flush, int has_packet) |
Interleave an AVPacket per dts so it can be muxed. More... | |
int | ff_interleave_packet_passthrough (AVFormatContext *s, AVPacket *pkt, int flush, int has_packet) |
Interleave packets directly in the order in which they arrive without any sort of buffering. More... | |
const AVPacket * | ff_interleaved_peek (AVFormatContext *s, int stream) |
Find the next packet in the interleaving queue for the given stream. More... | |
int | ff_get_muxer_ts_offset (AVFormatContext *s, int stream_index, int64_t *offset) |
int | ff_stream_add_bitstream_filter (AVStream *st, const char *name, const char *args) |
Add a bitstream filter to a stream. More... | |
int | ff_write_chained (AVFormatContext *dst, int dst_stream, AVPacket *pkt, AVFormatContext *src, int interleave) |
Write a packet to another muxer than the one the user originally intended. More... | |
int | ff_format_shift_data (AVFormatContext *s, int64_t read_start, int shift_size) |
Make shift_size amount of space at read_start by shifting data in the output at read_start until the current IO position. More... | |
int | ff_format_output_open (AVFormatContext *s, const char *url, AVDictionary **options) |
Utility function to open IO stream of output format. More... | |
int | ff_parse_creation_time_metadata (AVFormatContext *s, int64_t *timestamp, int return_seconds) |
Parse creation_time in AVFormatContext metadata if exists and warn if the parsing fails. More... | |
int | ff_standardize_creation_time (AVFormatContext *s) |
Standardize creation_time metadata in AVFormatContext to an ISO-8601 timestamp string. More... | |
#define FF_OFMT_FLAG_ALLOW_FLUSH (1 << 1) |
This flag indicates that the muxer stores data internally and supports flushing it.
Flushing is signalled by sending a NULL packet to the muxer's write_packet callback; without this flag, a muxer never receives NULL packets. So the documentation of write_packet below for the semantics of the return value in case of flushing.
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH (1 << 2) |
If this flag is set, it indicates that for each codec type whose corresponding default codec (i.e.
AVOutputFormat.audio_codec, AVOutputFormat.video_codec and AVOutputFormat.subtitle_codec) is set (i.e. != AV_CODEC_ID_NONE) only one stream of this type can be muxed. It furthermore indicates that no stream with a codec type that has no default codec or whose default codec is AV_CODEC_ID_NONE can be muxed. Both of these restrictions are checked generically before the actual muxer's init/write_header callbacks.
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS (1 << 3) |
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat.audio/video/subtitle_codec; if any of the latter is unset (i.e.
equal to AV_CODEC_ID_NONE), then no stream of the corresponding type is supported. In addition, codec types without default codec field are disallowed.
|
inlinestatic |
Definition at line 167 of file mux.h.
Referenced by av_get_output_timestamp(), av_write_frame(), av_write_trailer(), av_write_uncoded_frame_query(), avdevice_app_to_dev_control_message(), avdevice_list_devices(), avformat_alloc_output_context2(), avformat_free_context(), avformat_init_output(), avformat_query_codec(), avformat_write_header(), check_bitstream(), dash_check_bitstream(), deinit_muxer(), init_muxer(), seg_check_bitstream(), seg_write_packet(), write_packet(), and write_uncoded_frame_internal().
int ff_interleave_add_packet | ( | AVFormatContext * | s, |
AVPacket * | pkt, | ||
int(*)(AVFormatContext *, const AVPacket *, const AVPacket *) | compare | ||
) |
Add packet to an AVFormatContext's packet_buffer list, determining its interleaved position using compare() function argument.
Definition at line 856 of file mux.c.
Referenced by ff_interleave_packet_per_dts(), gxf_interleave_packet(), and mxf_interleave().
int ff_interleave_packet_per_dts | ( | AVFormatContext * | s, |
AVPacket * | pkt, | ||
int | flush, | ||
int | has_packet | ||
) |
Interleave an AVPacket per dts so it can be muxed.
See the documentation of AVOutputFormat.interleave_packet for details.
Definition at line 960 of file mux.c.
Referenced by gxf_interleave_packet(), and init_muxer().
int ff_interleave_packet_passthrough | ( | AVFormatContext * | s, |
AVPacket * | pkt, | ||
int | flush, | ||
int | has_packet | ||
) |
Interleave packets directly in the order in which they arrive without any sort of buffering.
Definition at line 1081 of file mux.c.
Referenced by init_muxer().
const AVPacket* ff_interleaved_peek | ( | AVFormatContext * | s, |
int | stream | ||
) |
Find the next packet in the interleaving queue for the given stream.
Definition at line 1103 of file mux.c.
Referenced by mov_flush_fragment().
int ff_get_muxer_ts_offset | ( | AVFormatContext * | s, |
int | stream_index, | ||
int64_t * | offset | ||
) |
Definition at line 1087 of file mux.c.
Referenced by mov_flush_fragment().
int ff_stream_add_bitstream_filter | ( | AVStream * | st, |
const char * | name, | ||
const char * | args | ||
) |
Add a bitstream filter to a stream.
st | output stream to add a filter to |
name | the name of the filter to add |
args | filter-specific argument string |
Definition at line 1354 of file mux.c.
Referenced by daud_init(), flv_check_bitstream(), gxf_write_header(), ivf_init(), latm_check_bitstream(), mkv_check_bitstream(), mov_check_bitstream(), mpegts_check_bitstream(), mxf_check_bitstream(), and mxf_init().
int ff_write_chained | ( | AVFormatContext * | dst, |
int | dst_stream, | ||
AVPacket * | pkt, | ||
AVFormatContext * | src, | ||
int | interleave | ||
) |
Write a packet to another muxer than the one the user originally intended.
Useful when chaining muxers, where one muxer internally writes a received packet to another muxer.
dst | the muxer to write the packet to |
dst_stream | the stream index within dst to write the packet to |
pkt | the packet to be written. It will be returned blank when av_interleaved_write_frame() is used, unchanged otherwise. |
src | the muxer the packet originally was intended for |
interleave | 0->use av_write_frame, 1->av_interleaved_write_frame |
Definition at line 1397 of file mux.c.
Referenced by dash_write_packet(), ff_mov_add_hinted_packet(), hds_write_packet(), hls_write_packet(), ism_write_packet(), rtsp_write_packet(), sap_write_packet(), and seg_write_packet().
int ff_format_shift_data | ( | AVFormatContext * | s, |
int64_t | read_start, | ||
int | shift_size | ||
) |
Make shift_size amount of space at read_start by shifting data in the output at read_start until the current IO position.
The underlying IO context must be seekable.
Definition at line 72 of file mux_utils.c.
Referenced by mkv_write_trailer(), shift_data(), and write_header().
int ff_format_output_open | ( | AVFormatContext * | s, |
const char * | url, | ||
AVDictionary ** | options | ||
) |
Utility function to open IO stream of output format.
s | AVFormatContext |
url | URL or file name to open for writing @options optional options which will be passed to io_open callback |
Definition at line 128 of file mux_utils.c.
Referenced by fifo_thread_write_header(), and open_slave().
int ff_parse_creation_time_metadata | ( | AVFormatContext * | s, |
int64_t * | timestamp, | ||
int | return_seconds | ||
) |
Parse creation_time in AVFormatContext metadata if exists and warn if the parsing fails.
s | AVFormatContext |
timestamp | parsed timestamp in microseconds, only set on successful parsing |
return_seconds | set this to get the number of seconds in timestamp instead of microseconds |
Definition at line 138 of file mux_utils.c.
Referenced by asf_write_header1(), dv_init_mux(), ff_standardize_creation_time(), gxf_write_umf_material_description(), mkv_write_info(), mov_write_header(), and mxf_init().
int ff_standardize_creation_time | ( | AVFormatContext * | s | ) |
Standardize creation_time metadata in AVFormatContext to an ISO-8601 timestamp string.
s | AVFormatContext |
Definition at line 155 of file mux_utils.c.
Referenced by caf_write_header(), ff_ape_write_tag(), ff_id3v2_write_metadata(), lrc_write_header(), smjpeg_write_header(), write_globalinfo(), write_metadata(), and write_table_entries_attrib().