Go to the documentation of this file.
50 const uint8_t *buf,
int len, uint16_t seq,
54 int f, p,
i, sbit, ebit,
src,
r;
61 if (
data->buf &&
data->timestamp != *timestamp) {
64 data->endbyte_bits = 0;
78 r = ((buf[1] & 0x01) << 3) | ((buf[2] & 0xe0) >> 5);
82 if (
len < header_size) {
84 "Too short H.263 RTP packet: %d bytes, %d header bytes\n",
93 if (
len < header_size) {
95 "Too short H.263 RTP packet: %d bytes, %d header bytes\n",
102 sbit = (buf[0] >> 3) & 0x7;
104 src = (buf[1] & 0xe0) >> 5;
105 if (!(buf[0] & 0xf8)) {
106 if ((
src == 0 ||
src >= 6) &&
r) {
110 "Interpreting H.263 RTP data as RFC 2429/4629 even though "
111 "signalled with a static payload type.\n");
128 data->timestamp = *timestamp;
135 if (
data->endbyte_bits || sbit) {
136 if (
data->endbyte_bits == sbit) {
137 data->endbyte |= buf[0] & (0xff >> sbit);
138 data->endbyte_bits = 0;
147 if (
data->endbyte_bits) {
154 if (
data->endbyte_bits)
156 (8 -
data->endbyte_bits);
164 data->endbyte_bits = 8 - ebit;
165 data->endbyte = buf[
len - 1] & (0xff << ebit);
173 if (
data->endbyte_bits)
175 data->endbyte_bits = 0;
193 .static_payload_id = 34,
#define AV_LOG_WARNING
Something somehow does not look correct.
static int get_bits_left(GetBitContext *gb)
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
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx)
Close the dynamic buffer and make a packet from it.
uint32_t timestamp
current frame timestamp
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void avio_w8(AVIOContext *s, int b)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
static void h263_close_context(PayloadContext *data)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int flags
A combination of AV_PKT_FLAG values.
static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
const RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler
#define i(width, name, range_min, range_max)
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
uint8_t * buf
the temporary storage buffer
int index
stream index in AVFormatContext
enum AVMediaType codec_type
This structure stores compressed data.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
RTP/JPEG specific private data.