oftheo / ofdirectshowvideoplayer Goto Github PK
View Code? Open in Web Editor NEWofDirectShowVideoPlayer contains DirectShowVideo a C++ class that allows for video playback and pixel access and ofDirectShowVideoPlayer, an openFrameworks wrapper.
ofDirectShowVideoPlayer contains DirectShowVideo a C++ class that allows for video playback and pixel access and ofDirectShowVideoPlayer, an openFrameworks wrapper.
Hi Theodore,
thanks for crafting the ofDirectShowVideoPlayer. It works like a charm, much better then the build-in player of openFrameWorks. However, I did come across a nasty memory leak. I created an of application showing short movie clips, with live generated graphics in between. After several hours, the application crashed. It turned out the be a memory leak problem. After some debugging, it turned out to be something in the video player. It leaked an amount of memory equal to the size of an rgb frame per loadMovie. And after several days of fruitless searching, I found the solution. The m_pGrabber->SetBufferSamples(TRUE) seems to be the problem. If the function is not called, or called with FALSE as the argument, the memory leak disappears, an the application runs for ever, without eating it's memory over time. I hope you can confirm that this call is not crucial for some other aspect of the player. At least for me, this solution seems to be working.
Best regards, Alex Prooper
Not sure if this player was intended to function with gif playback, but this line fails to load the gif
bool loadMovie(string path, ofPixelFormat format){
.....
//this is the easier way to connect the graph, but we have to remove the video window manually
hr = m_pGraph->RenderFile(filePathW.c_str(), NULL);
.....
}
Despite the path being valid, the graph builder returns an error to the handle:
HRESULT_FROM_WIN32(ERROR_INVALID_NAME) : The filename, directory name, or volume label syntax is incorrect.
I am on windows 10 with the k-lite codec media pack installed and quicktime. It seems that ofVideoPlayer supports gif playback, and since ofDirectShowPlayer is the default class implementation of the interface on windows, I would assume this is a bug.
ping @igierard
feel free to submit those branches as PRs and I'll pull them in.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.