Hello there,
I`ll be glad to share as most people here especially Laurent and Ceylo have been a great inspiration to me!
Here is what I did, kind of sketchy but you’ll get the idea.
• I got the Yalir-sfeMovie-1c7b4c4 source files from sfeMovie site.
• Removed anything related to ffmpeg you provided and replaced them by those binaries:
http://ffmpeg.zeranoe.com/builds/• Close Visual Studio 2010
• I used cmake-gui to create the project
• Open your solution and drag and drop all related libs directly in sfe-movie project (sfml and ffmpeg libs)
• In the solution property, change your output dir to some location and copy the dlls over there (sfml and ffmpeg dlls)
• You might have to add new lib and include folders to your project properties
• Build your sfeMovie solution
• Replace missing defines by AVMEDIA_TYPE_VIDEO and AVMEDIA_TYPE_AUDIO
• Build again
• Create an empty win32 project inside your solution, add the sfeMovie lib, main.cpp and movie.h to your new project
• Select your new project as the default project in the solution property and set sfeMovie as dependency, make sure you have a valid path for your movie (main.cpp), build and voila
That how I did it in a nutshell.
Now, I’ve been on this for a while and can’t handle HD movies so far, I was curious if Ceylo did managed to beat me to it so I inverse engineered is stuff… all in vain.
NOTE: I use OpenGL with PBO to render and I still have horrible latency. With that in mind, there is a bottleneck that is very hard to grasp.
Few thoughts,
• Sws_scale might be too heavy on the CPU, I’m considering converting YUV to BGRA in a GLSL shader but still not sure how yet.
• I’m currently decoding only one frame at the time. Adding a dedicated thread for decoding and storing few frames might improve speed.
• Eliminate copying the decoded data to the CPU and/or the GPU. Means the decode data would be pass to GLSL and mapped directly to SubTex2D, that’s a long shot but not impossible.
I’ve looked at VLC source and it’s like Chinese to me, hopefully you’ll have a better understanding.
I’ll be very interested I your findings also. You might consider opening a new thread.
Hope it helps. -Golgoth