MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / lcevc_init

Function lcevc_init

libavcodec/lcevcdec.c:279–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279static int lcevc_init(FFLCEVCContext *lcevc, void *logctx)
280{
281 LCEVC_AccelContextHandle dummy = { 0 };
282 const int32_t event = LCEVC_Log;
283
284 if (LCEVC_CreateDecoder(&lcevc->decoder, dummy) != LCEVC_Success) {
285 av_log(logctx, AV_LOG_ERROR, "Failed to create LCEVC decoder\n");
286 return AVERROR_EXTERNAL;
287 }
288
289 LCEVC_ConfigureDecoderInt(lcevc->decoder, "log_level", 4);
290 LCEVC_ConfigureDecoderIntArray(lcevc->decoder, "events", 1, &event);
291 LCEVC_SetDecoderEventCallback(lcevc->decoder, event_callback, logctx);
292
293 if (LCEVC_InitializeDecoder(lcevc->decoder) != LCEVC_Success) {
294 av_log(logctx, AV_LOG_ERROR, "Failed to initialize LCEVC decoder\n");
295 LCEVC_DestroyDecoder(lcevc->decoder);
296 return AVERROR_EXTERNAL;
297 }
298
299 lcevc->initialized = 1;
300
301 return 0;
302}
303
304int ff_lcevc_process(void *logctx, AVFrame *frame)
305{

Callers 1

ff_lcevc_processFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected