46 int bits_per_sample = 0;
49 if (!strncmp(
data->sampling,
"YCbCr-4:2:2", 11)) {
53 if (
data->depth == 8) {
57 }
else if (
data->depth == 10) {
80 if (!strncmp(attr,
"width", 5))
82 else if (!strncmp(attr,
"height", 6))
84 else if (!strncmp(attr,
"sampling", 8))
86 else if (!strncmp(attr,
"depth", 5))
142 uint16_t seq,
int flags)
145 const uint8_t *headers = buf + 2;
146 const uint8_t *payload = buf + 2;
147 int payload_len =
len - 2;
148 int missed_last_packet = 0;
152 if (*timestamp !=
data->timestamp) {
162 missed_last_packet = 1;
168 data->timestamp = *timestamp;
184 cont = payload[4] & 0x80;
193 if (payload_len < data->pgroup)
196 length = (headers[0] << 8) | headers[1];
197 line = ((headers[2] & 0x7f) << 8) | headers[3];
198 offset = ((headers[4] & 0x7f) << 8) | headers[5];
199 cont = headers[4] & 0x80;
202 if (length %
data->pgroup)
205 if (length > payload_len)
206 length = payload_len;
210 if (copy_offset + length >
data->frame_size)
213 dest =
data->frame + copy_offset;
214 memcpy(dest, payload, length);
217 payload_len -= length;
222 }
else if (missed_last_packet) {
#define flags(name, subs,...)
#define MKTAG(a, b, c, d)
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
char * av_strdup(const char *s)
Duplicate a string.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
enum AVPixelFormat pixfmt
#define AV_PIX_FMT_YUV422P10
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
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))
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
static int rfc4175_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
static int rfc4175_finalize_packet(PayloadContext *data, AVPacket *pkt, int stream_index)
static int rfc4175_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
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)
static int rfc4175_parse_format(AVStream *stream, PayloadContext *data)
const RTPDynamicProtocolHandler ff_rfc4175_rtp_handler
int bits_per_coded_sample
The number of bits per sample in the codedwords.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int index
stream index in AVFormatContext
RTP/JPEG specific private data.
uint32_t timestamp
current frame timestamp
static const uint8_t offset[127][2]