summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/libavwrapper.h')
-rwxr-xr-xrotord/src/libavwrapper.h9
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
};