Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Sources] Video Integration with ffmpeg (Updated: 1.03)  (Read 7259 times)

0 Members and 1 Guest are viewing this topic.

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
[Sources] Video Integration with ffmpeg (Updated: 1.03)
« 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.

ronag

  • Newbie
  • *
  • Posts: 24
    • View Profile
[Sources] Video Integration with ffmpeg (Updated: 1.03)
« Reply #1 on: November 02, 2010, 12:05:44 am »
Suggestion. If you use PIX_FMT_RGBA in sws_getContext (and other parts)  you can avoid the copy in UpdateImage.

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
[Sources] Video Integration with ffmpeg (Updated: 1.03)
« Reply #2 on: November 02, 2010, 07:24:32 am »
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.