amr_file.h

来自「MONOGRAM AMR Splitter v0.9.0.1」· C头文件 代码 · 共 68 行

H
68
字号
//-----------------------------------------------------------------------------
//
//	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 + =
减小字号Ctrl + -
显示快捷键?