+2005-08-04 Andy Wingo <wingo@pobox.com>
+
+ * gst/videoscale/gstvideoscale.c (gst_videoscale_get_size):
+ * gst/ffmpegcolorspace/gstffmpegcolorspace.c
+ (gst_ffmpegcsp_get_size): Adapt to API changes.
+
+ * gst/videoscale/gstvideoscale.c (gst_videoscale_transform_ip):
+ Implement an in-place do-nothing transform.
+
2005-08-04 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* sys/ximage/ximagesink.c: (gst_ximagesink_ximage_put),
</para>
+<!-- ##### SIGNAL GstColorBalance::value-changed ##### -->
+<para>
+
+</para>
+
+@gstcolorbalance: the object which received the signal.
+@arg1:
+@arg2:
+
<!-- ##### STRUCT GstColorBalanceClass ##### -->
<para>
</para>
-@parent:
-@values:
-@_gst_reserved:
<!-- ##### STRUCT GstMixerTrack ##### -->
<para>
</para>
-@parent:
-@label:
-@flags:
<!-- ##### FUNCTION gst_mixer_list_tracks ##### -->
<para>
static gboolean gst_ffmpegcsp_set_caps (GstBaseTransform * btrans,
GstCaps * incaps, GstCaps * outcaps);
-static guint gst_ffmpegcsp_get_size (GstBaseTransform * btrans);
+static guint gst_ffmpegcsp_get_size (GstBaseTransform * btrans, GstCaps * caps);
static GstFlowReturn gst_ffmpegcsp_transform
(GstBaseTransform * btrans, GstBuffer * inbuf, GstBuffer * outbuf);
static GstFlowReturn gst_ffmpegcsp_transform_ip
}
static guint
-gst_ffmpegcsp_get_size (GstBaseTransform * btrans)
+gst_ffmpegcsp_get_size (GstBaseTransform * btrans, GstCaps * caps)
{
GstFFMpegCsp *space;
- guint size;
+ guint size = -1;
space = GST_FFMPEGCSP (btrans);
- size = avpicture_get_size (space->to_pixfmt, space->width, space->height);
+ if (gst_caps_is_equal (caps, GST_PAD_CAPS (btrans->srcpad))) {
+ size = avpicture_get_size (space->to_pixfmt, space->width, space->height);
+ } else if (gst_caps_is_equal (caps, GST_PAD_CAPS (btrans->sinkpad))) {
+ size = avpicture_get_size (space->from_pixfmt, space->width, space->height);
+ }
return size;
}
GstPad * pad, GstCaps * caps);
static gboolean gst_videoscale_set_caps (GstBaseTransform * trans,
GstCaps * in, GstCaps * out);
-static guint gst_videoscale_get_size (GstBaseTransform * trans);
+static guint gst_videoscale_get_size (GstBaseTransform * trans, GstCaps * caps);
+static GstFlowReturn gst_videoscale_transform_ip (GstBaseTransform * trans,
+ GstBuffer * in);
static GstFlowReturn gst_videoscale_transform (GstBaseTransform * trans,
GstBuffer * in, GstBuffer * out);
trans_class->transform_caps = gst_videoscale_transform_caps;
trans_class->set_caps = gst_videoscale_set_caps;
trans_class->get_size = gst_videoscale_get_size;
+ trans_class->transform_ip = gst_videoscale_transform_ip;
trans_class->transform = gst_videoscale_transform;
parent_class = g_type_class_peek_parent (klass);
}
static guint
-gst_videoscale_get_size (GstBaseTransform * trans)
+gst_videoscale_get_size (GstBaseTransform * trans, GstCaps * caps)
{
GstVideoscale *videoscale;
VSImage dest;
VSImage src;
+ guint size = -1;
videoscale = GST_VIDEOSCALE (trans);
- return (guint) gst_videoscale_prepare_sizes (videoscale, &src, &dest, TRUE);
+ if (gst_caps_is_equal (caps, GST_PAD_CAPS (trans->srcpad)))
+ size = gst_videoscale_prepare_sizes (videoscale, &src, &dest, TRUE);
+ /* don't have an easy way of getting the size on the sink side for now... */
+
+ return size;
}
static void
}
}
+static GstFlowReturn
+gst_videoscale_transform_ip (GstBaseTransform * trans, GstBuffer * in)
+{
+ return GST_FLOW_OK;
+}
+
static GstFlowReturn
gst_videoscale_transform (GstBaseTransform * trans, GstBuffer * in,
GstBuffer * out)