[mpp]: Remove RKPLATFORM macro

Mpp will only run under Linux environment. Windows support will be
removed.

Change-Id: I52de4bd69f6d7b34507edeb6642668e225fcbd38
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2018-09-04 16:01:52 +08:00
parent 15e357ffd0
commit 67e80ebfe4
39 changed files with 292 additions and 789 deletions

View File

@@ -14,9 +14,7 @@
* limitations under the License.
*/
#ifdef RKPLATFORM
#include <fcntl.h>
#endif
#include <string.h>
#include "mpp_env.h"
@@ -156,7 +154,6 @@ MppPlatformService::MppPlatformService()
vcodec_type(0),
vcodec_capability(0)
{
#ifdef RKPLATFORM
/* judge vdpu support version */
RK_S32 fd = -1;
@@ -252,7 +249,6 @@ MppPlatformService::MppPlatformService()
vcodec_type &= ~(HAVE_VPU1 | HAVE_VPU2);
mpp_dbg(MPP_DBG_PLATFORM, "vcodec type %08x\n", vcodec_type);
#endif
}
MppPlatformService::~MppPlatformService()
@@ -286,13 +282,11 @@ RK_U32 mpp_get_2d_hw_flag(void)
{
RK_U32 flag = 0;
#ifdef RKPLATFORM
if (!access("/dev/rga", F_OK))
flag |= HAVE_RGA;
if (!access("/dev/iep", F_OK))
flag |= HAVE_IEP;
#endif
return flag;
}
@@ -300,7 +294,7 @@ RK_U32 mpp_get_2d_hw_flag(void)
const char *mpp_get_platform_dev_name(MppCtxType type, MppCodingType coding, RK_U32 platform)
{
const char *dev = NULL;
#ifdef RKPLATFORM
if ((platform & HAVE_RKVDEC) && (type == MPP_CTX_DEC) &&
(coding == MPP_VIDEO_CodingAVC ||
coding == MPP_VIDEO_CodingHEVC ||
@@ -325,11 +319,6 @@ const char *mpp_get_platform_dev_name(MppCtxType type, MppCodingType coding, RK_
} else {
dev = mpp_find_device(mpp_vpu_dev);
}
#else
(void)type;
(void)coding;
(void)platform;
#endif
return dev;
}
@@ -337,7 +326,6 @@ const char *mpp_get_platform_dev_name(MppCtxType type, MppCodingType coding, RK_
const char *mpp_get_vcodec_dev_name(MppCtxType type, MppCodingType coding)
{
const char *dev = NULL;
#ifdef RKPLATFORM
RockchipSocType soc_type = MppPlatformService::get_instance()->get_soc_type();
switch (soc_type) {
@@ -485,10 +473,6 @@ const char *mpp_get_vcodec_dev_name(MppCtxType type, MppCodingType coding)
dev = mpp_get_platform_dev_name(type, coding, vcodec_type);
} break;
}
#else
(void)type;
(void)coding;
#endif
return dev;
}