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

# DD_ENCODE_CONFIG_EX

### 结构体定义

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    typedef struct _dd_encode_config_ex_
    {
        unsigned int iSize;
        unsigned int resolution;
        unsigned short rate;
        unsigned short encodeType;
        unsigned short quality;
        unsigned short minBitrate;
        unsigned short maxBitrate;
        unsigned short bitrate;
        unsigned short encodeFormat;
        unsigned short gop;
        unsigned short minGop;
        unsigned short maxGop;
        char recv[8];
    } DD_ENCODE_CONFIG_EX;

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct DD_ENCODE_CONFIG_EX
    {
        public UInt32 iSize;
        public UInt32 resolution;
        public UInt16 rate;
        public UInt16 encodeType;
        public UInt16 quality;
        public UInt16 minBitrate;
        public UInt16 maxBitrate;
        public UInt16 bitrate;
        public UInt16 encodeFormat;
        public UInt16 gop;
        public UInt16 minGop;
        public UInt16 maxGop;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 8)]
        public byte[] recv;
    }

### 功能描述

视频编码配置扩展结构体。

### 成员说明

成员 | 类型 | 说明
--- | --- | ---
iSize | unsigned int | 本结构体长度。
resolution | unsigned int | 分辨率，取值参考`DD_VIDEO_SIZE`。
rate | unsigned short | 帧率。
encodeType | unsigned short | 编码类型，取值参考`DD_VIDEO_ENCODE_MODE`。
quality | unsigned short | 画质，取值参考`DD_IMAGE_QUALITY`。
minBitrate | unsigned short | 码流下限，单位为kbps。
maxBitrate | unsigned short | 码流上限，单位为kbps。
bitrate | unsigned short | 码率。
encodeFormat | unsigned short | 编码264或265，参考`DD_VIDEO_ENCODE_FORMAT`。
gop | unsigned short | I帧间隔。
minGop | unsigned short | I帧间隔最小值。
maxGop | unsigned short | I帧间隔最大值。
recv | char[8] | 保留字节。

错误码