/**
 * @file hv_app_OsdConvert.c
 * @brief osd interface file.
 * @details Osd interfaces in every product.
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2024-11-27
 * @copyright Copyright(c),2022-8, Hiview Software. All rights reserved.
 * @par History:
 * <table>
 * <tr><th>Author                   <th>Date        <th>Change Description
 * <tr><td>HiView SoC Software Team <td>2024-11-27  <td>create
 * </table>
 */

#include "hv_comm_Assert.h"
#include "hv_comm_Log.h"

#include "hv_mw_OsdUserdata.h"
#include "hv_app_OsdConvert.h"

Status Hv_App_OsdBrightnessMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_BRIGHTNESS_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdContrastMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_CONTRAST_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdSharpnessMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_SHARPNESS_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdGammaMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_GAMMA_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdColorTempMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_COLOR_TEMP_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdRedGainMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_RED_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdGreenGainMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_GREEN_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdBlueGainMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_BLUE_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdVideoSourceMaxValGet(UINT32 *puiVal)
{
    *puiVal = E_USERDATA_VIDEO_SOURCE;
    return HV_SUCCESS;
}

Status Hv_App_OsdAudioVolumeMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_VOLUME_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdLanguageMaxValGet(UINT32 *puiVal)
{
    *puiVal = USERDATA_LANGUAGE_MAX;
    return HV_SUCCESS;
}

Status Hv_App_OsdBrightnessValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_BRIGHTNESS, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdContrastValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_CONTRAST, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdSharpnessValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_SHARPNESS, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdGammaValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_GAMMA, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdColorTempValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_COLOR_TEMP, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdRedGainValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_RED, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdGreenGainValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_GREEN, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdBlueGainValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_BLUE, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdVideoSourceValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_VIDEO_SOURCE, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdAudioVolumeValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_VOLUME, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED);
    return HV_SUCCESS;
}

Status Hv_App_OsdLanguageValSet(UINT32 uiVal)
{
    Hv_Mw_OsdAdjustFunction(E_USERDATA_LANGUAGE, ACT_SET, uiVal, SET_OSDDATA | SET_INTERFACE | SET_RELATED | SET_FORCE);
    return HV_SUCCESS;
}

