static void gst_video_filter2_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); int i; GstCaps *caps = NULL; caps = gst_caps_new_empty (); for (i = GST_VIDEO_FORMAT_I420; i <= GST_VIDEO_FORMAT_I420; i++) { gst_caps_append (caps, gst_video_format_new_template_caps (i)); } gst_element_class_add_pad_template (element_class, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_ref (caps))); gst_element_class_add_pad_template (element_class, gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps)); }
gint gst_egl_adaptation_fill_supported_fbuffer_configs (GstEglAdaptationContext * ctx, GstCaps ** ret_caps) { gboolean ret = FALSE; GstCaps *caps; GST_DEBUG_OBJECT (ctx->element, "Building initial list of wanted eglattribs per format"); /* Init supported format/caps list */ caps = gst_caps_new_empty (); if (gst_egl_choose_config (ctx, TRUE, NULL)) { gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_RGBA)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_BGRA)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_ARGB)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_ABGR)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_RGBx)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_BGRx)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_xRGB)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_xBGR)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_AYUV)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_Y444)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_I420)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_YV12)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_NV12)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_NV21)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_YUY2)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_YVYU)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_UYVY)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_Y42B)); gst_caps_append (caps, gst_video_format_new_template_caps (GST_VIDEO_FORMAT_Y41B)); ret = TRUE; } else { GST_INFO_OBJECT (ctx->element, "EGL display doesn't support RGBA8888 config"); } GST_OBJECT_LOCK (ctx->element); gst_caps_replace (ret_caps, caps); GST_OBJECT_UNLOCK (ctx->element); gst_caps_unref (caps); return ret; }