SFML community forums
General => SFML wiki => Topic started by: Xorlium on August 25, 2010, 09:25:00 pm
-
Hello everyone,
I just posted an object oriented wrapper for ffmpeg and avcodec using SFML on the wiki. Check it out: http://www.sfml-dev.org/wiki/en/sources/video_integration
Comments, suggestions and criticism are very welcome. Specially about code quality. I'm just learning programming. So if I did anything wrong, let me know.
Edit: Version 1.01 now posted. Fixed the choppy-video bug.
Edit: Version 1.02 now posted. Fixed a terrible memory leak.
Also, if you are using SFML 1.6 or earlier, you should replace UpdatePixels by LoadFromPixels in UpdateImage.
-
Suggestion. If you use PIX_FMT_RGBA in sws_getContext (and other parts) you can avoid the copy in UpdateImage.
-
Thanks ronag!
I've updated the wiki page, and the performance is better now!
Although my Video class has been kind of superseeded by Celyo's project, since that project has audio, I still find mine more useful in my project because it doesn't contain the sprite within, so you can have many sprites having the same video and all of them will work without copies.