Muxing
[I/O and Muxing/Demuxing Library]


Data Structures

struct  AVOutputFormat

Functions

int avformat_write_header (AVFormatContext *s, AVDictionary **options)
 Allocate the stream private data and write the stream header to an output media file.
attribute_deprecated int av_write_header (AVFormatContext *s)
 Allocate the stream private data and write the stream header to an output media file.
int av_write_frame (AVFormatContext *s, AVPacket *pkt)
 Write a packet to an output media file.
int av_interleaved_write_frame (AVFormatContext *s, AVPacket *pkt)
 Write a packet to an output media file ensuring correct interleaving.
int av_interleave_packet_per_dts (AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
 Interleave a packet per dts in an output media file.
int av_write_trailer (AVFormatContext *s)
 Write the stream trailer to an output media file and free the file private data.

Function Documentation

int av_interleave_packet_per_dts ( AVFormatContext s,
AVPacket out,
AVPacket pkt,
int  flush 
)

Interleave a packet per dts in an output media file.

Packets with pkt->destruct == av_destruct_packet will be freed inside this function, so they cannot be used after it. Note that calling av_free_packet() on them is still safe.

Parameters:
s media file handle
out the interleaved packet will be output here
pkt the input packet
flush 1 if no further packets are available as input and all remaining packets should be output
Returns:
1 if a packet was output, 0 if no packet could be output, < 0 if an error occurred

Definition at line 3384 of file utils.c.

Referenced by gxf_interleave_packet(), and interleave_packet().

int av_interleaved_write_frame ( AVFormatContext s,
AVPacket pkt 
)

Write a packet to an output media file ensuring correct interleaving.

The packet must contain one audio or video frame. If the packets are already correctly interleaved, the application should call av_write_frame() instead as it is slightly faster. It is also important to keep in mind that completely non-interleaved input will need huge amounts of memory to interleave with this, so it is preferable to interleave at the demuxer level.

Parameters:
s media file handle
pkt The packet, which contains the stream_index, buf/buf_size, dts/pts, ...
Returns:
< 0 on error, = 0 if OK, 1 if end of stream wanted

Definition at line 3459 of file utils.c.

Referenced by write_audio_frame(), write_frame(), and write_video_frame().

int av_write_frame ( AVFormatContext s,
AVPacket pkt 
)

Write a packet to an output media file.

The packet shall contain one audio or video frame. The packet must be correctly interleaved according to the container specification, if not then av_interleaved_write_frame must be used.

Parameters:
s media file handle
pkt The packet, which contains the stream_index, buf/buf_size, dts/pts, ...
Returns:
< 0 on error, = 0 if OK, 1 if end of stream wanted

Definition at line 3287 of file utils.c.

Referenced by ff_write_chained(), and http_prepare_data().

attribute_deprecated int av_write_header ( AVFormatContext s  ) 

Allocate the stream private data and write the stream header to an output media file.

Note:
: this sets stream time-bases, if possible to stream->codec->time_base but for some formats it might also be some other time base
Parameters:
s media file handle
Returns:
0 if OK, AVERROR_xxx on error
Deprecated:
use avformat_write_header.

Definition at line 3069 of file utils.c.

Referenced by main().

int av_write_trailer ( AVFormatContext s  ) 

Write the stream trailer to an output media file and free the file private data.

May only be called after a successful call to av_write_header.

Parameters:
s media file handle
Returns:
0 if OK, AVERROR_xxx on error

Definition at line 3495 of file utils.c.

Referenced by close_connection(), ff_mov_close_hinting(), ff_rtsp_undo_setup(), http_prepare_data(), main(), sap_write_close(), and transcode().

int avformat_write_header ( AVFormatContext s,
AVDictionary **  options 
)

Allocate the stream private data and write the stream header to an output media file.

Parameters:
s Media file handle, must be allocated with avformat_alloc_context(). Its oformat field must be set to the desired output format; Its pb field must be set to an already openened AVIOContext.
options An AVDictionary filled with AVFormatContext and muxer-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL.
Returns:
0 on success, negative AVERROR on failure.
See also:
av_opt_find, av_dict_set, avio_open, av_oformat_next.

Definition at line 3075 of file utils.c.

Referenced by av_write_header(), build_feed_streams(), ff_rtp_chain_mux_open(), http_prepare_data(), rtp_new_av_stream(), and transcode_init().


Generated on Fri Oct 26 02:43:54 2012 for FFmpeg by  doxygen 1.5.8