root/OpenSceneGraph/trunk/src/osgPlugins/quicktime/QTUtils.h @ 8797

Revision 8797, 1.8 kB (checked in by robert, 6 years ago)

From Ulrich Hertlein, attached is a small fix for a mismatched function signature

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
RevLine 
[2815]1/*
2 *  QTUtils.h
3 *  NativeContext
4 *
5 *  Created by Stephan Huber on Fri Sep 06 2002.
6 *  Copyright (c) 2002 digital mind. All rights reserved.
7 *
8 */
9
[5799]10#ifndef QTUTILS_HEADER_
11#define QTUTILS_HEADER_
[2815]12
[5981]13// Quicktime plugin is able to load regular 2D images
14// besides movie streams.
15// It is used as default image loader on __APPLE__
16// Uncomment this define to use it as image loader
17// on other platforms.
18// #define QT_HANDLE_IMAGES_ALSO
19
[5799]20#ifdef __APPLE__
[7624]21    #include <QuickTime/QuickTime.h>
[5799]22    #include <Carbon/Carbon.h>
[5981]23    #define QT_HANDLE_IMAGES_ALSO
[5799]24#else
25    #include <QTML.h>
26    #include <Movies.h>
27    #include <Quickdraw.h>
28    #include <QDOffscreen.h>
29    #include <QuicktimeComponents.h>
30    #include <FixMath.h>
31    #include <CGBitmapContext.h>
32    #include <CGImage.h>
33    #include <CGColorSpace.h>
34    #include <ImageCompression.h>
[2815]35
[5799]36    extern "C" {
37        /** legacy function for Windows */
38        inline void GetPortBounds(GWorldPtr gw, Rect* rect) {
39            (*rect) = (gw->portRect);
40        }
41        /** legacy function for Windows */
42        inline PixMapHandle GetPortPixMap (CGrafPtr port) {
43            return port->portPixMap;
44        }
45 
46    }
[2815]47
[5799]48#define SetRect MacSetRect
49#define OffsetRect MacOffsetRect
[2815]50
[5799]51#endif
52
53
54    /**
55     * inits Quicktime, if erase = true, the Quicktime-stuff gets cleaned, call it before your app exits
56     * @param erase true, if you want to cleanup quicktime-related stuff
57     */
58    void initQuicktime(bool erase = false);
59   
60    /** cleans up all quicktime-related stuff */
61    void exitQuicktime();
62   
63    /** constructs an FSSpec out of an path */
64     OSStatus MakeFSSpecFromPath(const char* path, FSSpec* spec);
65   
66    /** opens a movie from a path */
[8797]67      OSStatus MakeMovieFromPath(const char* path, Movie* movie, short& resref);
[5799]68
69
70#endif
Note: See TracBrowser for help on using the browser.