Advertisement
wellthatsucks

Untitled

Sep 19th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. @Sebastian Dröge this gets me similar output to the crossfade-ratio on compositor when changing the alpha properties in an inverse relationship. You need to ensure ensure the background is either black or transparent otherwise the background color will blend into the output.
  2. g_object_set (red_comp_pad, "alpha", 0.0, "zorder", 1,
  3. "blend-function-src-rgb", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_SRC_ALPHA,
  4. "blend-function-src-alpha", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_ONE,
  5. "blend-function-dst-rgb", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_ONE_MINUS_SRC_ALPHA,
  6. "blend-function-dst-alpha", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_ONE, NULL);
  7. g_object_set (green_comp_pad, "alpha", 1.0, "zorder", 0,
  8. "blend-function-src-rgb", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_SRC_ALPHA,
  9. "blend-function-src-alpha", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_ONE,
  10. "blend-function-dst-rgb", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_ONE_MINUS_SRC_ALPHA,
  11. "blend-function-dst-alpha", GST_GL_VIDEO_MIXER_BLEND_FUNCTION_ONE, NULL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement