Go to the documentation of this file.
35 #define RAW_PACKET_SIZE 1024
45 #define DEC AV_OPT_FLAG_DECODING_PARAM
46 #define OFFSET(x) offsetof(EVCDemuxContext, x)
64 int got_sps = 0, got_pps = 0, got_idr = 0, got_nonidr = 0;
65 const unsigned char *
bits = p->
buf;
71 if (nalu_size == 0)
break;
76 if(bytes_to_read < nalu_size)
break;
90 bytes_to_read -= nalu_size;
93 if (got_sps && got_pps && (got_idr || got_nonidr > 3))
146 int au_end_found = 0;
149 while(!au_end_found) {
166 if (!nalu_size || nalu_size > INT_MAX)
181 "evc_frame_merge filter\n");
188 "send output packet\n");
208 .p.extensions =
"evc",
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
enum AVMediaType codec_type
General type of the encoded data.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
@ AV_OPT_TYPE_VIDEO_RATE
Underlying C type is AVRational.
AVRational avg_frame_rate
Average framerate.
void(* filter)(uint8_t *src, int stride, int qscale)
int buf_size
Size of buf except extra allocated bytes.
void av_bsf_free(AVBSFContext **pctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
const FFInputFormat ff_evc_demuxer
The bitstream filter state.
static const AVClass evc_demuxer_class
static const AVOption evc_options[]
static int annexb_probe(const AVProbeData *p)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int evc_read_packet(AVFormatContext *s, AVPacket *pkt)
static int evc_read_header(AVFormatContext *s)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **pctx)
Allocate a context for a given bitstream filter.
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
enum AVStreamParseType need_parsing
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define LIBAVUTIL_VERSION_INT
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
Describe the class of an AVClass context structure.
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
Rational number (pair of numerator and denominator).
const char * av_default_item_name(void *ptr)
Return the context name.
This structure contains the data a format has to probe a file.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static int evc_read_close(AVFormatContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
Ensures that the requested seekback buffer size will be available.
#define EVC_NALU_LENGTH_PREFIX_SIZE
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static uint32_t evc_read_nal_unit_length(const uint8_t *bits, int bits_size, void *logctx)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)