diff data/fileio/VideoFileReader.h @ 125:66af7c1b10d9

(none)
author ivand_qmul
date Mon, 22 Oct 2007 13:59:27 +0000
parents
children e63e8272dcb0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/fileio/VideoFileReader.h	Mon Oct 22 13:59:27 2007 +0000
@@ -0,0 +1,68 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*   
+	Sound Access
+		EASAIER client application.
+		Queen Mary 2007. Ivan Damnjanovic.
+
+	This program is free software; you can redistribute it and/or
+	modify it under the terms of the GNU General Public License as
+	published by the Free Software Foundation; either version 2 of the
+	License, or (at your option) any later version.  See the file
+	COPYING included with this distribution for more information.
+*/
+
+#ifndef _VIDEO_FILE_READER_H_
+#define _VIDEO_FILE_READER_H_
+
+#ifdef HAVE_FFMPEG
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "SDL_ffmpeg.h"
+
+#ifdef __cplusplus
+}
+#endif
+#include "../../sv/main/MainWindow.h"
+#include "CodedAudioFileReader.h"
+//#include "base/AudioCallbackPlaySource.h"
+
+
+#include <set>
+//class AudioCallbackPlaySource;
+class QProgressDialog;
+
+class VideoFileReader : public CodedAudioFileReader
+{
+public:
+    VideoFileReader(QString path, bool showProgress, CacheMode cacheMode);
+    virtual ~VideoFileReader();
+
+    virtual QString getError() const { return m_error; }
+
+    static void getSupportedExtensions(std::set<QString> &extensions);
+    
+protected:
+    QString m_path;
+    QString m_error;
+    size_t m_fileSize;
+    double m_bitrateNum;
+    size_t m_bitrateDenom;
+	SDL_Surface *screen;
+	SDL_ffmpegFile* film;
+    QProgressDialog *m_progress;
+    bool m_cancelled;	
+	
+	
+
+   
+    bool decodeAudio(SDL_ffmpegFile* file);
+	bool videoInit(SDL_ffmpegFile* file);
+	int videoPlay(); 
+	static int videoPlayCall(void*);
+};
+
+#endif
+
+#endif
\ No newline at end of file