PROP_SATURATION
};
+#define PROCESSING_CAPS \
+ "{ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, " \
+ "xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, " \
+ "I420, YV12, IYUV, Y41B, NV12, NV21 }"
+
static GstStaticPadTemplate gst_video_balance_src_template =
-GST_STATIC_PAD_TEMPLATE ("src",
+ GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES ("ANY", "{ AYUV, "
- "ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, "
- "xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, "
- "I420, YV12, IYUV, Y41B, NV12, NV21 }"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS) ";"
+ "video/x-raw(ANY)")
);
static GstStaticPadTemplate gst_video_balance_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 ("ANY", "{ AYUV, "
- "ARGB, BGRA, ABGR, RGBA, Y444, xRGB, RGBx, "
- "xBGR, BGRx, RGB, BGR, Y42B, YUY2, UYVY, YVYU, "
- "I420, YV12, IYUV, Y41B, NV12, NV21 }"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS) ";"
+ "video/x-raw(ANY)")
);
static void gst_video_balance_colorbalance_init (GstColorBalanceInterface *
videobalance->process = gst_video_balance_packed_rgb;
break;
default:
- goto unknown_format;
+ if (!gst_video_balance_is_passthrough (videobalance))
+ goto unknown_format;
break;
}
GstCaps *ret;
if (!gst_video_balance_is_passthrough (balance)) {
- static GstStaticCaps raw_caps = GST_STATIC_CAPS ("video/x-raw");
+ static GstStaticCaps raw_caps =
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS));
+ GstCaps *tmp = gst_static_caps_get (&raw_caps);
- caps = gst_caps_intersect (caps, gst_static_caps_get (&raw_caps));
+ caps = gst_caps_intersect (caps, tmp);
+ gst_caps_unref (tmp);
if (filter) {
ret = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
"Adjusts brightness, contrast, hue, saturation on a video stream",
"David Schleef <ds@schleef.org>");
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_video_balance_sink_template));
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_video_balance_src_template));
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_video_balance_sink_template);
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_video_balance_src_template);
trans_class->before_transform =
GST_DEBUG_FUNCPTR (gst_video_balance_before_transform);