You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2019-2020. All rights reserved.
* Description: overlay create win/queue buffer by VO
* Author: Original Media Software Group
* Create: 2019-07-15
*/
#ifndef UNIFIED_WINDOW_IMPL_H
#define UNIFIED_WINDOW_IMPL_H
#include "VendorWindowAdp.h"
#include "uapi_win.h"
#include "securec.h"
#include <queue>
#include "uapi_rm.h"
#include "drv_video_ext.h"
namespace android {
constexpr int MIN_WINDOW_WIDTH = 64;
constexpr int MIN_WINDOW_HEIGHT = 64;
class UnifiedWindowImpl : public VendorWindowAdp {
public:
UnifiedWindowImpl();
~UnifiedWindowImpl() override;
int CreateWindow(const LayerInfo &info) override;
int SetWindowPosition(const OverlayRect &displayFrame) override;
int SetWindowCrop(const OverlayRect &sourceCrop) override;
int SetWindowTransform(const uint32_t transform) override;
int SetWindowZorder(const int32_t zorder) override;
int DisplayFrame(const Frame &frame, int &releaseFence, const int &dataSpace) override;
int ResetWindow() override;
int DestroyWindow() override;
protected:
int SetWindowQuickOutput(const LayerInfo &info) override;
int RegistRMCallback() override;
void UnRegistRMCallback() override;
private:
void FillFrameInfo(const Frame &frame, ext_drv_video_frame &frameInfo) const;
void DisplayFrameInfo(const Frame &frame, ext_drv_video_frame &frameInfo, const int &sinkFenceFd);
void FillFrameInfo(const Frame &frame, ext_drv_video_frame &frameInfo, const int &dataSpace) const;
void UnRegistRmcCallback(WindowManager& winManager);
void ClearWindowCallback();
uapi_win_rotation lastRotation;
};
}
#endif /* UNIFIED_WINDOW_IMPL_H */