Use the actual struct type instead of a void pointer to the decoder Initialize method
This commit is contained in:
parent
658d1e3651
commit
1075338b9b
@ -94,7 +94,7 @@ class ISVCEncoder {
|
|||||||
|
|
||||||
class ISVCDecoder {
|
class ISVCDecoder {
|
||||||
public:
|
public:
|
||||||
virtual long EXTAPI Initialize (void* pParam) = 0;
|
virtual long EXTAPI Initialize (const SDecodingParam* pParam) = 0;
|
||||||
virtual long EXTAPI Uninitialize() = 0;
|
virtual long EXTAPI Uninitialize() = 0;
|
||||||
|
|
||||||
virtual DECODING_STATE EXTAPI DecodeFrame (const unsigned char* pSrc,
|
virtual DECODING_STATE EXTAPI DecodeFrame (const unsigned char* pSrc,
|
||||||
@ -162,7 +162,7 @@ struct ISVCEncoderVtbl {
|
|||||||
typedef struct ISVCDecoderVtbl ISVCDecoderVtbl;
|
typedef struct ISVCDecoderVtbl ISVCDecoderVtbl;
|
||||||
typedef const ISVCDecoderVtbl* ISVCDecoder;
|
typedef const ISVCDecoderVtbl* ISVCDecoder;
|
||||||
struct ISVCDecoderVtbl {
|
struct ISVCDecoderVtbl {
|
||||||
long (*Initialize) (ISVCDecoder*, void* pParam);
|
long (*Initialize) (ISVCDecoder*, const SDecodingParam* pParam);
|
||||||
long (*Uninitialize) (ISVCDecoder*);
|
long (*Uninitialize) (ISVCDecoder*);
|
||||||
|
|
||||||
DECODING_STATE (*DecodeFrame) (ISVCDecoder*, const unsigned char* pSrc,
|
DECODING_STATE (*DecodeFrame) (ISVCDecoder*, const unsigned char* pSrc,
|
||||||
|
@ -52,7 +52,7 @@ extern "C" {
|
|||||||
/*!
|
/*!
|
||||||
* \brief configure decoder parameters
|
* \brief configure decoder parameters
|
||||||
*/
|
*/
|
||||||
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void* kpParam);
|
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpParam);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
*************************************************************************************
|
*************************************************************************************
|
||||||
|
@ -350,7 +350,7 @@ void WelsCloseDecoder (PWelsDecoderContext pCtx) {
|
|||||||
/*!
|
/*!
|
||||||
* \brief configure decoder parameters
|
* \brief configure decoder parameters
|
||||||
*/
|
*/
|
||||||
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const void* kpParam) {
|
int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpParam) {
|
||||||
if (NULL == pCtx || NULL == kpParam)
|
if (NULL == pCtx || NULL == kpParam)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class CWelsDecoder : public ISVCDecoder {
|
|||||||
CWelsDecoder (void);
|
CWelsDecoder (void);
|
||||||
virtual ~CWelsDecoder();
|
virtual ~CWelsDecoder();
|
||||||
|
|
||||||
virtual long EXTAPI Initialize (void* pParam);
|
virtual long EXTAPI Initialize (const SDecodingParam* pParam);
|
||||||
virtual long EXTAPI Uninitialize();
|
virtual long EXTAPI Uninitialize();
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -186,7 +186,7 @@ CWelsDecoder::~CWelsDecoder() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long CWelsDecoder::Initialize (void* pParam) {
|
long CWelsDecoder::Initialize (const SDecodingParam* pParam) {
|
||||||
if (pParam == NULL) {
|
if (pParam == NULL) {
|
||||||
IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::Initialize(), invalid input argument.");
|
IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::Initialize(), invalid input argument.");
|
||||||
return cmInitParaError;
|
return cmInitParaError;
|
||||||
|
@ -70,7 +70,7 @@ struct SVCEncoderImpl : public ISVCEncoder {
|
|||||||
|
|
||||||
struct SVCDecoderImpl : public ISVCDecoder {
|
struct SVCDecoderImpl : public ISVCDecoder {
|
||||||
virtual ~SVCDecoderImpl() {}
|
virtual ~SVCDecoderImpl() {}
|
||||||
virtual long EXTAPI Initialize(void* pParam) {
|
virtual long EXTAPI Initialize(const SDecodingParam* pParam) {
|
||||||
EXPECT_TRUE(gThis == this);
|
EXPECT_TRUE(gThis == this);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user