23#include "config_components.h"
31#define RAW_PACKET_SIZE 1024
44 pkt->stream_index = 0;
119#define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x)
120#define DEC AV_OPT_FLAG_DECODING_PARAM
129 .class_name =
"generic raw video demuxer",
135#define OFFSET(x) offsetof(FFRawDemuxerContext, x)
142 .class_name =
"generic raw demuxer",
148#if CONFIG_DATA_DEMUXER
161#if CONFIG_MJPEG_DEMUXER
169 for (
i = 0;
i <
p->buf_size - 1;
i++) {
171 if (
p->buf[
i] != 0xFF)
205 if ( (
c >= 0x02 &&
c <= 0xBF)
212 if (nb_invalid*4 + 1 < nb_frames) {
213 static const char ct_jpeg[] =
"\r\nContent-Type: image/jpeg\r\n";
216 for (
i=0;
i<
FFMIN(
p->buf_size - (
int)
sizeof(ct_jpeg), 100);
i++)
217 if (!memcmp(
p->buf +
i, ct_jpeg,
sizeof(ct_jpeg) - 1))
220 if (nb_invalid == 0 && nb_frames > 2)
224 if (!nb_invalid && nb_frames)
int avio_read_partial(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
#define i(width, name, range_min, range_max)
static const FFInputFormat * ffifmt(const AVInputFormat *fmt)
static struct @346255127015250356166251341105367306144006377143 state
@ AV_OPT_TYPE_VIDEO_RATE
Underlying C type is AVRational.
@ AV_OPT_TYPE_INT
Underlying C type is int.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
const char * av_default_item_name(void *ptr)
Return the context name.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
#define LIBAVUTIL_VERSION_INT
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const AVOption raw_options[]
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
#define FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, flag)
Describe the class of an AVClass context structure.
enum AVMediaType codec_type
General type of the encoded data.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
AVRational avg_frame_rate
Average framerate.
AVRational framerate
AVRational describing framerate, set by a private option.
enum AVStreamParseType need_parsing