summaryrefslogtreecommitdiff
path: root/rotord/ofxMovieExporter.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-04-16 18:01:35 +0100
committerTim Redfern <tim@herge.(none)>2013-04-16 18:01:35 +0100
commitf25319fc877f4f4af398a90af75aae77ce9e552b (patch)
treeef7470cfa1ebc81b7d1f3947febbc1b5a1343a4f /rotord/ofxMovieExporter.cpp
parent10eaf02eec5bdd03bf3360befb5e557aac0fd3fd (diff)
in pursuit of 1st render
Diffstat (limited to 'rotord/ofxMovieExporter.cpp')
-rw-r--r--rotord/ofxMovieExporter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/rotord/ofxMovieExporter.cpp b/rotord/ofxMovieExporter.cpp
index 8b97813..8513395 100644
--- a/rotord/ofxMovieExporter.cpp
+++ b/rotord/ofxMovieExporter.cpp
@@ -86,11 +86,15 @@
recording = false;
numCaptures = 0;
+inW=outW;
+inH=outH;
convertCtx = sws_getContext(inW, inH, PIX_FMT_RGB24, outW, outH, PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
allocateMemory();
+
+
return true;
}
@@ -217,10 +221,10 @@
frameNum++;
}
- void ofxMovieExporter::encodeFrame(char *pixels)
+ void ofxMovieExporter::encodeFrame(unsigned char *pixels,int w,int h)
{
- avpicture_fill((AVPicture*)inFrame, pixels, PIX_FMT_RGB24, inW, inH);
+ avpicture_fill((AVPicture*)inFrame, pixels, PIX_FMT_RGB24, w, h);
avpicture_fill((AVPicture*)outFrame, outPixels, PIX_FMT_YUV420P, outW, outH);
//perform the conversion for RGB to YUV and size