Files
BPI-CM9-Linux/aml-comp/hardware/amlogic/libencoder/mediaprocess/AmlVencInstIntf.cpp
T

43 lines
857 B
C++
Raw Normal View History

2026-08-13 11:28:40 +08:00
//#define LOG_NDEBUG 0
#define LOG_TAG "AMLVencInstIntf"
#include <utils/Log.h>
#include <stdio.h>
#include <stdlib.h>
#include "AmlVencInstIntf.h"
#include "AmlVencInst.h"
#include "AmlVencInstWave5.h"
#include "AmlVencInstVcCodec.h"
#include "AmlVencComm.h"
namespace android {
IAmlVencInst *VencGetInstance() {
AmlVencComm VencComm;
if (VencComm.SeletcHwEnc() == MULTI_WAVE) {
ALOGD("interface load wave521...");
return new AmlVencInstWave5;
}
else if (VencComm.SeletcHwEnc() == MULTI_VCCODEC) {
ALOGD("interface load vccodec...");
return new AmlVencInstVcCodec;
}
ALOGE("cannot find support driver,interface load nothing!!");
return NULL;
}
void VencDelInstance(IAmlVencInst *pInstance) {
if ( NULL != pInstance ) {
delete pInstance;
pInstance = NULL;
}
}
}