#include <string>
#include <vector>
#include <memory>
#include <crtdbg.h>
using namespace std;
#include "..\..\VideoLibDev\VideoGMLib\AviFile\videofile.h"
#include "inputfile.h"
// prepare for RGB non-YUV by default
CInputFile::CInputFile() :
yuvwidth(0),
yuvheight(0),
yuvtype(gmVideoImage::RGB24)
{
}
// opens video in native color space
gmIVideoSource *CInputFile::Open(bool native_colorspace) const
{
if( yuvwidth > 0 && yuvheight > 0 ) // it is YUV file
return gmIVideoSource::OpenYUV(m_int_filename.c_str(), yuvwidth, yuvheight, yuvtype);
if( yuvwidth == 0 && yuvheight == 0 )
return gmIVideoSource::Open(m_int_filename.c_str(), native_colorspace);
_ASSERTE(false); // user or program gave us something nasty
return NULL;
}
bool CInputFile::operator==(const CInputFile &cif) const
{
return (m_ext_filename == cif.GetFilename());
}