跳转到内容

结构描述

结构描述

PrGPUFilterInfo

此结构包含有关GPU滤镜的一些基本信息。它提供了对各种套件的访问权限,以及对私有数据的访问权限,实例可以在其中分配内存并存储数据,这些数据将传递给后续函数。

typedef struct {
csSDK_uint32 outInterfaceVersion;
PrSDKString outMatchName;
} PrGPUFilterInfo;
成员描述
outInterfaceVersion设置为与您使用的SDK中定义的版本相对应的GPU API版本。
outMatchNameoutMatchName必须等于已注册的软件滤镜,如果为NULL,则默认为模块的PiPL。

PrGPUFilterInstance

此结构包含有关GPU滤镜的一些基本信息。它提供了对各种套件的访问权限,以及对私有数据的访问权限,实例可以在其中分配内存并存储数据,这些数据将传递给后续函数。

typedef struct {
piSuitesPtr piSuites;
csSDK_uint32 inDeviceIndex;
PrTimelineID inTimelineID;
csSDK_int32 inNodeID;
void* ioPrivatePluginData;
prBool outIsRealtime;
} PrGPUFilterInstance;
成员描述
piSuites标准套件。
inDeviceIndex用于PrSDKGPUDeviceSuite
inTimelineID用于PrSDKVideoSegmentSuite
inNodeID用于PrSDKVideoSegmentSuite
ioPrivatePluginData插件用于存储实例数据,主机从不触碰。
outIsRealtime指定插件是否可能实时播放,用于确定片段在时间轴中是红色、黄色还是未标记。

PrGPUFilterRenderParams

此结构描述了当前的渲染请求。

typedef struct {
PrTime inClipTime;
PrTime inSequenceTime;
// 渲染属性
PrRenderQuality inQuality;
float inDownsampleFactorX;
float inDownsampleFactorY;
// 帧属性
csSDK_uint32 inRenderWidth;
csSDK_uint32 inRenderHeight;
csSDK_uint32 inRenderPARNum;
csSDK_uint32 inRenderPARDen;
prFieldType inRenderFieldType;
PrTime inRenderTicksPerFrame;
pmFieldDisplay inRenderField;
} PrGPUFilterRenderParams;
成员描述
inClipTime当前渲染的时间,相对于剪辑开始时间
inSequenceTime当前渲染的时间,相对于序列开始时间
inQuality渲染质量;PrRenderQuality枚举值之一
inDownsampleFactorX水平下采样因子
inDownsampleFactorY垂直下采样因子
inRenderWidth视频分辨率
inRenderHeight
inRenderPARNum视频像素宽高比,描述为分子和分母分开的分数形式。
inRenderPARDen
inRenderFieldType渲染场类型
inRenderTicksPerFrame视频帧率
inRenderFieldGPU渲染始终在全高逐行帧上进行,除非PrGPUFilterFrameDependency.outNeedsFieldSeparationfalse
inRenderField指示正在渲染的场。

PrGPUFilterFrameDependency

此结构描述了渲染帧的任何依赖关系。

typedef struct {
PrGPUFilterFrameDependencyType outDependencyType;
// 对其他帧时间的依赖
csSDK_int32 outTrackID;
PrTime outSequenceTime;
// 对预计算阶段的依赖
PrPixelFormat outPrecomputePixelFormat;
csSDK_uint32 outPrecomputeFrameWidth;
csSDK_uint32 outPrecomputeFrameHeight;
csSDK_uint32 outPrecomputeFramePARNumerator;
csSDK_uint32 outPrecomputeFramePARDenominator;
prFieldType outPrecomputeFrameFieldType;
csSDK_size_t outPrecomputeCustomDataSize;
prBool outNeedsFieldSeparation;
} PrGPUFilterFrameDependency;
成员描述
outDependencyType依赖类型。其中之一:
- PrGPUDependency_InputFrame
- PrGPUDependency_Precompute
- PrGPUDependency_FieldSeparation
outTrackID指定哪个轨道是依赖项。设置为0表示当前轨道
outSequenceTime设置作为依赖项的序列时间。
outPrecomputePixelFormat对预计算阶段的依赖
outPrecomputeFrameWidth
outPrecomputeFrameHeight
outPrecomputeFramePARNumerator
outPrecomputeFramePARDenominator
outPrecomputeFrameFieldType
outPrecomputeCustomDataSize仅在outPrecomputePixelFormat为自定义时需设置
outNeedsFieldSeparation指示插件可能同时操作两个场(例如非空间和非时间变化)