summaryrefslogtreecommitdiff
path: root/avmedia/source/quicktime
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 16:28:01 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 16:28:01 +0000
commitc3c40faf6c1a80723421c82031494525e609bcd8 (patch)
treeab9d09d1cab7146fae378bdde8cd63be78779470 /avmedia/source/quicktime
parent4a5d4414c95632a17db583473ef215e2e7b74748 (diff)
INTEGRATION: CWS aquavcl05_DEV300 (1.2.6); FILE MERGED
2007/12/25 03:49:56 msicotte 1.2.6.1: #i84458# allow spaces in url
Diffstat (limited to 'avmedia/source/quicktime')
-rw-r--r--avmedia/source/quicktime/framegrabber.cxx32
-rw-r--r--avmedia/source/quicktime/framegrabber.hxx6
-rw-r--r--avmedia/source/quicktime/quicktimecommon.hxx11
3 files changed, 39 insertions, 10 deletions
diff --git a/avmedia/source/quicktime/framegrabber.cxx b/avmedia/source/quicktime/framegrabber.cxx
index 98a621069112..a8b1d157bca0 100644
--- a/avmedia/source/quicktime/framegrabber.cxx
+++ b/avmedia/source/quicktime/framegrabber.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: framegrabber.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2007-12-07 11:41:19 $
+ * last change: $Author: kz $ $Date: 2008-03-05 17:27:07 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -55,14 +55,33 @@ namespace avmedia { namespace quicktime {
FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
mxMgr( rxMgr )
{
- ;
+ OSErr result;
+
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ // check the version of QuickTime installed
+ result = Gestalt(gestaltQuickTime,&mnVersion);
+ if ((result == noErr) && (mnVersion >= QT701))
+ {
+ // we have version 7.01 or later, initialize
+ mpMovie = [QTMovie movie];
+ [mpMovie retain];
+ mbInitialized = true;
+ }
+ [pool release];
}
// ------------------------------------------------------------------------------
FrameGrabber::~FrameGrabber()
{
- ;
+ if( mbInitialized )
+ {
+ if( mpMovie )
+ {
+ [mpMovie release];
+ mpMovie = nil;
+ }
+ }
}
// ------------------------------------------------------------------------------
@@ -72,11 +91,12 @@ bool FrameGrabber::create( const ::rtl::OUString& rURL )
bool bRet = false;
maURL = rURL;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- NSURL* aURL = [NSURL URLWithString:[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()] ];
+ NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ;
+ NSURL* aURL = [NSURL URLWithString:aNSStr ];
// create the Movie
- mpMovie = [[QTMovie movie] initWithURL:aURL error:nil];
+ mpMovie = [mpMovie initWithURL:aURL error:nil];
if(mpMovie)
{
[mpMovie retain];
diff --git a/avmedia/source/quicktime/framegrabber.hxx b/avmedia/source/quicktime/framegrabber.hxx
index 9d885a068020..82410aa3d796 100644
--- a/avmedia/source/quicktime/framegrabber.hxx
+++ b/avmedia/source/quicktime/framegrabber.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: framegrabber.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2007-12-07 11:41:29 $
+ * last change: $Author: kz $ $Date: 2008-03-05 17:27:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -71,6 +71,8 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
::rtl::OUString maURL;
QTMovie* mpMovie;
+ sal_Bool mbInitialized;
+ long mnVersion;
};
} // namespace quicktime
diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx
index 0578cabbc4db..63f64f145736 100644
--- a/avmedia/source/quicktime/quicktimecommon.hxx
+++ b/avmedia/source/quicktime/quicktimecommon.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: quicktimecommon.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2007-12-07 11:42:31 $
+ * last change: $Author: kz $ $Date: 2008-03-05 17:28:01 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -98,4 +98,11 @@
#define WM_GRAPHNOTIFY (WM_USER + 567)
+// Quicktime 7+ in Mac OS X 10.4
+#define QT701 0x07010000
+
+// Quicktime 6.4+ in Mac OS X 10.3
+#define QT64 0x06400000
+
+
#endif // _QUICKTIMECOMMOM_HXX