History

Don't have SEncParamExt inherit SEncParamBase

Instead just duplicate the common fields. These fields had to be duplicated for the C interface compatibility anyway - but this way there is no risk to accidentally introduce an ABI break since there is no need for the layout of SEncParamBase to actually match the start of SEncParamExt.

Martin Storsjö committed 12 years ago

Commit a899f051 parent 80f5aa25 files · +16 −81Browse files

Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 5 files). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+2−2
@@ -200,7 +200,7 @@ void CWelsH264SVCEncoder::InitEncoder (void) { · 199 unmodified lines
200/*200/*
201 * SVC Encoder Initialization201 * SVC Encoder Initialization
202 */202 */
203int CWelsH264SVCEncoder::Initialize (const SEncParamBase* argv, const INIT_TYPE iInitType) {203int CWelsH264SVCEncoder::Initialize (const void* argv, const INIT_TYPE iInitType) {
204 204
205 205
206 if ((INIT_TYPE_PARAMETER_BASED != iInitType && INIT_TYPE_PARAMETER_EXT != iInitType)|| NULL == argv) {206 if ((INIT_TYPE_PARAMETER_BASED != iInitType && INIT_TYPE_PARAMETER_EXT != iInitType)|| NULL == argv) {
@@ -213,7 +213,7 @@ int CWelsH264SVCEncoder::Initialize (const SEncParamBase* argv, const INIT_TYPE · 6 unmodified lines
213 if(iInitType == INIT_TYPE_PARAMETER_BASED)213 if(iInitType == INIT_TYPE_PARAMETER_BASED)
214 {214 {
215 // Convert SEncParamBase into WelsSVCParamConfig here..215 // Convert SEncParamBase into WelsSVCParamConfig here..
216 if (sConfig.ParamBaseTranscode (*argv, true)) {216 if (sConfig.ParamBaseTranscode (*(const SEncParamBase*)argv, true)) {
217 WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), parameter_translation failed.\n");217 WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), parameter_translation failed.\n");
218 Uninitialize();218 Uninitialize();
219 return cmInitParaError;219 return cmInitParaError;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t