mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/videobox/gstvideobox.c: Logic was reversed. Needs some more fixes in the transform function to include AYUV output.
Original commit message from CVS: * gst/videobox/gstvideobox.c: (gst_video_box_init), (gst_video_box_transform_caps), (gst_video_box_set_caps): Logic was reversed. Needs some more fixes in the transform function to include AYUV output. Moved AYUV as prefered format.
This commit is contained in:
parent
1970ac0fc7
commit
48eb68a1d9
2 changed files with 19 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2005-07-07 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/videobox/gstvideobox.c: (gst_video_box_init),
|
||||
(gst_video_box_transform_caps), (gst_video_box_set_caps):
|
||||
Logic was reversed. Needs some more fixes in the transform
|
||||
function to include AYUV output.
|
||||
Moved AYUV as prefered format.
|
||||
|
||||
2005-07-07 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -106,7 +106,7 @@ static GstStaticPadTemplate gst_video_box_src_template =
|
|||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, AYUV }"))
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ AYUV, I420 }"))
|
||||
);
|
||||
|
||||
static GstStaticPadTemplate gst_video_box_sink_template =
|
||||
|
@ -218,12 +218,15 @@ gst_video_box_init (GstVideoBox * video_box)
|
|||
video_box->box_left = DEFAULT_LEFT;
|
||||
video_box->box_top = DEFAULT_TOP;
|
||||
video_box->box_bottom = DEFAULT_BOTTOM;
|
||||
video_box->crop_right = 0;
|
||||
video_box->crop_left = 0;
|
||||
video_box->crop_top = 0;
|
||||
video_box->crop_bottom = 0;
|
||||
video_box->fill_type = DEFAULT_FILL_TYPE;
|
||||
video_box->alpha = DEFAULT_ALPHA;
|
||||
video_box->border_alpha = DEFAULT_BORDER_ALPHA;
|
||||
}
|
||||
|
||||
/* do we need this function? */
|
||||
static void
|
||||
gst_video_box_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
|
@ -330,8 +333,9 @@ gst_video_box_transform_caps (GstBaseTransform * trans, GstPad * pad,
|
|||
|
||||
video_box = GST_VIDEO_BOX (trans);
|
||||
to = gst_caps_copy (from);
|
||||
direction = (pad == trans->sinkpad) ? 1 : -1;
|
||||
direction = (pad == trans->sinkpad) ? -1 : 1;
|
||||
|
||||
/* FIXME, include AYUV */
|
||||
for (i = 0; i < gst_caps_get_size (to); i++) {
|
||||
structure = gst_caps_get_structure (to, i);
|
||||
if (gst_structure_get_int (structure, "width", &tmp))
|
||||
|
@ -351,6 +355,7 @@ gst_video_box_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
|
|||
GstVideoBox *video_box;
|
||||
GstStructure *structure;
|
||||
gboolean ret;
|
||||
guint32 fourcc = 0;
|
||||
|
||||
video_box = GST_VIDEO_BOX (trans);
|
||||
|
||||
|
@ -361,6 +366,9 @@ gst_video_box_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
|
|||
structure = gst_caps_get_structure (out, 0);
|
||||
ret &= gst_structure_get_int (structure, "width", &video_box->out_width);
|
||||
ret &= gst_structure_get_int (structure, "height", &video_box->out_height);
|
||||
ret &= gst_structure_get_fourcc (structure, "format", &fourcc);
|
||||
|
||||
video_box->use_alpha = fourcc == GST_STR_FOURCC ("AYUV");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue