48 int bits_per_sample = 0;
51 if (!strncmp(
data->sampling,
"YCbCr-4:2:2", 11)) {
55 if (
data->depth == 8) {
59 }
else if (
data->depth == 10) {
82 if (!strncmp(attr,
"width", 5))
84 else if (!strncmp(attr,
"height", 6))
86 else if (
data->sampling ==
NULL && !strncmp(attr,
"sampling", 8))
88 else if (!strncmp(attr,
"depth", 5))
153 uint16_t seq,
int flags)
156 const uint8_t *headers = buf + 2;
157 const uint8_t *payload = buf + 2;
158 int payload_len =
len - 2;
159 int missed_last_packet = 0;
163 if (*timestamp !=
data->timestamp) {
173 missed_last_packet = 1;
179 data->timestamp = *timestamp;
195 cont = payload[4] & 0x80;
204 if (payload_len < data->pgroup)
207 length = (headers[0] << 8) | headers[1];
208 line = ((headers[2] & 0x7f) << 8) | headers[3];
209 offset = ((headers[4] & 0x7f) << 8) | headers[5];
210 cont = headers[4] & 0x80;
213 if (length %
data->pgroup)
216 if (length > payload_len)
217 length = payload_len;
224 if (copy_offset + length >
data->frame_size)
227 dest =
data->frame + copy_offset;
228 memcpy(dest, payload, length);
231 payload_len -= length;
236 }
else if (missed_last_packet) {
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#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_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
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_arg, 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]