You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
664 B
C++

#define _DECODER_INTERFACE_EXPORT_
#include "DecoderFactory.h"
#include "DecoderHardwareDInterface.h"
#include "DecoderSoftwareInterface.h"
DecoderFactory::DecoderFactory(void)
{
}
DecoderFactory::~DecoderFactory(void)
{
}
DecoderInterface* DecoderFactory::CreateDecoder(EnumDecoderType type)
{
DecoderInterface * decoder = NULL;
switch (type)
{
case DEC_SOFTWARE:
decoder = new DecoderSoftwareInterface();
break;
case DEC_HARDWARE:
decoder = new DecoderHardwareDInterface();
break;
default:
break;
}
return decoder;
}
void DecoderFactory::DestroyDecoder(DecoderInterface* decoder)
{
if (decoder)
{
delete decoder;
decoder = NULL;
}
}