summaryrefslogtreecommitdiff
path: root/rotord/ofxMovieExporter.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/ofxMovieExporter.h')
-rw-r--r--rotord/ofxMovieExporter.h35
1 files changed, 7 insertions, 28 deletions
diff --git a/rotord/ofxMovieExporter.h b/rotord/ofxMovieExporter.h
index ae6b306..82c574c 100644
--- a/rotord/ofxMovieExporter.h
+++ b/rotord/ofxMovieExporter.h
@@ -91,10 +91,7 @@ extern "C"
//#include <libavutil/samplefmt.h>
//#include <libavutil/timestamp.h>
}
-
-namespace itg
-{
- class ofxMovieExporter
+class ofxMovieExporter
//#ifdef _THREAD_CAPTURE
// : public ofThread
//#endif
@@ -116,31 +113,16 @@ namespace itg
// tested so far with...
// codecId = CODEC_ID_MPEG4, container = "mp4"
// codecId = CODEC_ID_MPEG2VIDEO, container = "mov"
- void setup(int outW = OUT_W, int outH = OUT_H, int bitRate = BIT_RATE, int frameRate = FRAME_RATE, AVCodecID codecId = CODEC_ID, std::string container = CONTAINER);
- void record(std::string filePrefix=FILENAME_PREFIX, std::string folderPath="");
+ bool setup(int outW = OUT_W, int outH = OUT_H, int bitRate = BIT_RATE, int frameRate = FRAME_RATE, AVCodecID codecId = CODEC_ID, std::string container = CONTAINER);
+ bool record(std::string filePrefix=FILENAME_PREFIX, std::string folderPath="");
+ void finishRecord();
void stop();
bool isRecording() const;
- // set the recording area
- // x, y is the upper left corner of the recording area, default: 0, 0
- // w x h is the area size, default: viewport width x height
- void setRecordingArea(int x, int y, int w, int h);
- void setRecordingArea(int rect);
-
- // reset the recording area to the size of the current viewport (screen, FBO, etc)
- void resetRecordingArea();
-
- // get the recording area as a rectangle
- int getRecordingArea();
-
// set an external pixel source, assumes 3 Byte RGB
// also sets the recording size but does not crop to the recording area
void setPixelSource(unsigned char* pixels, int w, int h);
- // reset the pixel source and record from the screen
- // also resets the recording size to the viewport width
- void resetPixelSource();
-
// get the number files that have been captured so far
int getNumCaptures();
@@ -151,6 +133,8 @@ namespace itg
inline int getRecordingWidth() {return outW;}
inline int getRecordingHeight() {return outH;}
+ void encodeFrame(char *pixels);
+
private:
//#ifdef _THREAD_CAPTURE
// void threadedFunction();
@@ -163,9 +147,8 @@ namespace itg
void allocateMemory();
void clearMemory();
- void checkFrame();//ofEventArgs& args);
void encodeFrame();
- void finishRecord();
+
std::string container;
AVCodecID codecId;
@@ -203,7 +186,3 @@ namespace itg
unsigned char* pixelSource;
};
- inline bool ofxMovieExporter::isRecording() const { return recording; }
-}
-
-namespace Apex = itg;