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