* SVC Encoder Initialization */
| 181 | * SVC Encoder Initialization |
| 182 | */ |
| 183 | int CWelsH264SVCEncoder::Initialize (const SEncParamBase* argv) { |
| 184 | if (m_pWelsTrace == NULL) { |
| 185 | return cmMallocMemeError; |
| 186 | } |
| 187 | |
| 188 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsH264SVCEncoder::InitEncoder(), openh264 codec version = %s", |
| 189 | VERSION_NUMBER); |
| 190 | |
| 191 | if (NULL == argv) { |
| 192 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), invalid argv= 0x%p", |
| 193 | argv); |
| 194 | return cmInitParaError; |
| 195 | } |
| 196 | |
| 197 | SWelsSvcCodingParam sConfig; |
| 198 | // Convert SEncParamBase into WelsSVCParamConfig here.. |
| 199 | if (sConfig.ParamBaseTranscode (*argv)) { |
| 200 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, |
| 201 | "CWelsH264SVCEncoder::Initialize(), parameter_translation failed."); |
| 202 | TraceParamInfo (&sConfig); |
| 203 | Uninitialize(); |
| 204 | return cmInitParaError; |
| 205 | } |
| 206 | |
| 207 | return InitializeInternal (&sConfig); |
| 208 | } |
| 209 | |
| 210 | int CWelsH264SVCEncoder::InitializeExt (const SEncParamExt* argv) { |
| 211 | if (m_pWelsTrace == NULL) { |
no test coverage detected