Go to the documentation of this file.
56 if (!mpegts_format || !rtp_format)
64 for (
i = 0;
i <
s->nb_streams;
i++) {
76 for (
i = 0;
i <
s->nb_streams;
i++)
134 local_pkt.
data = buf;
152 .
name =
"rtp_mpegts",
154 .priv_data_size =
sizeof(
struct MuxChain),
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVOutputFormat ff_rtp_mpegts_muxer
AVStream ** streams
A list of all streams in the file.
ff_const59 AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
Return the output format in the list of registered output formats which best matches the provided par...
AVFormatContext * mpegts_ctx
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
AVDictionary * metadata
Metadata that applies to the whole file.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
AVIOContext * pb
I/O context.
@ AV_CODEC_ID_MPEG2TS
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file.
static int rtp_mpegts_write_header(AVFormatContext *s)
ff_const59 struct AVOutputFormat * oformat
The output container format.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
#define AV_NOPTS_VALUE
Undefined timestamp value.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
static int rtp_mpegts_write_close(AVFormatContext *s)
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static int rtp_mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
AVFormatContext * rtp_ctx
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.