📄 amr_file.h
字号:
//-----------------------------------------------------------------------------
//
// AMR Demuxer
//
// Author : Igor Janos
//
//-----------------------------------------------------------------------------
#pragma once
class CAMRReader;
//-----------------------------------------------------------------------------
//
// CAMRPacket
//
//-----------------------------------------------------------------------------
class CAMRPacket
{
public:
int64 file_position; // absolute file position (in bytes)
uint8 packet[64]; // we own this one
int32 packet_size; // whole packet size
REFERENCE_TIME tStart, tStop;
public:
CAMRPacket();
virtual ~CAMRPacket();
// loading packets
int Load(CAMRReader *reader);
};
//-----------------------------------------------------------------------------
//
// CAMRFile class
//
//-----------------------------------------------------------------------------
class CAMRFile
{
public:
int64 duration_10mhz; // total file duration
int64 total_frames; // total number of AMR frames
// internals
CAMRReader *reader; // file reader interface
// current position
int64 total_samples;
int64 current_sample;
CArray<int64> seek_table;
public:
CAMRFile();
virtual ~CAMRFile();
// I/O for AMR file
int Open(CAMRReader *reader);
// parsing out packets
int ReadAudioPacket(CAMRPacket *packet, int64 *cur_sample);
int Seek(int64 seek_sample);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -