Add: initial ODROID-N1 Rockchip hardware decoder support

This commit is contained in:
AreaScout
2018-03-05 23:23:19 +00:00
parent d452411428
commit c0cc20733b
7 changed files with 543 additions and 4 deletions

View File

@@ -59,6 +59,13 @@ enum platform platform_check(char* name) {
return AML;
}
#endif
#ifdef HAVE_ROCKCHIP
if (std || strcmp(name, "rk") == 0) {
void *handle = dlopen("libmoonlight-rk.so", RTLD_NOW | RTLD_GLOBAL);
if (handle != NULL && dlsym(RTLD_DEFAULT, "mpp_init") != NULL)
return RK;
}
#endif
#ifdef HAVE_X11
bool x11 = strcmp(name, "x11") == 0;
bool vdpau = strcmp(name, "x11_vdpau") == 0;
@@ -148,6 +155,10 @@ DECODER_RENDERER_CALLBACKS* platform_get_video(enum platform system) {
case AML:
return (PDECODER_RENDERER_CALLBACKS) dlsym(RTLD_DEFAULT, "decoder_callbacks_aml");
#endif
#ifdef HAVE_ROCKCHIP
case RK:
return (PDECODER_RENDERER_CALLBACKS) dlsym(RTLD_DEFAULT, "decoder_callbacks_rk");
#endif
}
return NULL;
}
@@ -178,6 +189,7 @@ AUDIO_RENDERER_CALLBACKS* platform_get_audio(enum platform system, char* audio_d
bool platform_supports_hevc(enum platform system) {
switch (system) {
case AML:
case RK:
return true;
}
return false;
@@ -191,6 +203,8 @@ char* platform_name(enum platform system) {
return "i.MX6 (MXC Vivante)";
case AML:
return "AMLogic VPU";
case RK:
return "Rockchip VPU";
case X11:
return "X Window System (software decoding)";
case X11_VAAPI: