Mercurial > hg > easaier-soundaccess
annotate data/fileio/VideoFileReader.h @ 125:66af7c1b10d9
(none)
author | ivand_qmul |
---|---|
date | Mon, 22 Oct 2007 13:59:27 +0000 |
parents | |
children | e63e8272dcb0 |
rev | line source |
---|---|
ivand_qmul@125 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
ivand_qmul@125 | 2 |
ivand_qmul@125 | 3 /* |
ivand_qmul@125 | 4 Sound Access |
ivand_qmul@125 | 5 EASAIER client application. |
ivand_qmul@125 | 6 Queen Mary 2007. Ivan Damnjanovic. |
ivand_qmul@125 | 7 |
ivand_qmul@125 | 8 This program is free software; you can redistribute it and/or |
ivand_qmul@125 | 9 modify it under the terms of the GNU General Public License as |
ivand_qmul@125 | 10 published by the Free Software Foundation; either version 2 of the |
ivand_qmul@125 | 11 License, or (at your option) any later version. See the file |
ivand_qmul@125 | 12 COPYING included with this distribution for more information. |
ivand_qmul@125 | 13 */ |
ivand_qmul@125 | 14 |
ivand_qmul@125 | 15 #ifndef _VIDEO_FILE_READER_H_ |
ivand_qmul@125 | 16 #define _VIDEO_FILE_READER_H_ |
ivand_qmul@125 | 17 |
ivand_qmul@125 | 18 #ifdef HAVE_FFMPEG |
ivand_qmul@125 | 19 #ifdef __cplusplus |
ivand_qmul@125 | 20 extern "C" { |
ivand_qmul@125 | 21 #endif |
ivand_qmul@125 | 22 #include "SDL_ffmpeg.h" |
ivand_qmul@125 | 23 |
ivand_qmul@125 | 24 #ifdef __cplusplus |
ivand_qmul@125 | 25 } |
ivand_qmul@125 | 26 #endif |
ivand_qmul@125 | 27 #include "../../sv/main/MainWindow.h" |
ivand_qmul@125 | 28 #include "CodedAudioFileReader.h" |
ivand_qmul@125 | 29 //#include "base/AudioCallbackPlaySource.h" |
ivand_qmul@125 | 30 |
ivand_qmul@125 | 31 |
ivand_qmul@125 | 32 #include <set> |
ivand_qmul@125 | 33 //class AudioCallbackPlaySource; |
ivand_qmul@125 | 34 class QProgressDialog; |
ivand_qmul@125 | 35 |
ivand_qmul@125 | 36 class VideoFileReader : public CodedAudioFileReader |
ivand_qmul@125 | 37 { |
ivand_qmul@125 | 38 public: |
ivand_qmul@125 | 39 VideoFileReader(QString path, bool showProgress, CacheMode cacheMode); |
ivand_qmul@125 | 40 virtual ~VideoFileReader(); |
ivand_qmul@125 | 41 |
ivand_qmul@125 | 42 virtual QString getError() const { return m_error; } |
ivand_qmul@125 | 43 |
ivand_qmul@125 | 44 static void getSupportedExtensions(std::set<QString> &extensions); |
ivand_qmul@125 | 45 |
ivand_qmul@125 | 46 protected: |
ivand_qmul@125 | 47 QString m_path; |
ivand_qmul@125 | 48 QString m_error; |
ivand_qmul@125 | 49 size_t m_fileSize; |
ivand_qmul@125 | 50 double m_bitrateNum; |
ivand_qmul@125 | 51 size_t m_bitrateDenom; |
ivand_qmul@125 | 52 SDL_Surface *screen; |
ivand_qmul@125 | 53 SDL_ffmpegFile* film; |
ivand_qmul@125 | 54 QProgressDialog *m_progress; |
ivand_qmul@125 | 55 bool m_cancelled; |
ivand_qmul@125 | 56 |
ivand_qmul@125 | 57 |
ivand_qmul@125 | 58 |
ivand_qmul@125 | 59 |
ivand_qmul@125 | 60 bool decodeAudio(SDL_ffmpegFile* file); |
ivand_qmul@125 | 61 bool videoInit(SDL_ffmpegFile* file); |
ivand_qmul@125 | 62 int videoPlay(); |
ivand_qmul@125 | 63 static int videoPlayCall(void*); |
ivand_qmul@125 | 64 }; |
ivand_qmul@125 | 65 |
ivand_qmul@125 | 66 #endif |
ivand_qmul@125 | 67 |
ivand_qmul@125 | 68 #endif |