diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-08-08 13:32:46 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-08-08 13:32:46 +0100 |
| commit | a2254447b138af7fc0719e5a107816487255736b (patch) | |
| tree | fc72463364bd158b5a042ac821766f466efdfcb0 /rotord/src/libavwrapper.h | |
| parent | 1f8aca919df6ab2d2636cddaa30de1e388b4c09d (diff) | |
basic speed control for video_loader
Diffstat (limited to 'rotord/src/libavwrapper.h')
| -rwxr-xr-x | rotord/src/libavwrapper.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h index 4c5cb02..ebe47c1 100755 --- a/rotord/src/libavwrapper.h +++ b/rotord/src/libavwrapper.h @@ -29,6 +29,10 @@ //http://blog.tomaka17.com/2012/03/libavcodeclibavformat-tutorial/ //great to use c++11 features + +//http://dranger.com/ffmpeg/ +//the mnost up to date tutorial? + #ifndef UINT64_C #define UINT64_C(c) (c ## ULL) #endif @@ -103,6 +107,7 @@ namespace libav { int getNumberOfFrames() const; int getWidth() const; int getHeight() const; + float getFrameRate() const{return framerate;}; int getNumberOfChannels() const; bool readNextFrame(int targetFrameIndex = 0); bool readNextFrameWithPacket(int targetFrameIndex, AVPacket& packet, AVFrame* pYuv); @@ -116,6 +121,7 @@ namespace libav { int videoStream; int previousFrameIndex; bool isOpen; + bool open(std::string& fileName, enum PixelFormat formatParam = PIX_FMT_RGB24); bool open(char* fileName, enum PixelFormat formatParam = PIX_FMT_RGB24); @@ -138,6 +144,9 @@ namespace libav { size_t numBytes; int numFrames; int sc; // number of color channels + float framerate; + //NB representing framerate as a float implies that + //ABOVE ~93 HOURS AT 25FPS the calculations will be inaccurate }; |
