addOrUpdateVideoEffect
Adds or updates the video effect for the specified node ID and template.
virtual int addOrUpdateVideoEffect(uint32_t nodeId, const char* templateName) = 0;
- Since:
- Available since v4.6.0.
Attention: Priority rules:
- The
VIDEO_EFFECT_NODE_ID::STYLE_MAKEUP
node takes precedence over theVIDEO_EFFECT_NODE_ID::FILTER
parameter. - To apply the
VIDEO_EFFECT_NODE_ID::FILTER
parameter, you must first remove theVIDEO_EFFECT_NODE_ID::STYLE_MAKEUP
node:removeVideoEffect(VIDEO_EFFECT_NODE_ID::STYLE_MAKEUP); addOrUpdateVideoEffect(VIDEO_EFFECT_NODE_ID::FILTER, "template name");
Restrictions
None.
Parameters
- nodeId
- The unique identifier or combination of identifiers for the video effect node. See VIDEO_EFFECT_NODE_ID.
Examples:
- Single effect:
VIDEO_EFFECT_NODE_ID::BEAUTY
- Combined effects:
VIDEO_EFFECT_NODE_ID::BEAUTY | VIDEO_EFFECT_NODE_ID::STYLE_MAKEUP
- Single effect:
- templateName
- The name of the effect template. If set to null or an empty string, the SDK loads the default configuration from the resource package.
Returns
- 0: Success.
- < 0: Failure.