ref: 658d1e36512414d759d3de4fbf5bd8ef9748131e
parent: 8435dd33af6fcea1dd11773716c0ca1474cda6c3
author: Martin Storsjö <[email protected]>
date: Tue Feb 18 07:32:57 EST 2014
Remove the unused iInitType parameter to the decoder Initialize method
--- a/codec/api/svc/codec_api.h
+++ b/codec/api/svc/codec_api.h
@@ -94,7 +94,7 @@
class ISVCDecoder {
public:
- virtual long EXTAPI Initialize (void* pParam, const INIT_TYPE iInitType) = 0;
+ virtual long EXTAPI Initialize (void* pParam) = 0;
virtual long EXTAPI Uninitialize() = 0;
virtual DECODING_STATE EXTAPI DecodeFrame (const unsigned char* pSrc,
@@ -162,7 +162,7 @@
typedef struct ISVCDecoderVtbl ISVCDecoderVtbl;
typedef const ISVCDecoderVtbl* ISVCDecoder;
struct ISVCDecoderVtbl {
- long (*Initialize) (ISVCDecoder*, void* pParam, const INIT_TYPE iInitType);
+ long (*Initialize) (ISVCDecoder*, void* pParam);
long (*Uninitialize) (ISVCDecoder*);
DECODING_STATE (*DecodeFrame) (ISVCDecoder*, const unsigned char* pSrc,
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -408,7 +408,7 @@
return 1;
}
- if (pDecoder->Initialize (&sDecParam, INIT_TYPE_PARAMETER_BASED)) {
+ if (pDecoder->Initialize (&sDecParam)) {
printf ("Decoder initialization failed.\n");
return 1;
}
--- a/codec/decoder/plus/inc/welsDecoderExt.h
+++ b/codec/decoder/plus/inc/welsDecoderExt.h
@@ -59,7 +59,7 @@
CWelsDecoder (void);
virtual ~CWelsDecoder();
-virtual long EXTAPI Initialize (void* pParam, const INIT_TYPE keInitType);
+virtual long EXTAPI Initialize (void* pParam);
virtual long EXTAPI Uninitialize();
/***************************************************************************
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -186,8 +186,8 @@
}
}
-long CWelsDecoder::Initialize (void* pParam, const INIT_TYPE keInitType) {
- if (pParam == NULL || keInitType != INIT_TYPE_PARAMETER_BASED) {
+long CWelsDecoder::Initialize (void* pParam) {
+ if (pParam == NULL) {
IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::Initialize(), invalid input argument.");
return cmInitParaError;
}
--- a/test/BaseDecoderTest.cpp
+++ b/test/BaseDecoderTest.cpp
@@ -58,7 +58,7 @@
decParam.uiEcActiveFlag = 1;
decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
- rv = decoder_->Initialize(&decParam, INIT_TYPE_PARAMETER_BASED);
+ rv = decoder_->Initialize(&decParam);
ASSERT_EQ(0, rv);
}
--- a/test/cpp_interface_test.cpp
+++ b/test/cpp_interface_test.cpp
@@ -70,7 +70,7 @@
struct SVCDecoderImpl : public ISVCDecoder {
virtual ~SVCDecoderImpl() {}
- virtual long EXTAPI Initialize(void* pParam, const INIT_TYPE iInitType) {
+ virtual long EXTAPI Initialize(void* pParam) {
EXPECT_TRUE(gThis == this);
return 1;
}