30 typedef struct yop_dec_context {
42 probe_packet->
buf[2]<10 &&
43 probe_packet->
buf[3]<10 &&
44 probe_packet->
buf[6] &&
45 probe_packet->
buf[7] &&
46 !(probe_packet->
buf[8] & 1) &&
47 !(probe_packet->
buf[10] & 1) &&
49 AV_RL16(probe_packet->
buf + 12 + 6) < probe_packet->
buf[12] * 3 + 4 + probe_packet->
buf[7] * 2048
68 if (!audio_stream || !video_stream)
76 audio_dec = audio_stream->
codec;
84 video_dec = video_stream->
codec;
126 int actual_video_data_size = yop->
frame_size -
135 #if FF_API_DESTRUCT_PACKET
156 }
else if (ret < yop->palette_size) {
171 actual_video_data_size);
174 else if (ret < actual_video_data_size)
193 int64_t timestamp,
int flags)
196 int64_t frame_pos, pos_min, pos_max;
204 frame_count = (pos_max - pos_min) / yop->
frame_size;
206 timestamp =
FFMAX(0,
FFMIN(frame_count, timestamp));
208 frame_pos = timestamp * yop->
frame_size + pos_min;
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t avio_size(AVIOContext *s)
Get the filesize.
void av_free_packet(AVPacket *pkt)
Free a packet.
int64_t pos
byte position in stream, -1 if unknown
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
static AVStream * video_stream
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
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_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
attribute_deprecated void(* destruct)(struct AVPacket *)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static AVStream * audio_stream
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int bit_rate
the average bitrate
audio channel layout utility functions
int width
picture width / height.
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
main external API structure.
rational number numerator/denominator
This structure contains the data a format has to probe a file.
unsigned int avio_rl16(AVIOContext *s)
#define FF_DISABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
int channels
number of audio channels
void * priv_data
Format private data.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.