| 1 | #include "osg/Image" |
|---|
| 2 | #include "osg/Notify" |
|---|
| 3 | |
|---|
| 4 | #include <osg/Geode> |
|---|
| 5 | |
|---|
| 6 | #include <osg/observer_ptr> |
|---|
| 7 | |
|---|
| 8 | #include "osg/GL" |
|---|
| 9 | |
|---|
| 10 | #include "osgDB/FileNameUtils" |
|---|
| 11 | #include "osgDB/Registry" |
|---|
| 12 | #include "osgDB/FileUtils" |
|---|
| 13 | |
|---|
| 14 | #include <stdio.h> |
|---|
| 15 | #include <stdlib.h> |
|---|
| 16 | #include <string.h> |
|---|
| 17 | #include <sstream> |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | #ifndef __APPLE__ |
|---|
| 21 | #include "Components.h" |
|---|
| 22 | #include "QuickTimeComponents.h" |
|---|
| 23 | #else |
|---|
| 24 | #include <QuickTime/QuickTime.h> |
|---|
| 25 | #endif |
|---|
| 26 | |
|---|
| 27 | #ifndef SEEK_SET |
|---|
| 28 | # define SEEK_SET 0 |
|---|
| 29 | #endif |
|---|
| 30 | #include "QTUtils.h" |
|---|
| 31 | #include "QTLiveUtils.h" |
|---|
| 32 | #include "QTImportExport.h" |
|---|
| 33 | #include "QuicktimeImageStream.h" |
|---|
| 34 | #include "QuicktimeLiveImageStream.h" |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | using namespace osg; |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | class ReaderWriterQT : public osgDB::ReaderWriter |
|---|
| 41 | { |
|---|
| 42 | public: |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | class QuicktimeInitializer : public osg::Observer |
|---|
| 51 | { |
|---|
| 52 | public: |
|---|
| 53 | |
|---|
| 54 | QuicktimeInitializer (): |
|---|
| 55 | _instanceCount(0), |
|---|
| 56 | _setup(false) |
|---|
| 57 | {} |
|---|
| 58 | |
|---|
| 59 | virtual ~QuicktimeInitializer() |
|---|
| 60 | { |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | if (_setup && _instanceCount == 0) |
|---|
| 66 | { |
|---|
| 67 | exit(); |
|---|
| 68 | } |
|---|
| 69 | }; |
|---|
| 70 | |
|---|
| 71 | void addMedia(Image* ptr) |
|---|
| 72 | { |
|---|
| 73 | ptr->addObserver(this); |
|---|
| 74 | ++ _instanceCount; |
|---|
| 75 | } |
|---|
| 76 | |
|---|
| 77 | virtual void objectDeleted(void*) |
|---|
| 78 | { |
|---|
| 79 | -- _instanceCount; |
|---|
| 80 | if(_instanceCount== 0) |
|---|
| 81 | exit(); |
|---|
| 82 | } |
|---|
| 83 | |
|---|
| 84 | void init() |
|---|
| 85 | { |
|---|
| 86 | if (!_setup) |
|---|
| 87 | { |
|---|
| 88 | #ifndef __APPLE__ |
|---|
| 89 | InitializeQTML(0); |
|---|
| 90 | #endif |
|---|
| 91 | |
|---|
| 92 | OSErr err = EnterMovies(); |
|---|
| 93 | if (err!=0) |
|---|
| 94 | osg::notify(osg::FATAL) << "Error while initializing quicktime: " << err << std::endl; |
|---|
| 95 | else |
|---|
| 96 | osg::notify(osg::DEBUG_INFO) << "Quicktime initialized successfully" << std::endl; |
|---|
| 97 | |
|---|
| 98 | _setup = true; |
|---|
| 99 | } |
|---|
| 100 | } |
|---|
| 101 | |
|---|
| 102 | void exit() |
|---|
| 103 | { |
|---|
| 104 | #ifndef __APPLE__ |
|---|
| 105 | ExitMovies(); |
|---|
| 106 | #endif |
|---|
| 107 | |
|---|
| 108 | _setup = false; |
|---|
| 109 | } |
|---|
| 110 | |
|---|
| 111 | private: |
|---|
| 112 | unsigned int _instanceCount; |
|---|
| 113 | bool _setup; |
|---|
| 114 | |
|---|
| 115 | }; |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | ReaderWriterQT::ReaderWriterQT() |
|---|
| 122 | { |
|---|
| 123 | |
|---|
| 124 | registerQtReader(); |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | supportsExtension("mov","Movie format"); |
|---|
| 128 | supportsExtension("mpg","Movie format"); |
|---|
| 129 | supportsExtension("mpv","Movie format"); |
|---|
| 130 | supportsExtension("mp4","Movie format"); |
|---|
| 131 | supportsExtension("m4v","Movie format"); |
|---|
| 132 | supportsExtension("dv","Movie format"); |
|---|
| 133 | supportsExtension("avi","Movie format"); |
|---|
| 134 | supportsExtension("flv","Movie format"); |
|---|
| 135 | supportsExtension("swf","Movie format"); |
|---|
| 136 | supportsExtension("3gp","Mobile movie format"); |
|---|
| 137 | |
|---|
| 138 | supportsExtension("live","Live video streaming"); |
|---|
| 139 | |
|---|
| 140 | #ifdef QT_HANDLE_IMAGES_ALSO |
|---|
| 141 | supportsExtension("jpg","jpg image format"); |
|---|
| 142 | supportsExtension("jpeg","jpeg image format"); |
|---|
| 143 | supportsExtension("tif","tif image format"); |
|---|
| 144 | supportsExtension("tiff","tiff image format"); |
|---|
| 145 | supportsExtension("gif","gif image format"); |
|---|
| 146 | supportsExtension("png","png image format"); |
|---|
| 147 | supportsExtension("pict","pict image format"); |
|---|
| 148 | supportsExtension("pct","pct image format"); |
|---|
| 149 | supportsExtension("tga","tga image format"); |
|---|
| 150 | supportsExtension("psd","psd image format"); |
|---|
| 151 | #endif |
|---|
| 152 | } |
|---|
| 153 | |
|---|
| 154 | ReaderWriterQT::~ReaderWriterQT() |
|---|
| 155 | { |
|---|
| 156 | } |
|---|
| 157 | |
|---|
| 158 | |
|---|
| 159 | virtual const char* className() const { return "Default Quicktime Image Reader/Writer"; } |
|---|
| 160 | |
|---|
| 161 | virtual bool acceptsMovieExtension(const std::string& extension) const |
|---|
| 162 | { |
|---|
| 163 | return osgDB::equalCaseInsensitive(extension,"mov") || |
|---|
| 164 | osgDB::equalCaseInsensitive(extension,"mpg") || |
|---|
| 165 | osgDB::equalCaseInsensitive(extension,"mpv") || |
|---|
| 166 | osgDB::equalCaseInsensitive(extension,"mp4") || |
|---|
| 167 | osgDB::equalCaseInsensitive(extension,"m4v") || |
|---|
| 168 | osgDB::equalCaseInsensitive(extension,"dv") || |
|---|
| 169 | osgDB::equalCaseInsensitive(extension,"avi") || |
|---|
| 170 | osgDB::equalCaseInsensitive(extension,"flv") || |
|---|
| 171 | osgDB::equalCaseInsensitive(extension,"swf") || |
|---|
| 172 | osgDB::equalCaseInsensitive(extension,"3gp"); |
|---|
| 173 | } |
|---|
| 174 | |
|---|
| 175 | virtual bool acceptsLiveExtension(const std::string& extension) const |
|---|
| 176 | { |
|---|
| 177 | return osgDB::equalCaseInsensitive(extension,"live"); |
|---|
| 178 | } |
|---|
| 179 | |
|---|
| 180 | virtual bool acceptsExtension(const std::string& extension) const |
|---|
| 181 | { |
|---|
| 182 | |
|---|
| 183 | |
|---|
| 184 | return |
|---|
| 185 | |
|---|
| 186 | #ifdef QT_HANDLE_IMAGES_ALSO |
|---|
| 187 | osgDB::equalCaseInsensitive(extension,"jpg") || |
|---|
| 188 | osgDB::equalCaseInsensitive(extension,"jpeg") || |
|---|
| 189 | osgDB::equalCaseInsensitive(extension,"tif") || |
|---|
| 190 | osgDB::equalCaseInsensitive(extension,"tiff") || |
|---|
| 191 | osgDB::equalCaseInsensitive(extension,"gif") || |
|---|
| 192 | osgDB::equalCaseInsensitive(extension,"png") || |
|---|
| 193 | osgDB::equalCaseInsensitive(extension,"pict") || |
|---|
| 194 | osgDB::equalCaseInsensitive(extension,"pct") || |
|---|
| 195 | osgDB::equalCaseInsensitive(extension,"tga") || |
|---|
| 196 | osgDB::equalCaseInsensitive(extension,"psd") || |
|---|
| 197 | #endif |
|---|
| 198 | |
|---|
| 199 | acceptsMovieExtension(extension) || |
|---|
| 200 | acceptsLiveExtension(extension); |
|---|
| 201 | } |
|---|
| 202 | |
|---|
| 203 | virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const |
|---|
| 204 | { |
|---|
| 205 | std::string ext = osgDB::getLowerCaseFileExtension(file); |
|---|
| 206 | if (osgDB::equalCaseInsensitive(ext,"qt")) |
|---|
| 207 | { |
|---|
| 208 | return readImage(osgDB::getNameLessExtension(file),options); |
|---|
| 209 | } |
|---|
| 210 | |
|---|
| 211 | if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED; |
|---|
| 212 | |
|---|
| 213 | |
|---|
| 214 | if (acceptsLiveExtension(ext)) |
|---|
| 215 | { |
|---|
| 216 | long num_video_components; |
|---|
| 217 | { |
|---|
| 218 | |
|---|
| 219 | QTScopedQTMLInitialiser qt_init; |
|---|
| 220 | QTScopedMovieInitialiser qt_movie_init; |
|---|
| 221 | |
|---|
| 222 | ComponentDescription video_component_description; |
|---|
| 223 | video_component_description.componentType = 'vdig'; |
|---|
| 224 | video_component_description.componentSubType = 0L; |
|---|
| 225 | video_component_description.componentManufacturer = 0L; |
|---|
| 226 | video_component_description.componentFlags = 0L; |
|---|
| 227 | video_component_description.componentFlagsMask = 0L; |
|---|
| 228 | num_video_components = CountComponents (&video_component_description); |
|---|
| 229 | } |
|---|
| 230 | if (osgDB::getNameLessExtension(file) == "devices") |
|---|
| 231 | { |
|---|
| 232 | osg::notify(osg::ALWAYS) << " available Video DigitizerComponents : " << num_video_components << std::endl; |
|---|
| 233 | if (num_video_components) |
|---|
| 234 | { |
|---|
| 235 | |
|---|
| 236 | probe_video_digitizer_components(); |
|---|
| 237 | |
|---|
| 238 | std::vector<OSG_SGDeviceList> devices_list = probe_sequence_grabber_components(); |
|---|
| 239 | if (devices_list.size()) |
|---|
| 240 | { |
|---|
| 241 | |
|---|
| 242 | OSG_SGDeviceList& video_device_list = devices_list[0]; |
|---|
| 243 | |
|---|
| 244 | osg::notify(osg::ALWAYS) << std::endl; |
|---|
| 245 | osg::notify(osg::ALWAYS) << "Video Component/Input IDs follow: " << std::endl; |
|---|
| 246 | osg::notify(osg::ALWAYS) << std::endl; |
|---|
| 247 | for (unsigned int device_input = 0; device_input < video_device_list.size(); ++device_input) |
|---|
| 248 | { |
|---|
| 249 | OSG_SGDevicePair device_pair = video_device_list[device_input]; |
|---|
| 250 | osg::notify(osg::ALWAYS) << device_pair.first.c_str() << " " << device_pair.second.c_str() << std::endl; |
|---|
| 251 | } |
|---|
| 252 | } |
|---|
| 253 | if (devices_list.size() > 1) |
|---|
| 254 | { |
|---|
| 255 | |
|---|
| 256 | OSG_SGDeviceList& audio_device_list = devices_list[1]; |
|---|
| 257 | |
|---|
| 258 | osg::notify(osg::ALWAYS) << std::endl; |
|---|
| 259 | osg::notify(osg::ALWAYS) << "Audio Component/Input IDs follow: " << std::endl; |
|---|
| 260 | osg::notify(osg::ALWAYS) << std::endl; |
|---|
| 261 | for (unsigned int device_input = 0; device_input < audio_device_list.size(); ++device_input) |
|---|
| 262 | { |
|---|
| 263 | OSG_SGDevicePair device_pair = audio_device_list[device_input]; |
|---|
| 264 | osg::notify(osg::ALWAYS) << device_pair.first.c_str() << " " << device_pair.second.c_str() << std::endl; |
|---|
| 265 | } |
|---|
| 266 | } |
|---|
| 267 | } |
|---|
| 268 | return ReadResult::FILE_NOT_HANDLED; |
|---|
| 269 | } |
|---|
| 270 | else |
|---|
| 271 | { |
|---|
| 272 | osg::notify(osg::DEBUG_INFO) << " available Video DigitizerComponents : " << num_video_components << std::endl; |
|---|
| 273 | if (num_video_components) |
|---|
| 274 | { |
|---|
| 275 | |
|---|
| 276 | |
|---|
| 277 | |
|---|
| 278 | |
|---|
| 279 | |
|---|
| 280 | _qtExitObserver.init(); |
|---|
| 281 | |
|---|
| 282 | |
|---|
| 283 | QuicktimeLiveImageStream* p_qt_image_stream = new QuicktimeLiveImageStream(osgDB::getNameLessExtension(file)); |
|---|
| 284 | |
|---|
| 285 | _qtExitObserver.addMedia(p_qt_image_stream); |
|---|
| 286 | return p_qt_image_stream; |
|---|
| 287 | } |
|---|
| 288 | else |
|---|
| 289 | { |
|---|
| 290 | osg::notify(osg::DEBUG_INFO) << "No available Video DigitizerComponents : " << std::endl; |
|---|
| 291 | return ReadResult::FILE_NOT_HANDLED; |
|---|
| 292 | } |
|---|
| 293 | } |
|---|
| 294 | } |
|---|
| 295 | |
|---|
| 296 | |
|---|
| 297 | std::string fileName = osgDB::findDataFile( file, options); |
|---|
| 298 | if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; |
|---|
| 299 | |
|---|
| 300 | |
|---|
| 301 | |
|---|
| 302 | |
|---|
| 303 | |
|---|
| 304 | |
|---|
| 305 | _qtExitObserver.init(); |
|---|
| 306 | |
|---|
| 307 | |
|---|
| 308 | |
|---|
| 309 | if (acceptsMovieExtension(ext)) |
|---|
| 310 | { |
|---|
| 311 | |
|---|
| 312 | |
|---|
| 313 | |
|---|
| 314 | |
|---|
| 315 | |
|---|
| 316 | QuicktimeImageStream* moov = new QuicktimeImageStream(fileName); |
|---|
| 317 | |
|---|
| 318 | |
|---|
| 319 | |
|---|
| 320 | _qtExitObserver.addMedia(moov); |
|---|
| 321 | |
|---|
| 322 | return moov; |
|---|
| 323 | } |
|---|
| 324 | |
|---|
| 325 | QuicktimeImportExport importer; |
|---|
| 326 | |
|---|
| 327 | std::ifstream is; |
|---|
| 328 | is.open (fileName.c_str(), std::ios::binary | std::ios::in ); |
|---|
| 329 | is.seekg (0, std::ios::end); |
|---|
| 330 | long length = is.tellg(); |
|---|
| 331 | is.seekg (0, std::ios::beg); |
|---|
| 332 | |
|---|
| 333 | osg::ref_ptr<osg::Image> image = importer.readFromStream(is, fileName, length); |
|---|
| 334 | is.close(); |
|---|
| 335 | if (!importer.success() || (image == NULL)) { |
|---|
| 336 | osg::notify(osg::WARN) << "Error reading file " << file << " : " << importer.getLastErrorString() << std::endl; |
|---|
| 337 | return ReadResult::ERROR_IN_READING_FILE; |
|---|
| 338 | } |
|---|
| 339 | |
|---|
| 340 | _qtExitObserver.addMedia(image.get()); |
|---|
| 341 | |
|---|
| 342 | return image.release(); |
|---|
| 343 | } |
|---|
| 344 | |
|---|
| 345 | virtual ReadResult readImage (std::istream& is, const osgDB::ReaderWriter::Options* options=NULL) const |
|---|
| 346 | { |
|---|
| 347 | std::string filename = ""; |
|---|
| 348 | long sizeHint(0); |
|---|
| 349 | |
|---|
| 350 | if (options) { |
|---|
| 351 | std::istringstream iss(options->getOptionString()); |
|---|
| 352 | std::string opt; |
|---|
| 353 | while (iss >> opt) |
|---|
| 354 | { |
|---|
| 355 | int index = opt.find( "=" ); |
|---|
| 356 | if( opt.substr( 0, index ) == "filename" || |
|---|
| 357 | opt.substr( 0, index ) == "FILENAME" ) |
|---|
| 358 | { |
|---|
| 359 | filename = opt.substr( index+1 ); |
|---|
| 360 | } else if( opt.substr( 0, index ) == "size" || |
|---|
| 361 | opt.substr( 0, index ) == "SIZE" ) |
|---|
| 362 | { |
|---|
| 363 | std::string sizestr = opt.substr( index+1 ); |
|---|
| 364 | sizeHint = atol(sizestr.c_str()); |
|---|
| 365 | } |
|---|
| 366 | } |
|---|
| 367 | } |
|---|
| 368 | |
|---|
| 369 | _qtExitObserver.init(); |
|---|
| 370 | |
|---|
| 371 | QuicktimeImportExport importer; |
|---|
| 372 | osg::ref_ptr<osg::Image> image = importer.readFromStream(is, filename, sizeHint); |
|---|
| 373 | |
|---|
| 374 | if (!importer.success() || (image == NULL)) { |
|---|
| 375 | osg::notify(osg::WARN) << "Error reading from stream " << importer.getLastErrorString() << std::endl; |
|---|
| 376 | return ReadResult::ERROR_IN_READING_FILE; |
|---|
| 377 | } |
|---|
| 378 | _qtExitObserver.addMedia(image.get()); |
|---|
| 379 | return image.release(); |
|---|
| 380 | |
|---|
| 381 | } |
|---|
| 382 | |
|---|
| 383 | virtual WriteResult writeImage(const osg::Image &img,const std::string& fileName, const osgDB::ReaderWriter::Options*) const |
|---|
| 384 | { |
|---|
| 385 | std::string ext = osgDB::getFileExtension(fileName); |
|---|
| 386 | if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED; |
|---|
| 387 | |
|---|
| 388 | _qtExitObserver.init(); |
|---|
| 389 | |
|---|
| 390 | |
|---|
| 391 | std::map<std::string, OSType> extmap; |
|---|
| 392 | |
|---|
| 393 | extmap.insert(std::pair<std::string, OSType>("jpg", kQTFileTypeJPEG)); |
|---|
| 394 | extmap.insert(std::pair<std::string, OSType>("jpeg", kQTFileTypeJPEG)); |
|---|
| 395 | extmap.insert(std::pair<std::string, OSType>("bmp", kQTFileTypeBMP)); |
|---|
| 396 | extmap.insert(std::pair<std::string, OSType>("tif", kQTFileTypeTIFF)); |
|---|
| 397 | extmap.insert(std::pair<std::string, OSType>("tiff", kQTFileTypeTIFF)); |
|---|
| 398 | extmap.insert(std::pair<std::string, OSType>("png", kQTFileTypePNG)); |
|---|
| 399 | extmap.insert(std::pair<std::string, OSType>("gif", kQTFileTypeGIF)); |
|---|
| 400 | extmap.insert(std::pair<std::string, OSType>("psd", kQTFileTypePhotoShop)); |
|---|
| 401 | extmap.insert(std::pair<std::string, OSType>("sgi", kQTFileTypeSGIImage)); |
|---|
| 402 | |
|---|
| 403 | std::map<std::string, OSType>::iterator cur = extmap.find(ext); |
|---|
| 404 | |
|---|
| 405 | |
|---|
| 406 | if (cur == extmap.end()) |
|---|
| 407 | return WriteResult::FILE_NOT_HANDLED; |
|---|
| 408 | |
|---|
| 409 | std::ofstream os(fileName.c_str(), std::ios::binary | std::ios::trunc | std::ios::out); |
|---|
| 410 | if(os.good()) |
|---|
| 411 | { |
|---|
| 412 | QuicktimeImportExport exporter; |
|---|
| 413 | exporter.writeToStream(os, const_cast<osg::Image*>(&img), fileName); |
|---|
| 414 | |
|---|
| 415 | if (exporter.success()) |
|---|
| 416 | return WriteResult::FILE_SAVED; |
|---|
| 417 | } |
|---|
| 418 | |
|---|
| 419 | return WriteResult::ERROR_IN_WRITING_FILE; |
|---|
| 420 | } |
|---|
| 421 | |
|---|
| 422 | virtual WriteResult writeImage (const osg::Image& img, std::ostream& os, const Options* options=NULL) const |
|---|
| 423 | { |
|---|
| 424 | std::string filename = "file.jpg"; |
|---|
| 425 | |
|---|
| 426 | if (options) { |
|---|
| 427 | std::istringstream iss(options->getOptionString()); |
|---|
| 428 | std::string opt; |
|---|
| 429 | while (iss >> opt) |
|---|
| 430 | { |
|---|
| 431 | int index = opt.find( "=" ); |
|---|
| 432 | if( opt.substr( 0, index ) == "filename" || |
|---|
| 433 | opt.substr( 0, index ) == "FILENAME" ) |
|---|
| 434 | { |
|---|
| 435 | filename = opt.substr( index+1 ); |
|---|
| 436 | } |
|---|
| 437 | } |
|---|
| 438 | } |
|---|
| 439 | |
|---|
| 440 | _qtExitObserver.init(); |
|---|
| 441 | |
|---|
| 442 | QuicktimeImportExport exporter; |
|---|
| 443 | exporter.writeToStream(os, const_cast<osg::Image*>(&img), filename); |
|---|
| 444 | |
|---|
| 445 | if (exporter.success()) |
|---|
| 446 | return WriteResult::FILE_SAVED; |
|---|
| 447 | |
|---|
| 448 | return WriteResult::ERROR_IN_WRITING_FILE; |
|---|
| 449 | } |
|---|
| 450 | |
|---|
| 451 | protected: |
|---|
| 452 | |
|---|
| 453 | |
|---|
| 454 | void registerQtReader() const |
|---|
| 455 | { |
|---|
| 456 | osgDB::Registry* r = osgDB::Registry::instance(); |
|---|
| 457 | r->addFileExtensionAlias("mov", "qt"); |
|---|
| 458 | |
|---|
| 459 | #ifdef QT_HANDLE_IMAGES_ALSO |
|---|
| 460 | r->addFileExtensionAlias("jpg", "qt"); |
|---|
| 461 | r->addFileExtensionAlias("jpe", "qt"); |
|---|
| 462 | r->addFileExtensionAlias("jpeg", "qt"); |
|---|
| 463 | r->addFileExtensionAlias("tif", "qt"); |
|---|
| 464 | r->addFileExtensionAlias("tiff", "qt"); |
|---|
| 465 | r->addFileExtensionAlias("gif", "qt"); |
|---|
| 466 | r->addFileExtensionAlias("png", "qt"); |
|---|
| 467 | r->addFileExtensionAlias("psd", "qt"); |
|---|
| 468 | r->addFileExtensionAlias("tga", "qt"); |
|---|
| 469 | r->addFileExtensionAlias("mov", "qt"); |
|---|
| 470 | r->addFileExtensionAlias("avi", "qt"); |
|---|
| 471 | r->addFileExtensionAlias("mpg", "qt"); |
|---|
| 472 | r->addFileExtensionAlias("mpv", "qt"); |
|---|
| 473 | r->addFileExtensionAlias("dv", "qt"); |
|---|
| 474 | r->addFileExtensionAlias("mp4", "qt"); |
|---|
| 475 | r->addFileExtensionAlias("m4v", "qt"); |
|---|
| 476 | #endif |
|---|
| 477 | } |
|---|
| 478 | |
|---|
| 479 | mutable QuicktimeInitializer _qtExitObserver; |
|---|
| 480 | }; |
|---|
| 481 | |
|---|
| 482 | |
|---|
| 483 | |
|---|
| 484 | REGISTER_OSGPLUGIN(quicktime, ReaderWriterQT) |
|---|