36 static const int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 };
40 if ((code < 0) || (code > 4))
46 static int mmf_rate_code(
int rate)
49 for (i = 0; i < 5; i++)
78 av_log(s,
AV_LOG_ERROR,
"Unsupported sample rate %d, supported are 4000, 8000, 11025, 22050 and 44100\n",
87 "add '-strict %d' if you want to use it.\n",
120 avio_write(pb,
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
152 end_tag_be(pb, mmf->
awapos);
153 end_tag_be(pb, mmf->
atrpos);
166 put_varlength(pb, gatetime);
169 put_varlength(pb, gatetime);
186 if (p->
buf[0] ==
'M' && p->
buf[1] ==
'M' &&
187 p->
buf[2] ==
'M' && p->
buf[3] ==
'D' &&
188 p->
buf[8] ==
'C' && p->
buf[9] ==
'N' &&
189 p->
buf[10] ==
'T' && p->
buf[11] ==
'I')
206 if (tag !=
MKTAG(
'M',
'M',
'M',
'D'))
214 if (tag ==
MKTAG(
'C',
'N',
'T',
'I'))
216 if (tag ==
MKTAG(
'O',
'P',
'D',
'A'))
222 if ((tag & 0xffffff) ==
MKTAG(
'M',
'T',
'R', 0)) {
226 if ((tag & 0xffffff) !=
MKTAG(
'A',
'T',
'R', 0)) {
247 if (tag ==
MKTAG(
'A',
't',
's',
'q'))
249 if (tag ==
MKTAG(
'A',
's',
'p',
'I'))
255 if ((tag & 0xffffff) !=
MKTAG(
'A',
'w',
'a', 0)) {
279 #define MAX_SIZE 4096 301 #if CONFIG_MMF_DEMUXER 317 .mime_type =
"application/vnd.smaf",
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
const char const char void * val
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t ff_start_tag(AVIOContext *pb, const char *tag)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
#define AV_CH_LAYOUT_STEREO
int strict_std_compliance
Allow non-standard and experimental extension.
static int mmf_probe(AVProbeData *p)
static int mmf_rate(int code)
unsigned int avio_rb32(AVIOContext *s)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVStream ** streams
A list of all streams in the file.
int flags
Flags modifying the (de)muxer behaviour.
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
uint64_t channel_layout
Audio only.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
int avio_r8(AVIOContext *s)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
int void avio_flush(AVIOContext *s)
Force flushing of buffered data.
audio channel layout utility functions
static int write_trailer(AVFormatContext *s1)
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
static int read_header(FFV1Context *f)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
AVIOContext * pb
I/O context.
void avio_w8(AVIOContext *s, int b)
static int mmf_read_header(AVFormatContext *s)
This structure contains the data a format has to probe a file.
static const int mmf_rates[]
int sample_rate
Audio only.
const char const char * params
static int mmf_read_packet(AVFormatContext *s, AVPacket *pkt)
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
int bits_per_coded_sample
The number of bits per sample in the codedwords.
void avio_wb32(AVIOContext *s, unsigned int val)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
#define AV_CH_LAYOUT_MONO
#define MKTAG(a, b, c, d)
This structure stores compressed data.