Go to the documentation of this file.
53 if (!strncmp(
data->sampling,
"YCbCr-4:2:2", 11)) {
57 if (
data->depth == 8) {
61 }
else if (
data->depth == 10) {
68 }
else if (!strncmp(
data->sampling,
"YCbCr-4:2:0", 11)) {
72 if (
data->depth == 8) {
79 }
else if (!strncmp(
data->sampling,
"RGB", 3)) {
81 if (
data->depth == 8) {
89 }
else if (!strncmp(
data->sampling,
"BGR", 3)) {
91 if (
data->depth == 8) {
109 if (
data->interlaced)
114 if (
data->framerate.den > 0) {
126 if (!strncmp(attr,
"width", 5))
128 else if (!strncmp(attr,
"height", 6))
130 else if (!strncmp(attr,
"sampling", 8))
132 else if (!strncmp(attr,
"depth", 5))
134 else if (!strncmp(attr,
"interlace", 9))
135 data->interlaced = 1;
136 else if (!strncmp(attr,
"exactframerate", 14)) {
139 }
else if (!strncmp(attr,
"TCS", 3)) {
140 if (!strncmp(
value,
"SDR", 3))
142 else if (!strncmp(
value,
"PQ", 2))
144 else if (!strncmp(
value,
"HLG", 3))
146 else if (!strncmp(
value,
"LINEAR", 6))
148 else if (!strncmp(
value,
"ST428-1", 7))
152 }
else if (!strncmp(attr,
"colorimetry", 11)) {
153 if (!strncmp(
value,
"BT601", 5)) {
156 }
else if (!strncmp(
value,
"BT709", 5)) {
159 }
else if (!strncmp(
value,
"BT2020", 6)) {
163 }
else if (!strncmp(attr,
"RANGE", 5)) {
164 if (!strncmp(
value,
"NARROW", 6))
166 else if (!strncmp(
value,
"FULL", 4))
210 if (!
data->interlaced ||
data->field) {
225 const uint8_t * buf,
int len,
226 uint16_t seq,
int flags)
229 const uint8_t *
headers = buf + 2;
230 const uint8_t *payload = buf + 2;
231 int payload_len =
len - 2;
232 int missed_last_packet = 0;
236 if (*timestamp !=
data->timestamp) {
237 if (
data->frame && (!
data->interlaced ||
data->field)) {
246 missed_last_packet = 1;
253 data->timestamp = *timestamp;
269 cont = payload[4] & 0x80;
278 if (payload_len < data->pgroup)
289 if (!
data->pgroup || length %
data->pgroup)
292 if (length > payload_len)
293 length = payload_len;
295 if (
data->interlaced)
300 if (copy_offset + length >
data->frame_size || !
data->frame)
303 dest =
data->frame + copy_offset;
304 memcpy(dest, payload, length);
307 payload_len -= length;
312 }
else if (missed_last_packet) {
static int rfc4175_finalize_packet(PayloadContext *data, AVPacket *pkt, int stream_index)
AVPixelFormat
Pixel format.
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
static int rfc4175_handle_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
enum AVColorSpace color_space
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
int ff_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *p, int(*parse_fmtp)(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value))
@ AVCOL_RANGE_JPEG
Full range content.
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
AVRational avg_frame_rate
Average framerate.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
uint32_t timestamp
current frame timestamp
enum AVColorPrimaries color_primaries
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
@ AV_FIELD_TT
Top coded_first, top displayed first.
static int rfc4175_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
enum AVColorTransferCharacteristic color_trc
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static double av_q2d(AVRational a)
Convert an AVRational to a double.
const RTPDynamicProtocolHandler ff_rfc4175_rtp_handler
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this field
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Rational number (pair of numerator and denominator).
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
#define AV_PIX_FMT_YUV422P10
@ AVCOL_PRI_BT2020
ITU-R BT2020.
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
@ AVCOL_TRC_BT709
also ITU-R BT1361
int av_parse_video_rate(AVRational *rate, const char *arg)
Parse str and store the detected values in *rate.
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
static int rfc4175_parse_format(AVStream *stream, PayloadContext *data)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
enum AVColorRange color_range
Video only.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
enum AVFieldOrder field_order
Video only.
enum AVPixelFormat pixfmt
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
int index
stream index in AVFormatContext
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
FFmpeg currently uses a custom build this text attempts to document some of its obscure features and options Makefile the full command issued by make and its output will be shown on the screen DBG Preprocess x86 external assembler files to a dbg asm file in the object which then gets compiled Helps in developing those assembler files DESTDIR Destination directory for the install useful to prepare packages or install FFmpeg in cross environments GEN Set to ‘1’ to generate the missing or mismatched references Makefile builds all the libraries and the executables fate Run the fate test note that you must have installed it fate list List all fate regression test targets install Install headers
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
char * av_strdup(const char *s)
Duplicate a string.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
#define flags(name, subs,...)
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define MKTAG(a, b, c, d)
static int rfc4175_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
RTP/JPEG specific private data.
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line