跳转至
本 SDK 仅适用于过去 3 年内发布的设备。我们定期优化和更新 SDK，以确保兼容性和性能。对于超过 3 年的旧设备，我们不保证兼容性，也不会提供技术支持。

# DISPLAY_PORT

### 结构体定义

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    typedef struct _display_port
    {
        unsigned short index;
        unsigned short zOrder;
        unsigned short xPos;
        unsigned short yPos;
        unsigned short cx;
        unsigned short cy;
        unsigned short channel;
        unsigned short streamType;
        unsigned int deviceID;
        unsigned int liveHandle;
        DRAW_FUN_CALLBACK drawCallBackFunc;
        void* cbParam;
    } DISPLAY_PORT;

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct DISPLAY_PORT
    {
        public UInt16 index;
        public UInt16 zOrder;
        public UInt16 xPos;
        public UInt16 yPos;
        public UInt16 cx;
        public UInt16 cy;
        public UInt16 channel;
        public UInt16 streamType;
        public UInt32 deviceID;
        public UInt32 liveHandle;
        public DRAW_FUN_CALLBACK drawCallBackFunc;
        public IntPtr cbParam;
    }

### 功能描述

显示参数。

### 成员说明

成员 | 类型 | 说明
--- | --- | ---
index | unsigned short | 区域编号。
zOrder | unsigned short | Z轴显示顺序`LAYOUT_LAYER`。
xPos | unsigned short | 左上角横坐标。
yPos | unsigned short | 左上角纵坐标。
cx | unsigned short | 显示区域宽度（像素）。
cy | unsigned short | 显示区域高度（像素）。
channel | unsigned short | 通道号，从0开始。
streamType | unsigned short | 参考`STREAM_TYPE`。
deviceID | unsigned int | 设备ID。
liveHandle | unsigned int | 预览句柄，`NET_SDK_LivePlay`或`NET_SDK_LivePlayEx`的返回值。
drawCallBackFunc | `DRAW_FUN_CALLBACK` | 预览绘制回调。
cbParam | void* | 回调参数。

错误码