Skip to content

Commit

Permalink
explicitly mention video player and grabber, swap video for updated v…
Browse files Browse the repository at this point in the history
…ideo
  • Loading branch information
kylemcdonald committed Mar 4, 2016
1 parent 05245f8 commit d0cfc01
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example-contours-tracking/addons.make
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ofxCv
ofxGui
ofxOpenCv
ofxGui
Binary file modified example-contours-tracking/bin/data/video.mov
Binary file not shown.
2 changes: 1 addition & 1 deletion example-empty/addons.make
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ofxCv
ofxGui
ofxOpenCv
ofxGui
8 changes: 6 additions & 2 deletions libs/ofxCv/include/ofxCv/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "ofTexture.h"
#include "ofPixels.h"
#include "ofBaseTypes.h"
#include "ofVideoPlayer.h"
#include "ofVideoGrabber.h"
#include "ofPolyline.h"
#include "ofVectorMath.h"

Expand Down Expand Up @@ -177,7 +179,7 @@ namespace ofxCv {
{
img.allocate(width, height, getOfImageType(cvType));
}
}
}
inline void allocate(ofTexture& img, int width, int height, int cvType) {
if (!img.isAllocated() ||
getWidth(img) != width ||
Expand All @@ -195,7 +197,9 @@ namespace ofxCv {
}
}
// ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything
inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}
inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}
inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}
inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}

// imitate() is good for preparing buffers
// it's like allocate(), but uses the size and type of the original as a reference
Expand Down

0 comments on commit d0cfc01

Please sign in to comment.