#include "frameinfo.h"
#include <string>

CFrameInfo::CFrameInfo()
{
	ResetFrame();
}
CFrameInfo::~CFrameInfo()
{}
void CFrameInfo::ResetFrame()
{
	m_pData		= NULL;
	m_nWidth	= 0;
	m_nHeight	= 0;
	m_dDuration = 0;
	m_nPts		= 0;
	m_nPosition = 0;
}

int CFrameInfo::InitFrame(int nDataSize)
{
	m_pData = NULL;
	m_nWidth = 0;
	m_nHeight = 0;
	m_dDuration = 0;
	m_nPts = 0;
	m_nPosition = 0;

	m_nDataSize = nDataSize;

	m_pData = new unsigned char[nDataSize + 4];
	memset(m_pData, 0, nDataSize + 4);

	m_mediaType = Frame_Type_WhiteBoard;

	return 0;
}
int CFrameInfo::UnInitFrame()
{
	if(m_pData)
	{
		delete m_pData;
		m_pData = NULL;
	}
	return 0;
}