ivand_qmul@125: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ ivand_qmul@125: ivand_qmul@125: /* ivand_qmul@125: Sound Access ivand_qmul@125: EASAIER client application. ivand_qmul@125: Queen Mary 2007. Ivan Damnjanovic. ivand_qmul@125: ivand_qmul@125: This program is free software; you can redistribute it and/or ivand_qmul@125: modify it under the terms of the GNU General Public License as ivand_qmul@125: published by the Free Software Foundation; either version 2 of the ivand_qmul@125: License, or (at your option) any later version. See the file ivand_qmul@125: COPYING included with this distribution for more information. ivand_qmul@125: */ ivand_qmul@125: ivand_qmul@125: #ifndef _VIDEO_FILE_READER_H_ ivand_qmul@125: #define _VIDEO_FILE_READER_H_ ivand_qmul@125: ivand_qmul@125: #ifdef HAVE_FFMPEG ivand_qmul@125: #ifdef __cplusplus ivand_qmul@125: extern "C" { ivand_qmul@125: #endif ivand_qmul@125: #include "SDL_ffmpeg.h" ivand_qmul@125: ivand_qmul@125: #ifdef __cplusplus ivand_qmul@125: } ivand_qmul@125: #endif ivand_qmul@125: #include "../../sv/main/MainWindow.h" ivand_qmul@125: #include "CodedAudioFileReader.h" ivand_qmul@125: //#include "base/AudioCallbackPlaySource.h" ivand_qmul@125: ivand_qmul@125: ivand_qmul@125: #include ivand_qmul@125: //class AudioCallbackPlaySource; ivand_qmul@125: class QProgressDialog; ivand_qmul@125: ivand_qmul@125: class VideoFileReader : public CodedAudioFileReader ivand_qmul@125: { ivand_qmul@125: public: ivand_qmul@125: VideoFileReader(QString path, bool showProgress, CacheMode cacheMode); ivand_qmul@125: virtual ~VideoFileReader(); ivand_qmul@125: ivand_qmul@125: virtual QString getError() const { return m_error; } ivand_qmul@125: ivand_qmul@125: static void getSupportedExtensions(std::set &extensions); ivand_qmul@125: ivand_qmul@125: protected: ivand_qmul@125: QString m_path; ivand_qmul@125: QString m_error; ivand_qmul@125: size_t m_fileSize; ivand_qmul@125: double m_bitrateNum; ivand_qmul@125: size_t m_bitrateDenom; ivand_qmul@125: SDL_Surface *screen; ivand_qmul@125: SDL_ffmpegFile* film; ivand_qmul@125: QProgressDialog *m_progress; ivand_qmul@125: bool m_cancelled; ivand_qmul@125: ivand_qmul@125: ivand_qmul@125: ivand_qmul@125: ivand_qmul@125: bool decodeAudio(SDL_ffmpegFile* file); ivand_qmul@125: bool videoInit(SDL_ffmpegFile* file); ivand_qmul@125: int videoPlay(); ivand_qmul@125: static int videoPlayCall(void*); ivand_qmul@125: }; ivand_qmul@125: ivand_qmul@125: #endif ivand_qmul@125: ivand_qmul@125: #endif