| 211 | } |
| 212 | |
| 213 | ::Movie openMovieFromPath( const fs::path &path ) |
| 214 | { |
| 215 | ::Movie result; |
| 216 | QTNewMoviePropertyElement movieProps[10]; |
| 217 | ItemCount moviePropCount = 0; |
| 218 | |
| 219 | moviePropCount = openMovieBaseProperties( movieProps ); |
| 220 | |
| 221 | #if defined( CINDER_MSW ) |
| 222 | std::string pathUtf8 = msw::toUtf8String( path.wstring() ); |
| 223 | ::CFStringRef basePathCF = ::CFStringCreateWithCString( kCFAllocatorDefault, pathUtf8.c_str(), kCFStringEncodingUTF8 ); |
| 224 | #else |
| 225 | ::CFStringRef basePathCF = ::CFStringCreateWithCString( kCFAllocatorDefault, path.string().c_str(), kCFStringEncodingUTF8 ); |
| 226 | #endif |
| 227 | shared_ptr<const __CFString> pathCF = shared_ptr<const __CFString>( basePathCF, ::CFRelease ); |
| 228 | // Store the movie properties in the array |
| 229 | movieProps[moviePropCount].propClass = kQTPropertyClass_DataLocation; |
| 230 | movieProps[moviePropCount].propID = kQTDataLocationPropertyID_CFStringNativePath; |
| 231 | movieProps[moviePropCount].propValueSize = sizeof(CFStringRef); |
| 232 | movieProps[moviePropCount].propValueAddress = (void*)&basePathCF; |
| 233 | movieProps[moviePropCount].propStatus = 0; |
| 234 | moviePropCount++; |
| 235 | |
| 236 | OSStatus err; |
| 237 | if( (err = ::NewMovieFromProperties( moviePropCount, movieProps, 0, NULL, &result ) ) != noErr ) { |
| 238 | throw QuickTimePathInvalidExc(); |
| 239 | } |
| 240 | |
| 241 | return result; |
| 242 | } |
| 243 | |
| 244 | Handle createPointerReferenceHandle( void *data, Size dataSize ) |
| 245 | { |
no test coverage detected