p26001-store-acs-soc-fw-app/video/core/VideoOverlay.h
2026-09-28 21:33:04 +08:00

64 lines
1.8 KiB
C++

#ifndef CBC5C20D_24D0_4D1F_B00E_8299B36FD74E
#define CBC5C20D_24D0_4D1F_B00E_8299B36FD74E
/*
*******************************************************************************
* INCLUDE
*******************************************************************************
*/
#include "VideoComponent.h"
#include "GeometryTypes.h"
#include "Image.h"
#include "util/FactoryManager.h"
namespace Video
{
namespace Core
{
/*
*******************************************************************************
* CLASS DECLARE
*******************************************************************************
*/
enum class VideoOverlayType
{
CANVAS,
MOSAIC,
};
class VideoOverlaySelector
{
public:
static VideoOverlayType select(VideoOverlayType type, const std::string&, const Rect&)
{
return type;
}
};
class VideoOverlay: public ::Util::FactoryManager<VideoOverlay, VideoOverlayType, VideoOverlaySelector,
VideoOverlayType, const std::string&, const Rect&>,
public ::Util::Configurable
{
public:
using Ptr = Poco::SharedPtr<VideoOverlay>;
protected:
VideoOverlay(VideoOverlayType type, const std::string& name, const Rect& region);
public:
virtual ~VideoOverlay();
virtual void render(Image::Ptr pImage) = 0;
virtual void scrollRender(Image::Ptr pImage, int hscroll) = 0;
virtual void attach(VideoComponent::Ptr target);
CONFIGURABLE_DECLARE_PARAMETER(ZOrder, int)
CONFIGURABLE_DECLARE_PARAMETER(Block, int)
READONLY_PROPERTY_DECLARE(type, VideoOverlayType)
READONLY_PROPERTY_DECLARE(name, std::string)
READONLY_PROPERTY_DECLARE(target, VideoComponent::Ptr)
READONLY_PROPERTY_DECLARE(region, Rect)
};
}
}
#endif