Files
BPI-CM9-Linux/aml-comp/vendor/amlogic/aml_pqserver/libpq/include/CPQControlCb.h
T
2026-08-24 10:03:24 +08:00

114 lines
2.7 KiB
C++

/*
* Copyright (c) 2022 Amlogic, Inc. All rights reserved.
*
* This source code is subject to the terms and conditions defined in the
* file 'LICENSE' which is part of this source code package.
*
* Description: CPQControl callback type header file
*/
#ifndef _CPQCB_S_H_
#define _CPQCB_S_H_
#ifdef __cplusplus
extern "C" {
#endif
class CPQControlCb {
public:
static const int PQ_CB_TYPE_HDRTYPE = 0;
static const int PQ_CB_TYPE_ALLM_GAME_MODE = 1;
static const int PQ_CB_TYPE_FILM_MAKER_MODE = 2;
static const int PQ_CB_TYPE_REFRESH_RATE = 3;
static const int PQ_CB_TYPE_PQ_MODE_AUTO_CHANGED = 4;
static const int PQ_CB_TYPE_PQ_MODE_MANUAL_CHANGED = 5;
CPQControlCb(int type) {
mCbType = type;
}
~CPQControlCb() {
}
int getCbType() {
return mCbType;
}
private:
int mCbType;
};
namespace PQControlCb {
class HdrTypeCb: public CPQControlCb {
public:
HdrTypeCb() : CPQControlCb(CPQControlCb::PQ_CB_TYPE_HDRTYPE)
{
mHdrType = 6; //HDRTYPE_SDR
}
~HdrTypeCb() {}
int mHdrType;
};
class AllmGameModeCb: public CPQControlCb {
public:
AllmGameModeCb() : CPQControlCb(CPQControlCb::PQ_CB_TYPE_ALLM_GAME_MODE)
{
mAllmGameMode = 0; //0: game mode off; 1: game mode on
}
~AllmGameModeCb() {}
int mAllmGameMode;
};
class FilmMakerModeCb: public CPQControlCb {
public:
FilmMakerModeCb() : CPQControlCb(CPQControlCb::PQ_CB_TYPE_FILM_MAKER_MODE)
{
mFilmMakerMode = 0; //0: filmmaker off; 1: filmmaker on
}
~FilmMakerModeCb() {}
int mFilmMakerMode;
};
class RefreshRateCb: public CPQControlCb {
public:
RefreshRateCb() : CPQControlCb(CPQControlCb::PQ_CB_TYPE_REFRESH_RATE)
{
mRefreshRate = 60; //60hz
}
~RefreshRateCb() {}
int mRefreshRate;
};
class PqModeChangedCb: public CPQControlCb {
public:
PqModeChangedCb() : CPQControlCb(CPQControlCb::PQ_CB_TYPE_PQ_MODE_AUTO_CHANGED)
{
memset(&pq_mode_info, 0, sizeof(cb_pq_mode_changed_t));
}
~PqModeChangedCb() {}
typedef struct cb_pq_mode_changed_s {
int pq_mode;
int hdr_type;
int input_src;
bool low_latency;
} cb_pq_mode_changed_t;
cb_pq_mode_changed_t pq_mode_info;
};
class PictureModeCb: public CPQControlCb {
public:
PictureModeCb() : CPQControlCb(CPQControlCb::PQ_CB_TYPE_PQ_MODE_MANUAL_CHANGED)
{
mPictureMode = 0; //PICTURE_MODE_STANDARD
}
~PictureModeCb() {}
int mPictureMode;
};
};
#ifdef __cplusplus
}
#endif
#endif