gst/videoscale/gstvideoscale.c (gst_videoscale_get_size): gst/ffmpegcolorspace/gstffmpegcolorspace.c

Original commit message from CVS:
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.
This commit is contained in:
Andy Wingo 2005-08-04 19:52:32 +00:00
parent 993a705188
commit 7d10d86635
5 changed files with 43 additions and 13 deletions

View file

@ -1,3 +1,12 @@
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),

View file

@ -23,6 +23,15 @@ interface for elements that provide color balance operations
</para>
<!-- ##### SIGNAL GstColorBalance::value-changed ##### -->
<para>
</para>
@gstcolorbalance: the object which received the signal.
@arg1:
@arg2:
<!-- ##### STRUCT GstColorBalanceClass ##### -->
<para>

View file

@ -48,18 +48,12 @@ gstmixer
</para>
@parent:
@values:
@_gst_reserved:
<!-- ##### STRUCT GstMixerTrack ##### -->
<para>
</para>
@parent:
@label:
@flags:
<!-- ##### FUNCTION gst_mixer_list_tracks ##### -->
<para>

View file

@ -91,7 +91,7 @@ static void gst_ffmpegcsp_init (GstFFMpegCsp * space);
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
@ -311,13 +311,17 @@ gst_ffmpegcsp_init (GstFFMpegCsp * space)
}
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;
}

View file

@ -149,7 +149,9 @@ static GstCaps *gst_videoscale_transform_caps (GstBaseTransform * trans,
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);
@ -218,6 +220,7 @@ gst_videoscale_class_init (GstVideoscaleClass * klass)
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);
@ -421,15 +424,20 @@ gst_videoscale_prepare_sizes (GstVideoscale * videoscale, VSImage * src,
}
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
@ -462,6 +470,12 @@ gst_videoscale_prepare_images (GstVideoscale * videoscale, GstBuffer * in,
}
}
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)