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
This commit is contained in:
parent
4a5d4414c9
commit
c3c40faf6c
3 changed files with 39 additions and 10 deletions
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue