/* * Copyright (c) Hisilicon Technologies Co., Ltd.. 2022-2022. All rights reserved. * Description: bootvideo surface ui head file */ #ifndef SURFACEUI_H #define SURFACEUI_H #include #include #if PLATFORM_SDK_VERSION <= __ANDROID_API_Q__ #else #include #endif namespace android { class SurfaceUI : public RefBase { public: SurfaceUI(); virtual ~SurfaceUI(); virtual bool CreateSurface() = 0; int GetDisplayOrientation() const; // android native sp controlPlayer = nullptr; sp controlUi = nullptr; unsigned int surfaceW = 0; unsigned int surfaceH = 0; }; #if PLATFORM_SDK_VERSION <= __ANDROID_API_Q__ class SurfaceQverUI : public SurfaceUI { public: SurfaceQverUI(); ~SurfaceQverUI() override; bool CreateSurface() override; }; #else class SurfaceSverUI : public SurfaceUI { public: SurfaceSverUI(); ~SurfaceSverUI() override; bool CreateSurface() override; ui::Size limitSurfaceSize(int width, int height) const; private: int mMaxWidth; int mMaxHeight; }; #endif }; #endif