Mercurial > hg > svcore
comparison data/fileio/QuickTimeFileReader.cpp @ 742:c10cb8782576 coreaudio_tests
Merge from branch "default"
author | Chris Cannam |
---|---|
date | Sun, 01 Jul 2012 11:53:00 +0100 |
parents | 3b00c1650490 |
children | e802e550a1f2 |
comparison
equal
deleted
inserted
replaced
666:4efa7429cd85 | 742:c10cb8782576 |
---|---|
64 m_channelCount = 0; | 64 m_channelCount = 0; |
65 m_fileRate = 0; | 65 m_fileRate = 0; |
66 | 66 |
67 Profiler profiler("QuickTimeFileReader::QuickTimeFileReader", true); | 67 Profiler profiler("QuickTimeFileReader::QuickTimeFileReader", true); |
68 | 68 |
69 std::cerr << "QuickTimeFileReader: path is \"" << m_path.toStdString() << "\"" << std::endl; | 69 SVDEBUG << "QuickTimeFileReader: path is \"" << m_path << "\"" << endl; |
70 | 70 |
71 long QTversion; | 71 long QTversion; |
72 | 72 |
73 #ifdef WIN32 | 73 #ifdef WIN32 |
74 InitializeQTML(0); // FIXME should check QT version | 74 InitializeQTML(0); // FIXME should check QT version |
87 | 87 |
88 // CFStringRef URLString = CFStringCreateWithCString | 88 // CFStringRef URLString = CFStringCreateWithCString |
89 // (0, m_path.toLocal8Bit().data(), 0); | 89 // (0, m_path.toLocal8Bit().data(), 0); |
90 | 90 |
91 | 91 |
92 QByteArray ba = m_path.toLocal8Bit(); | |
93 | |
92 CFURLRef url = CFURLCreateFromFileSystemRepresentation | 94 CFURLRef url = CFURLCreateFromFileSystemRepresentation |
93 (kCFAllocatorDefault, | 95 (kCFAllocatorDefault, |
94 (const UInt8 *)m_path.toLocal8Bit().data(), | 96 (const UInt8 *)ba.data(), |
95 (CFIndex)m_path.length(), | 97 (CFIndex)ba.length(), |
96 false); | 98 false); |
97 | 99 |
98 | 100 |
99 // m_d->err = QTNewDataReferenceFromURLCFString | 101 // m_d->err = QTNewDataReferenceFromURLCFString |
100 m_d->err = QTNewDataReferenceFromCFURL | 102 m_d->err = QTNewDataReferenceFromCFURL |
263 m_decodeThread = new DecodeThread(this); | 265 m_decodeThread = new DecodeThread(this); |
264 m_decodeThread->start(); | 266 m_decodeThread->start(); |
265 } | 267 } |
266 } | 268 } |
267 | 269 |
268 std::cerr << "QuickTimeFileReader::QuickTimeFileReader: frame count is now " << getFrameCount() << ", error is \"\"" << m_error.toStdString() << "\"" << std::endl; | 270 std::cerr << "QuickTimeFileReader::QuickTimeFileReader: frame count is now " << getFrameCount() << ", error is \"\"" << m_error << "\"" << std::endl; |
269 } | 271 } |
270 | 272 |
271 QuickTimeFileReader::~QuickTimeFileReader() | 273 QuickTimeFileReader::~QuickTimeFileReader() |
272 { | 274 { |
273 std::cerr << "QuickTimeFileReader::~QuickTimeFileReader" << std::endl; | 275 SVDEBUG << "QuickTimeFileReader::~QuickTimeFileReader" << endl; |
274 | 276 |
275 if (m_decodeThread) { | 277 if (m_decodeThread) { |
276 m_cancelled = true; | 278 m_cancelled = true; |
277 m_decodeThread->wait(); | 279 m_decodeThread->wait(); |
278 delete m_decodeThread; | 280 delete m_decodeThread; |