Go to the documentation of this file.
31 unsigned nb_frames = 1;
32 unsigned toc =
src[0];
33 unsigned toc_config = toc >> 3;
34 unsigned toc_count = toc & 3;
35 unsigned frame_size = toc_config < 12 ?
FFMAX(480, 960 * (toc_config & 3)) :
36 toc_config < 16 ? 480 << (toc_config & 1) :
37 120 << (toc_config & 3);
41 nb_frames =
src[1] & 0x3F;
42 }
else if (toc_count) {
71 bytestream_put_byte (&bs, 0x1);
75 bytestream_put_le16 (&bs, 0);
77 bytestream_put_le32 (&bs, 48000);
79 bytestream_put_le16 (&bs, 0x0);
81 bytestream_put_byte (&bs, 0x0);
93 const uint8_t *buf,
int len, uint16_t seq,
115 const char *attr,
const char *
value)
117 if (!strcmp(attr,
"sprop-maxcapturerate")) {
118 int rate = atoi(
value);
119 if (rate < 8000 || rate > 48000) {
121 "fmtp field 'sprop-maxcapturerate' must be between 8000 to 48000 (provided value: %s)",
125 stream->codecpar->sample_rate = rate;
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
This struct describes the properties of an encoded stream.
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))
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int nb_channels
Number of channels in this layout.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
static int opus_parse_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
AVChannelLayout ch_layout
Audio only.
static int opus_init(AVFormatContext *s, int st_index, PayloadContext *priv_data)
static int opus_write_extradata(AVCodecParameters *codecpar)
static int opus_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
static int opus_duration(const uint8_t *src, int size)
const RTPDynamicProtocolHandler ff_opus_dynamic_handler
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
static int parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
int index
stream index in AVFormatContext
This structure stores compressed data.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
RTP/AV1 specific private data.