本文主要是介绍ijkplayer从ffmpeg指针获取sdl渲染信息并设置异常到流程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
获取abort_request流程:
is->abort_request
VideoState *is = ffp->is;
获取sdl流程:
typedef struct FFPlayer {
/* extra fields */
SDL_Aout *aout;
SDL_Vout *vout;
}
sdl回调的call机制
ANativeWindow_lock
SDL_Android_NativeWindow_display_l
func_display_overlay_l
func_display_overlay
SDL_Vout *SDL_VoutAndroid_CreateForANativeWindow()
{
SDL_Vout *vout = SDL_Vout_CreateInternal(sizeof(SDL_Vout_Opaque));
if (!vout)
return NULL;
SDL_Vout_Opaque *opaque = vout->opaque;
opaque->native_window = NULL;
if (ISDL_Array__init(&opaque->overlay_manager, 32))
goto fail;
if (ISDL_Array__init(&opaque->overlay_pool, 32))
goto fail;
opaque->egl = IJK_EGL_create();
if (!opaque->egl)
goto fail;
vout->opaque_class = &g_nativewindow_class;
vout->create_overlay = func_create_overlay;
vout->free_l = func_free_l;
vout->display_overlay = func_display_overlay;
return vout;
fail:
func_free_l(vout);
return NULL;
}
SDL_VoutAndroid_CreateForAndroidSurface
IjkMediaPlayer *ijkmp_android_create(int(*msg_loop)(void*))
{
IjkMediaPlayer *mp = ijkmp_create(msg_loop);
if (!mp)
goto fail;
mp->ffplayer->vout = SDL_VoutAndroid_CreateForAndroidSurface();
if (!mp->ffplayer->vout)
goto fail;
mp->ffplayer->pipeline = ffpipeline_create_from_android(mp->ffplayer);
if (!mp->ffplayer->pipeline)
goto fail;
ffpipeline_set_vout(mp->ffplayer->pipeline, mp->ffplayer->vout);
return mp;
fail:
ijkmp_dec_ref_p(&mp);
return NULL;
}
这篇关于ijkplayer从ffmpeg指针获取sdl渲染信息并设置异常到流程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!