Quantcast
Viewing all articles
Browse latest Browse all 40524

ofGStreamer problem with Alpha channel

Hello,
I am having problems trying to playing back some video files with an alpha using ofGStreamer.
The code I wrote works fine using the standard 0.9 ofVideoPlayer (video files playback with alpha correctly) but when using gstreamer the videos do not have an alpha.

Setting the pixel format to OF_PIXELS_RGBA or OF_PIXELS_BGRA doesnt seem to make a difference.

I need to use gstreamer for perfomance as the standard ofVideoPlayer is way too slow.

Code is roughly:
setup:

video_idle.setPixelFormat(OF_PIXELS_BGRA);
video_idle.load(filename);
video_idle.setLoopState(OF_LOOP_NORMAL);
video_idle.play();

draw:

ofEnableAlphaBlending();
ofSetColor(255,255,255,255);   // RGBA

if(!video_idle.isLoaded())
return;

video_idle.update();
video_idle.draw(origin.x, origin.y, width*scale, height*scale);

Thanks!


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>