46 int bits_per_sample = 0;
49 if (!strncmp(data->
sampling,
"YCbCr-4:2:2", 11)) {
50 tag =
MKTAG(
'U',
'Y',
'V',
'Y');
53 if (data->
depth == 8) {
57 }
else if (data->
depth == 10) {
80 if (!strncmp(attr,
"width", 5))
81 data->
width = atoi(value);
82 else if (!strncmp(attr,
"height", 6))
83 data->
height = atoi(value);
84 else if (!strncmp(attr,
"sampling", 8))
86 else if (!strncmp(attr,
"depth", 5))
87 data->
depth = atoi(value);
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;
162 missed_last_packet = 1;
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;
213 dest = data->
frame + copy_offset;
214 memcpy(dest, payload, length);
222 }
else if (missed_last_packet) {
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int rfc4175_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
RTP/JPEG specific private data.
int index
stream index in AVFormatContext
AVIOContext * frame
current frame buffer
static int rfc4175_parse_format(AVStream *stream, PayloadContext *data)
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
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)
AVStream ** streams
A list of all streams in the file.
uint32_t timestamp
current frame timestamp
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
static const uint8_t offset[127][2]
const RTPDynamicProtocolHandler ff_rfc4175_rtp_handler
char * av_strdup(const char *s)
Duplicate a string.
static int rfc4175_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
uint8_t * buf
the temporary storage buffer
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 AV_PIX_FMT_YUV422P10
static int rfc4175_finalize_packet(PayloadContext *data, AVPacket *pkt, int stream_index)
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
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
#define MKTAG(a, b, c, d)
AVPixelFormat
Pixel format.
This structure stores compressed data.