27 #include "libavutil/bswap.h"
28 #include "libavutil/intreadwrite.h"
32 #define MTV_ASUBCHUNK_DATA_SIZE 500
33 #define MTV_HEADER_SIZE 512
34 #define MTV_AUDIO_PADDING_SIZE 12
35 #define AUDIO_SAMPLING_RATE 44100
56 if (*p->
buf !=
'A' || *(p->
buf + 1) !=
'M' || *(p->
buf + 2) !=
'V')
83 unsigned int audio_subsegments;
109 av_log(s,
AV_LOG_ERROR,
"width or height or segment_size is invalid and I cannot calculate them from other information\n");
116 if (audio_subsegments == 0) {
#define MTV_ASUBCHUNK_DATA_SIZE
#define AVERROR_PATCHWELCOME
int64_t pos
byte position in stream, -1 if unknown
char * av_strdup(const char *s) av_malloc_attrib
Duplicate the string s.
unsigned int img_bpp
frame bits per pixel
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
int64_t data_offset
offset of the first packet
unsigned int segments
number of 512 byte segments
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
unsigned int img_colorfmt
frame colorfmt rgb 565/555
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
AVInputFormat ff_mtv_demuxer
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
enum AVStreamParseType need_parsing
static int mtv_read_header(AVFormatContext *s)
unsigned int audio_identifier
'MP3' on all files I have seen
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
unsigned int file_size
filesize, not always right
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
unsigned int full_segment_size
preferred ID for decoding MPEG audio layer 1, 2 or 3
int buf_size
Size of buf except extra allocated bytes.
int bit_rate
the average bitrate
int width
picture width / height.
#define MTV_AUDIO_PADDING_SIZE
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
unsigned int img_segment_size
size of image segment
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
static int mtv_probe(AVProbeData *p)
unsigned int audio_br
bitrate of audio channel (mp3)
#define AUDIO_SAMPLING_RATE
static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
This structure stores compressed data.