2005-11-10 Thomas Vander Stichele <thomas at apestaart dot org>
+ * gst/ffmpegcolorspace/gstffmpegcolorspace.c:
+ (gst_ffmpegcsp_transform_caps):
+ Prefer passthrough in transform_caps
+
+2005-11-10 Thomas Vander Stichele <thomas at apestaart dot org>
+
* ext/alsa/gstalsasink.c: (gst_alsasink_open):
check for ALSA errors properly, instead of relying on ALSA's
error strings to serve to the user.
/*static guint gst_ffmpegcsp_signals[LAST_SIGNAL] = { 0 }; */
+/* copies the given caps */
static GstCaps *
gst_ffmpegcsp_caps_remove_format_info (GstCaps * caps)
{
return caps;
}
+/* The caps can be transformed into any other caps with format info removed.
+ * However, we should prefer passthrough, so if passthrough is possible,
+ * put it first in the list. */
static GstCaps *
gst_ffmpegcsp_transform_caps (GstBaseTransform * btrans,
GstPadDirection direction, GstCaps * caps)
{
GstFFMpegCsp *space;
+ GstCaps *template;
GstCaps *result;
space = GST_FFMPEGCSP (btrans);
- result = gst_ffmpegcsp_caps_remove_format_info (caps);
+ template = gst_ffmpegcsp_codectype_to_caps (CODEC_TYPE_VIDEO, NULL);
+ result = gst_caps_intersect (caps, template);
+ gst_caps_append (result, gst_ffmpegcsp_caps_remove_format_info (caps));
+
+ GST_DEBUG_OBJECT (btrans, "transformed %" GST_PTR_FORMAT " into %"
+ GST_PTR_FORMAT, caps, result);
return result;
}