[gst-devel] Conversion to ARGB32

Jan Schmidt thaytan at noraisin.net
Tue Apr 11 01:17:02 CEST 2006


On Tue, 2006-04-11 at 08:23 +0200, Zack Rusin wrote:
> Hey,
> 
> I've just been toying around with playing some transformed movies on a 
> custom canvas and I need each frame in ARGB32. I'm trying to use 
> capsfilter along ffmpegcolorspace to make sure that in my handoff 
> callback I'm actually getting the right format. 
> 
> The problem is that the code I have in the callback 
> for "new-decoded-pad" for it is freezing the pipeline (handoff callback 
> is never called). To be more specific setting the caps on the 
> capsfilter seems to cause it. If I avoid the g_object_set call the 
> handoff callback is called fine (but of course with yuv data which 
> doesn't work for me).
> 
> The attached minimal snippet (email always mangles code so that's why 
> the attachment) shows what I basically do in the "new-decoded-pad" 
> handler. I'm sure it's something silly but I don't see what it could be 
> be so I'd really appreciate some insight here. The line marked with 
> FIXME looks to be the culprit. 
> 

Your problem is that you're asking ffmpegcolorspace to add an alpha
channel, which it won't do. It will transform from one colorspace that
has an alpha channel to a different one, but it won't add a random alpha
channel to an existing video - you need the 'alpha' element for that.
But - since this indicates that your incoming video doesn't have an
alpha channel anyway, you could also just ask ffmpegcolorspace to
convert to 24bpp,32depth, which is RGB packed into 4 bytes, but the
alpha channel will be random.

Regards,
Jan.

-- 
Jan Schmidt thaytan at noraisin.net

<vickster> we are going to watch red dwarf. i am so excited and tired.






More information about the gstreamer-devel mailing list