enable more; update for basetransform

Original commit message from CVS:
enable more; update for basetransform
This commit is contained in:
Thomas Vander Stichele 2005-08-24 13:34:05 +00:00
parent 05f75a3c66
commit 122cdbe814
4 changed files with 31 additions and 19 deletions

View file

@ -1,3 +1,12 @@
2005-08-24 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
* ext/Makefile.am:
lame and mpegaudioparse seem to work
* gst/videobox/gstvideobox.c: (gst_video_box_class_init),
(gst_video_box_transform_caps), (gst_video_box_get_unit_size):
update for basetransform changes
2005-08-24 Jan Schmidt <thaytan@mad.scientist.com>
* gst/level/gstlevel.c: (gst_level_message_new):
GST_MESSAGE_SRC became a GObject

View file

@ -294,6 +294,7 @@ GST_PLUGINS_ALL="\
goom \
law \
level \
mpegaudioparse \
qtdemux \
realmedia \
rtp \

View file

@ -172,11 +172,11 @@ endif
LADSPA_DIR=
# endif
# if USE_LAME
# LAME_DIR=lame
# else
if USE_LAME
LAME_DIR=lame
else
LAME_DIR=
# endif
endif
# if USE_LCS
# LCS_DIR=lcs

View file

@ -126,10 +126,11 @@ static void gst_video_box_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GstCaps *gst_video_box_transform_caps (GstBaseTransform * trans,
GstPad * pad, GstCaps * from);
GstPadDirection direction, GstCaps * from);
static gboolean gst_video_box_set_caps (GstBaseTransform * trans,
GstCaps * in, GstCaps * out);
static guint gst_video_box_get_size (GstBaseTransform * trans, GstCaps * caps);
static gboolean gst_video_box_get_unit_size (GstBaseTransform * trans,
GstCaps * caps, guint * size);
static GstFlowReturn gst_video_box_transform (GstBaseTransform * trans,
GstBuffer * in, GstBuffer * out);
@ -209,7 +210,7 @@ gst_video_box_class_init (GstVideoBoxClass * klass)
trans_class->transform_caps = gst_video_box_transform_caps;
trans_class->set_caps = gst_video_box_set_caps;
trans_class->get_size = gst_video_box_get_size;
trans_class->get_unit_size = gst_video_box_get_unit_size;
trans_class->transform = gst_video_box_transform;
}
@ -325,17 +326,17 @@ gst_video_box_get_property (GObject * object, guint prop_id, GValue * value,
}
static GstCaps *
gst_video_box_transform_caps (GstBaseTransform * trans, GstPad * pad,
GstCaps * from)
gst_video_box_transform_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * from)
{
GstVideoBox *video_box;
GstCaps *to;
GstStructure *structure;
gint direction, i, tmp;
gint dir, i, tmp;
video_box = GST_VIDEO_BOX (trans);
to = gst_caps_copy (from);
direction = (pad == trans->sinkpad) ? -1 : 1;
dir = (direction == GST_PAD_SINK) ? -1 : 1;
/* FIXME, include AYUV */
for (i = 0; i < gst_caps_get_size (to); i++) {
@ -390,25 +391,26 @@ gst_video_box_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
#define GST_VIDEO_I420_SIZE(w,h) (GST_VIDEO_I420_V_OFFSET(w,h)+(GST_VIDEO_I420_V_ROWSTRIDE(w)*ROUND_UP_2(h)/2))
static guint
gst_video_box_get_size (GstBaseTransform * trans, GstCaps * caps)
static gboolean
gst_video_box_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
guint * size)
{
guint size = -1;
GstVideoBox *video_box;
g_return_val_if_fail (size, FALSE);
video_box = GST_VIDEO_BOX (trans);
if (gst_caps_is_equal (caps, GST_PAD_CAPS (trans->sinkpad))) {
size = GST_VIDEO_I420_SIZE (video_box->in_width, video_box->in_height);
*size = GST_VIDEO_I420_SIZE (video_box->in_width, video_box->in_height);
} else if (gst_caps_is_equal (caps, GST_PAD_CAPS (trans->srcpad))) {
if (video_box->use_alpha) {
size = video_box->out_height * video_box->out_height * 4;
*size = video_box->out_height * video_box->out_height * 4;
} else {
size = GST_VIDEO_I420_SIZE (video_box->out_width, video_box->out_height);
*size = GST_VIDEO_I420_SIZE (video_box->out_width, video_box->out_height);
}
}
return size;
return TRUE;
}
static int yuv_colors_Y[] = { 16, 150, 29 };