Mercurial > hg > svcore
comparison data/fileio/OggVorbisFileReader.h @ 316:3a6725f285d6
* Make RemoteFile far more pervasive, and use it for local files as well
so that we can handle both transparently. Make it shallow copy with
reference counting, so it can be used by value without having to worry
about the cache file lifetime. Use RemoteFile for MainWindow file-open
functions, etc
author | Chris Cannam |
---|---|
date | Thu, 18 Oct 2007 15:31:20 +0000 |
parents | c022976d18e8 |
children | c324d410b096 |
comparison
equal
deleted
inserted
replaced
315:96ef9746c560 | 316:3a6725f285d6 |
---|---|
35 enum DecodeMode { | 35 enum DecodeMode { |
36 DecodeAtOnce, // decode the file on construction, with progress dialog | 36 DecodeAtOnce, // decode the file on construction, with progress dialog |
37 DecodeThreaded // decode in a background thread after construction | 37 DecodeThreaded // decode in a background thread after construction |
38 }; | 38 }; |
39 | 39 |
40 OggVorbisFileReader(QString path, | 40 OggVorbisFileReader(RemoteFile source, |
41 DecodeMode decodeMode, | 41 DecodeMode decodeMode, |
42 CacheMode cacheMode, | 42 CacheMode cacheMode, |
43 size_t targetRate = 0); | 43 size_t targetRate = 0); |
44 virtual ~OggVorbisFileReader(); | 44 virtual ~OggVorbisFileReader(); |
45 | 45 |
46 virtual QString getError() const { return m_error; } | 46 virtual QString getError() const { return m_error; } |
47 | 47 |
48 virtual QString getTitle() const { return m_title; } | 48 virtual QString getTitle() const { return m_title; } |
49 | 49 |
50 static void getSupportedExtensions(std::set<QString> &extensions); | 50 static void getSupportedExtensions(std::set<QString> &extensions); |
51 static bool supportsExtension(QString ext); | |
52 static bool supportsContentType(QString type); | |
53 static bool supports(RemoteFile &source); | |
51 | 54 |
52 virtual int getDecodeCompletion() const { return m_completion; } | 55 virtual int getDecodeCompletion() const { return m_completion; } |
53 | 56 |
54 virtual bool isUpdating() const { | 57 virtual bool isUpdating() const { |
55 return m_decodeThread && m_decodeThread->isRunning(); | 58 return m_decodeThread && m_decodeThread->isRunning(); |
56 } | 59 } |
57 | 60 |
58 protected: | 61 protected: |
62 RemoteFile m_source; | |
59 QString m_path; | 63 QString m_path; |
60 QString m_error; | 64 QString m_error; |
61 QString m_title; | 65 QString m_title; |
62 | 66 |
63 OGGZ *m_oggz; | 67 OGGZ *m_oggz; |