Go to the documentation of this file.
27 #define RTP_H261_PAYLOAD_HEADER_SIZE 4
48 const uint8_t *buf,
int len, uint16_t seq,
51 int sbit, ebit, gobn, mbap,
quant;
55 if (rtp_h261_ctx->
buf && rtp_h261_ctx->
timestamp != *timestamp) {
86 sbit = (buf[0] >> 5) & 0x07;
87 ebit = (buf[0] >> 2) & 0x07;
88 gobn = (buf[1] >> 4) & 0x0f;
89 mbap = ((buf[1] << 1) & 0x1e) | ((buf[2] >> 7) & 0x01);
90 quant = (buf[2] >> 2) & 0x1f;
97 if (!rtp_h261_ctx->
buf) {
99 if (!gobn && !sbit && !mbap && !
quant) {
114 rtp_h261_ctx->
endbyte |= buf[0] & (0xff >> sbit);
144 rtp_h261_ctx->
endbyte = buf[
len - 1] & (0xff << ebit);
175 .static_payload_id = 31,
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.
const RTPDynamicProtocolHandler ff_h261_dynamic_handler
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.
static const uint8_t quant[64]
#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.
static av_cold void h261_close_context(PayloadContext *pl_ctx)
void avio_w8(AVIOContext *s, int b)
#define RTP_H261_PAYLOAD_HEADER_SIZE
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
uint8_t * buf
the temporary storage buffer
int index
stream index in AVFormatContext
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
This structure stores compressed data.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
RTP/JPEG specific private data.