32 #define MTV_ASUBCHUNK_DATA_SIZE 500
33 #define MTV_HEADER_SIZE 512
34 #define MTV_AUDIO_PADDING_SIZE 12
35 #define MTV_IMAGE_DEFAULT_BPP 16
36 #define MTV_AUDIO_SAMPLING_RATE 44100
63 if (*p->
buf !=
'A' || *(p->
buf + 1) !=
'M' || *(p->
buf + 2) !=
'V')
67 if (p->
buf[43] !=
'M' || p->
buf[44] !=
'P' || p->
buf[45] !=
'3')
106 unsigned int audio_subsegments;
140 av_log(
s,
AV_LOG_ERROR,
"width or height or segment_size is invalid and I cannot calculate them from other information\n");
147 if (audio_subsegments == 0) {
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
unsigned int avio_rl16(AVIOContext *s)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rl32(AVIOContext *s)
unsigned int avio_rl24(AVIOContext *s)
int avio_r8(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_header(FFV1Context *f)
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
char * av_strdup(const char *s)
Duplicate a string.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define MTV_IMAGE_DEFAULT_BPP
#define MTV_ASUBCHUNK_DATA_SIZE
static int mtv_probe(const AVProbeData *p)
#define MTV_AUDIO_SAMPLING_RATE
#define MTV_AUDIO_PADDING_SIZE
static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_mtv_demuxer
static int mtv_read_header(AVFormatContext *s)
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
int extradata_size
Size of the extradata content in bytes.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
enum AVMediaType codec_type
General type of the encoded data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
This structure contains the data a format has to probe a file.
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
enum AVStreamParseType need_parsing
unsigned int audio_br
bitrate of audio channel (mp3)
unsigned int segments
number of 512 byte segments
unsigned int img_bpp
frame bits per pixel
unsigned int img_segment_size
size of image segment
unsigned int file_size
filesize, not always right
unsigned int img_colorfmt
frame colorfmt rgb 565/555
unsigned int audio_identifier
'MP3' on all files I have seen
unsigned int full_segment_size
#define avpriv_request_sample(...)