Files
BPI-CM9-Linux/aml-comp/multimedia/libvideorender/tools/meson_display_wrap.h
T
2026-08-24 10:03:24 +08:00

53 lines
1.9 KiB
C

/*
* Copyright (C) 2025 Amlogic Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __MESON_DISPLAY_WRAP_H__
#define __MESON_DISPLAY_WRAP_H__
#include <stdint.h>
#define MESON_DISPLAY_MODE_LEN 32
typedef enum _ENUM_DISPLAY_CONNECTOR_TYPE {
DISPLAY_CONNECTOR_HDMIA = 0,
DISPLAY_CONNECTOR_HDMIB,
DISPLAY_CONNECTOR_LVDS,
DISPLAY_CONNECTOR_CVBS,
DISPLAY_CONNECTOR_DUMMY,
DISPLAY_CONNECTOR_RESERVED
} DISPLAY_CONNECTOR_TYPE;
typedef struct _DisplayModeInfo {
uint16_t w; //<--Number of horizontal pixels in the effective display area-->//
uint16_t h; //<--Number of vertical pixels in the effective display area-->//
uint32_t vrefresh; //<--Display refresh rate--->//
bool interlace; //<--Indicates which scanning form to choose, P represents progressive scanning,-->//
//<--and i represents interlaced scanning;The default interlace value is 0 for P 1 for i-->//
char name[MESON_DISPLAY_MODE_LEN];
} DisplayModeInfo;
typedef int (*_getDisplayMode)(DisplayModeInfo* modeInfo, DISPLAY_CONNECTOR_TYPE connType);
typedef struct {
void *libHandle; //meson display lib handle of dlopen
_getDisplayMode getDisplayMode;
} mesonDisplayLib;
mesonDisplayLib * mesonDisplayLoadLib(int logCategory);
int mesonDisplayUnLoadLib(int logCategory, mesonDisplayLib *handle);
#endif /*__MESON_DISPLAY_WRAP_H__*/