34 #if defined( CINDER_MSW )
35 typedef struct ComponentInstanceRecord ComponentInstanceRecord;
36 typedef ComponentInstanceRecord * ComponentInstance;
37 typedef ComponentInstance DataHandler;
38 typedef struct TrackType** Track;
39 typedef struct MediaType** Media;
40 typedef struct OpaqueICMCompressionSession* ICMCompressionSessionRef;
41 typedef struct OpaqueICMCompressionSessionOptions* ICMCompressionSessionOptionsRef;
42 typedef const struct OpaqueICMEncodedFrame* ICMEncodedFrameRef;
43 typedef signed long OSStatus;
44 typedef unsigned long CodecType;
45 typedef unsigned long ICMCompressionPassModeFlags;
47 #include <QuickTime/QuickTime.h>
48 #include <QuickTime/ImageCompression.h>
49 #endif // defined( CINDER_MSW )
52 namespace cinder {
namespace qtime {
65 Format( uint32_t codec,
float quality );
66 Format(
const ICMCompressionSessionOptionsRef settings, uint32_t codec,
float quality,
float frameRate,
bool enableMultiPass );
121 bool mEnableMultiPass;
123 ICMCompressionSessionOptionsRef mOptions;
134 {
return std::shared_ptr<MovieWriter>(
new MovieWriter( path, width, height,
format ) ); }
171 Obj(
const fs::path &path, int32_t width, int32_t height,
const Format &
format );
175 void createCompressionSession();
178 static OSStatus encodedFrameOutputCallback(
void *refCon, ::ICMCompressionSessionRef session, OSStatus err, ICMEncodedFrameRef encodedFrame,
void *reserved );
181 ::DataHandler mDataHandler;
184 ::ICMCompressionSessionRef mCompressionSession;
185 ::ICMCompressionPassModeFlags mMultiPassModeFlags;
190 int32_t mWidth, mHeight;
192 bool mRequestedMultiPass, mDoingMultiPass, mFinished;
196 std::vector<std::pair<int64_t,int64_t> > mFrameTimes;
200 std::shared_ptr<Obj> mObj;
static bool getUserCompressionSettings(Format *result, ImageSourceRef previewImage=ImageSourceRef())
Presents the user with the standard compression options dialog. Optional previewImage provides a stil...
Definition: MovieWriter.cpp:538
Definition: MovieWriter.h:166
Definition: MovieWriter.h:166
uint32_t getNumFrames() const
Returns the number of frames in the movie.
Definition: MovieWriter.h:161
int32_t getWidth() const
Returns the width of the Movie in pixels.
Definition: MovieWriter.h:139
void enable(GLenum state)
Enables the OpenGL State state. Equivalent to calling to glEnable( state );.
Definition: dx.h:198
void finish()
Completes the encoding of the movie and closes the file. Calling finish() more than once has no effec...
Definition: MovieWriter.h:164
int32_t getHeight() const
Returns the height of the Movie in pixels.
Definition: MovieWriter.h:141
Definition: MovieWriter.h:166
GLenum GLsizei width
Definition: GLee.h:969
void reset()
Emulates shared_ptr-like behavior.
Definition: MovieWriter.h:207
Definition: MovieWriter.h:211
std::shared_ptr< IoStream > IoStreamRef
Definition: Stream.h:150
Definition: MovieWriter.h:213
Outputs QuickTime movies.
Definition: MovieWriter.h:57
MovieWriter()
Definition: MovieWriter.h:130
GLenum GLsizei GLsizei height
Definition: GLee.h:1029
std::shared_ptr< Obj > MovieWriter::* unspecified_bool_type
Emulates shared_ptr-like behavior.
Definition: MovieWriter.h:205
Definition: MovieWriter.h:217
typedef int64_t(APIENTRYP GLEEPFNGLXSWAPBUFFERSMSCOMLPROC)(Display *dpy
Definition: MovieWriter.h:215
float getDefaultDuration() const
Returns the Movie's default frame duration measured in seconds. You can also think of this as the Mov...
Definition: MovieWriter.h:137
std::shared_ptr< MovieWriter > MovieWriterRef
Definition: MovieWriter.h:54
const Format & getFormat() const
Returns the Movie's Format.
Definition: MovieWriter.h:150
void addFrame(const ImageSourceRef &imageSource, float duration=-1.0f)
Appends a frame to the Movie. The optional duration parameter allows a frame to be inserted for a tim...
Definition: MovieWriter.h:158
GLenum GLsizei GLenum format
Definition: GLee.h:969
Definition: Exception.h:32
std::shared_ptr< class ImageSource > ImageSourceRef
Definition: Channel.h:33
static MovieWriterRef create(const fs::path &path, int32_t width, int32_t height, const Format &format=Format::Format())
Definition: MovieWriter.h:133
float getAspectRatio() const
Returns the Movie's aspect ratio, which is its width / height.
Definition: MovieWriter.h:145
Definition: MovieWriter.h:166
Definition: MovieWriter.h:166
Area getBounds() const
Returns the bounding Area of the Movie in pixels: [0,0]-(width,height)
Definition: MovieWriter.h:147
GLclampf f
Definition: GLee.h:15307
Vec2i getSize() const
Returns the size of the Movie in pixels.
Definition: MovieWriter.h:143
Vec2< int > Vec2i
Definition: Vector.h:1313
Definition: MovieWriter.h:166