<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [gst-devel] How to Set Buffer Size Within Plugin</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Tracing the pipeline debug messages (noted below) showed that during the first fixate_caps() call, the input/output video sizes have been fixated already.<BR>
Before that in the transform_caps() calls, the video sizes range [1, 32767], until the output video size is fixated into the input video size 320x240 & then fixate_caps() is called.<BR>
I couldn't know the input video size, before the output video size has been set by the pipeline application.<BR>
<BR>
Using GstBaseTransform, the two functions called before setcap() are:<BR>
<BR>
1) trans_class->transform_caps = GST_DEBUG_FUNCPTR (gst_mosaick_transform_caps);<BR>
2) trans_class->fixate_caps = GST_DEBUG_FUNCPTR (gst_mosaick_fixate_caps);<BR>
<BR>
<BR>
=====<BR>
...<BR>
gst_mosaick_transform_caps,direction=1<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/<BR>
1, 2147483647/1 ]<BR>
gst_mosaick_transform_caps,direction=1<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/<BR>
1, 2147483647/1 ]<BR>
0:00:01.046875000 888 02133EC0 WARN basetransform gstbasetransform.c:1075:gst_base_transform_acceptcaps_default:<mosaick0> transform could not transform 02137920 in anything we support<BR>
gst_mosaick_transform_caps,direction=1<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/<BR>
1, 2147483647/1 ]<BR>
gst_mosaick_transform_caps,direction=1<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/<BR>
1, 2147483647/1 ]<BR>
gst_mosaick_transform_caps,direction=1<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/<BR>
1, 2147483647/1 ]<BR>
gst_mosaick_transform_caps,direction=1<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/<BR>
1, 2147483647/1 ]<BR>
gst_mosaick_transform_caps,direction=2<BR>
caps=video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)320, height=(int)240, framerate=(fraction)15/1<BR>
gst_mosaick_fixate_caps<BR>
GST_PAD_SINK 2<BR>
dimensions already set to 320x240, not fixating<BR>
0:00:01.078125000 888 02133EC0 INFO GST_PERFORMANCE imgconvert.c:3367:img_convert: no direct path to convert colorspace from bgr24 -> bgrx32<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Tim-Philipp Müller [<A HREF="mailto:t.i.m@zen.co.uk">mailto:t.i.m@zen.co.uk</A>]<BR>
Sent: Fri 10/15/2010 4:09 PM<BR>
To: gstreamer-devel@lists.sourceforge.net<BR>
Subject: Re: [gst-devel] How to Set Buffer Size Within Plugin<BR>
<BR>
On Fri, 2010-10-15 at 15:51 -0400, Greg Wunder wrote:<BR>
<BR>
> Following up with one more question:<BR>
><BR>
> Let be more specific, on the set_cap function:<BR>
> The trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_mosaick_set_caps);<BR>
<BR>
Ah, so your element is based on GstBaseTransform/GstVideoFilter - that's<BR>
useful to know.<BR>
<BR>
<BR>
> static gboolean<BR>
> gst_mosaick_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps<BR>
> * out)<BR>
> {<BR>
> GstMosaick *mosaick = GST_MOSAICK (trans);<BR>
> gboolean ret;<BR>
><BR>
> ret = gst_video_format_parse_caps (in, &mosaick->format,<BR>
> &mosaick->from_width, &mosaick->from_height);<BR>
> ret &= gst_video_format_parse_caps (out, NULL, &mosaick->to_width,<BR>
> &mosaick->to_height);<BR>
><BR>
> ...<BR>
> }<BR>
><BR>
> In the above function I can get the input video size, but the output<BR>
> is also being fixed.<BR>
> Where could you to change the output video size?<BR>
<BR>
Maybe you're looking for the transform_caps virtual method?<BR>
<BR>
Cheers<BR>
-Tim<BR>
<BR>
<BR>
<BR>
<BR>
------------------------------------------------------------------------------<BR>
Download new Adobe(R) Flash(R) Builder(TM) 4<BR>
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly<BR>
Flex(R) Builder(TM)) enable the development of rich applications that run<BR>
across multiple browsers and platforms. Download your free trials today!<BR>
<A HREF="http://p.sf.net/sfu/adobe-dev2dev">http://p.sf.net/sfu/adobe-dev2dev</A><BR>
_______________________________________________<BR>
gstreamer-devel mailing list<BR>
gstreamer-devel@lists.sourceforge.net<BR>
<A HREF="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>