comparison data/fileio/VideoFileReaderFactory.cpp @ 192:709777a471c3

window compilation (add HAVE_VIDEO)
author lbajardsilogic
date Wed, 28 Nov 2007 14:52:28 +0000
parents be6d31baecb9
children
comparison
equal deleted inserted replaced
191:be6d31baecb9 192:709777a471c3
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifdef HAVE_FFMPEG 16 #ifdef HAVE_VIDEO
17 17
18 #include <iostream> 18 #include <iostream>
19 #include <set> 19 #include <set>
20 20
21 #include <QString> 21 #include <QString>
22 #include <QFileInfo> 22 #include <QFileInfo>
23 23
24 #ifdef HAVE_FFMPEG
24 #include "VideoFileReader.h" 25 #include "VideoFileReader.h"
26 #endif
25 27
26 #include "VideoFileReaderFactory.h" 28 #include "VideoFileReaderFactory.h"
27 29
28 QString 30 QString
29 VideoFileReaderFactory::getKnownExtensions() 31 VideoFileReaderFactory::getKnownExtensions()
30 { 32 {
31 std::set<QString> extensions; 33 std::set<QString> extensions;
32 34
35 #ifdef HAVE_FFMPEG
33 VideoFileReader::getSupportedExtensions(extensions); 36 VideoFileReader::getSupportedExtensions(extensions);
37 #endif
34 38
35 QString rv; 39 QString rv;
36 for (std::set<QString>::const_iterator i = extensions.begin(); 40 for (std::set<QString>::const_iterator i = extensions.begin();
37 i != extensions.end(); ++i) { 41 i != extensions.end(); ++i) {
38 if (i != extensions.begin()) rv += " "; 42 if (i != extensions.begin()) rv += " ";
45 bool VideoFileReaderFactory::isKnownExtensions(QString &extension) 49 bool VideoFileReaderFactory::isKnownExtensions(QString &extension)
46 { 50 {
47 bool isKnown = false; 51 bool isKnown = false;
48 52
49 std::set<QString> extensions; 53 std::set<QString> extensions;
50 54 #ifdef HAVE_FFMPEG
51 VideoFileReader::getSupportedExtensions(extensions); 55 VideoFileReader::getSupportedExtensions(extensions);
52 56 #endif
53 std::set<QString>::iterator iter = extensions.find(extension); 57 std::set<QString>::iterator iter = extensions.find(extension);
54 58
55 if (iter != extensions.end()) 59 if (iter != extensions.end())
56 { 60 {
57 isKnown = true; 61 isKnown = true;
115 119
116 return 0; 120 return 0;
117 } 121 }
118 */ 122 */
119 #endif 123 #endif
124