GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS));
+ GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS ";"
+ GST_GL_COLOR_CONVERT_VIDEO_OVERLAY_COMPOSITION_CAPS));
static GstStaticPadTemplate gst_gl_color_convert_element_sink_pad_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS));
+ GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS ";"
+ GST_GL_COLOR_CONVERT_VIDEO_OVERLAY_COMPOSITION_CAPS));
static gboolean
gst_gl_color_convert_element_stop (GstBaseTransform * bt)
gboolean handle_events);
static gboolean update_output_format (GstGLImageSink * glimage_sink);
+#define GST_GL_SINK_CAPS \
+ GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")
+
+#define GST_GL_SINK_OVERLAY_CAPS \
+ GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY "," \
+ GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, "RGBA")
+
static GstStaticPadTemplate gst_glimage_sink_template =
-GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
- (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
- "RGBA"))
- );
+ GST_STATIC_CAPS (GST_GL_SINK_CAPS ";" GST_GL_SINK_OVERLAY_CAPS));
enum
{
result = tmp;
}
+ result = gst_gl_overlay_compositor_add_caps (result);
+
GST_DEBUG_OBJECT (bsink, "returning caps: %" GST_PTR_FORMAT, result);
return result;
(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, GST_GL_COLOR_CONVERT_FORMATS));
caps = gst_gl_color_convert_caps_remove_format_info (caps);
+
result = gst_caps_intersect (caps, templ);
gst_caps_unref (caps);
gst_caps_unref (templ);
+ result = gst_gl_overlay_compositor_add_caps (result);
+
if (filter) {
GstCaps *tmp;
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, \
GST_GL_COLOR_CONVERT_FORMATS)
+#define GST_GL_COLOR_CONVERT_VIDEO_OVERLAY_COMPOSITION_CAPS \
+ GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY \
+ "," GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, \
+ GST_GL_COLOR_CONVERT_FORMATS)
+
GstGLColorConvert * gst_gl_color_convert_new (GstGLContext * context);
GstCaps * gst_gl_color_convert_transform_caps (GstGLContext * convert,
}
ret = gst_caps_simplify (ret);
-
+ ret = gst_gl_overlay_compositor_add_caps (ret);
g_mutex_unlock (&upload_global_lock);
return ret;
tmp = gst_caps_new_empty ();
for (i = 0; i < G_N_ELEMENTS (upload_methods); i++) {
- GstCaps *tmp2 =
- upload_methods[i]->transform_caps (context, direction, caps);
+ GstCaps *tmp2;
+
+ tmp2 = upload_methods[i]->transform_caps (context, direction, caps);
if (tmp2)
tmp = gst_caps_merge (tmp, tmp2);
}
+ tmp = gst_gl_overlay_compositor_add_caps (tmp);
+
if (filter) {
result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (tmp);