as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持

VideoFormat

VideoFormat

名称

VideoFormat提供设置器来设置不同的属性,这些属性可用于查询满足所有设置属性的特定视频编解码器。

构造函数

new VideoFormat()

new VideoFormat(): VideoFormat

返回值

VideoFormat

访问器

colorFormat

获取签名

get colorFormat(): string

返回值

string

由设置器设置。

设置签名

set colorFormat(format): void

设置颜色格式。

此颜色格式与原始缓冲区相关联,这些缓冲区可用于解码器输出或编码器输入。编解码器支持标准和/或专有颜色格式,应用必须根据用例进行选择。

例如,如果视频解码器支持“FLEX_YCbCr_420_888/FLEX_YCbCr_420_101010”(即专有颜色格式),则当应用序无需读取缓冲区且仅需用于渲染显示屏时,该格式是视频解码的最佳选择。

参数
format

string

返回值

void


colorMatrix

获取签名

get colorMatrix(): VideoColorMatrix

返回值

VideoColorMatrix

由设置器设置

设置签名

set colorMatrix(matrix): void

设置颜色矩阵。

值取自ISO/IEC 23001-8:2016的表4

适用于解码器输入或编码器输出。

参数
matrix

VideoColorMatrix

返回值

void


colorPrimaries

获取签名

get colorPrimaries(): VideoColorPrimaries

返回值

VideoColorPrimaries

由设置器设置。

设置签名

set colorPrimaries(primaries): void

设置原色。

原色代表CIE 1931色度图上三角形的三个点(RGB原色),三角形内部的空间就是色域。

适用于解码器输入或编码器输出。

参数
primaries

VideoColorPrimaries

返回值

void


colorTransfer

获取签名

get colorTransfer(): VideoColorTransfer

返回值

VideoColorTransfer

由设置器设置。

设置签名

set colorTransfer(transferFn): void

设置颜色转换。

颜色转换特性将色域映射到屏幕信号

适用于解码器输入或编码器输出。

参数
transferFn

VideoColorTransfer

返回值

void


frameRate

获取签名

get frameRate(): number

返回值

number

使用设置器设置的帧速率值。

设置签名

set frameRate(rate): void

设置frameRate。

也可以调用此方法进行动态配置。

参数
rate

number

返回值

void


resolution

获取签名

get resolution(): Resolution

返回值

Resolution

由设置器设置。

设置签名

set resolution(resolution): void

设置分辨率。

建议在转换初始化期间提供最大分辨率,并在运行状态下编码期间为任何动态分辨率切换提供所需的分辨率。

也可以调用此方法进行动态配置。

参数
resolution

Resolution

返回值

void


Last updated: 2025年10月2日