Main Page | Class Hierarchy | Compound List | File List | Compound Members

muvinomain.hpp

Go to the documentation of this file.
00001  /***********************************************************************
00002  *                                                                      *
00003  * MuViNo - ViTooKi Video Annotation Tool                               *
00004  *                                                                      *
00005  * title:   muvinomain.hpp                                          *
00006  *                                                                      *
00007  * $Id: muvinomain_8hpp-source.html,v 1.1 2004/09/27 07:24:50 mtaschwer Exp $
00008  *                                                                      *
00009  * ITEC institute of the University of Klagenfurt (Austria)             *
00010  * http://www.itec.uni-klu.ac.at                                        *
00011  *                                                                      *
00012  *                                                                      *
00013  * For more information visit the ViTooKi homepage:                     *
00014  * http://ViTooKi.sourceforge.net                                       *
00015  * vitooki-user@lists.sourceforge.net                                   *
00016  * vitooki-devel@lists.sourceforge.net                                  *
00017  *                                                                      *
00018  * This file is part of ViTooKi, a free video toolkit.                  *
00019  * ViTooKi is free software; you can redistribute it and/or             *
00020  * modify it under the terms of the GNU General Public License          *
00021  * as published by the Free Software Foundation; either version 2       *
00022  * of the License, or (at your option) any later version.               *
00023  *                                                                      *
00024  * This program is distributed in the hope that it will be useful,      *
00025  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
00026  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the         *
00027  * GNU General Public License for more details.                         *
00028  *                                                                      *
00029  * You should have received a copy of the GNU General Public License    *
00030  * along with this program; if not, write to the Free Software          *
00031  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,               *
00032  * MA  02111-1307, USA.                                                 *
00033  *                                                                      *
00034  ***********************************************************************/
00035 
00036 #ifndef MUVINOMAIN_H
00037 #define MUVINOMAIN_H
00038 
00137 #include <DataChannel.hpp>
00138 #include <ReferenceCounter.hpp>
00139 #include <adaptors/MP4Decoder.hpp>
00140 
00141 #include "muvinomaindlg.hpp"
00142 #include "MP7Doc.hpp"
00143 #include "MP7Time.hpp"
00144 
00145 class QApplication;
00146 class QTimer;
00147 class GlobalTimer;
00148 class ESSynchronizer;
00149 class SegmentSlider;
00150 
00158 class MuvinoMain : public MuvinoMainDlg  {
00159   Q_OBJECT
00160 
00161 public: 
00162   MuvinoMain();
00163   ~MuvinoMain();
00164 
00165 protected:
00172   void setCaptionFromFile(const QString &file = QString::null, bool modified = false);
00173 
00174   /* ----------------------- Event Handlers ----------------------------------------- */
00175 
00177   virtual void closeEvent(QCloseEvent * e);
00178 
00179   /* ----------------------- Menu Actions --------------------------------------- */
00180 
00181 public slots:
00182   virtual void fileNew();
00183   virtual void fileOpen();
00184   virtual void fileOpen(const QString &path);
00185   virtual void fileLoadVideo();
00186   virtual void fileLoadVideo(const QString &path);
00187   virtual void fileExit();
00188   virtual void fileSave();
00189   virtual void fileSaveAs();
00190 
00191 protected:
00192   void initMenuBar();
00193 
00194   /* ----------------------- Video Player Members --------------------------------- */
00195 
00196 public:
00212   bool loadVideo(const char *filename, const char *demuxDir,
00213          MP4Decoder::eColorSpace colorSpace);
00214 
00215 public slots:
00216   virtual void playerStart();
00217   virtual void playerStop();
00218   virtual void playerPlay();
00219   virtual void playerBack3s();
00220   virtual void setDisplayRateFromSlider(int value);
00221   virtual void playerAudioStateChange(int state);
00222 
00226   virtual void displayCurrentMediaTime(bool showSubSec = false);
00227 
00231   void closeVideo();
00232 
00241   bool playVideo(const MP7Time &time = MP7Time());
00242 
00243 signals:
00244   void currentMediaTimeEvent(const MP7Time &time);
00245 
00246  protected:
00250   void resetVideoDisplay();
00251 
00257   void stopAudio();
00258 
00264   void stopVideoAudio();
00265 
00270   void pauseVideoAudio();
00271 
00275   MP7Time videoDuration() const;
00276 
00281   MP7Time currentVideoTime() const;
00282 
00288   void setCurrentVideoTimeLabel(const MP7Time &time, bool showSubSec = false);
00289 
00293   void setDisplayRateSlider(double rate);
00294 
00295   /* ------------------ MP7Doc/MP7TreeView Methods ----------------------------------- */
00296 
00297 public:
00302   bool loadMP7Doc(const QString &filename);
00303 
00316   int checkMP7DocWithVideo();
00317   
00318 public slots:
00320   virtual void treeViewSelectItem(QListViewItem *item);
00321 
00325   virtual void mp7DocModificationChange(bool m);
00326 
00328   virtual void treeViewSetSelected(MP7ListViewItem *item);
00329 
00334   void treeViewClicked(QListViewItem *item);
00335 
00336 protected:
00338   void initMP7TreeView();
00339 
00347   bool warnAndSaveMP7Doc();
00348 
00352   void createMP7Doc(const MP7Time &duration);
00353 
00354   /* ------------------ MP7ElementValue Methods ------------------------------ */
00355 
00356 public slots:
00357   virtual void mp7ElementValueChange();
00358 
00359 protected:
00361   void resetMP7ElementValue();
00362 
00364   void disableMP7ElementValue(bool disable);
00365 
00366   /* ------------------ Segment Navigation Methods --------------------------- */
00367 
00368 public slots:
00373   void splitCurrentSegment();
00374 
00378   void setTitleImage();
00379 
00380 protected:
00382   void initSegmentNav();
00383 
00385   void resetSegmentNav();
00386 
00387   /* ------------------ Member Variables ------------------------------------- */
00388 
00389 private:
00391   static const QString caption;
00392 
00394   DataChannel *videoDC;
00395 
00397   DataChannel *audioDC;
00398 
00400   GlobalTimer *globalTimer;
00401 
00403   ReferenceCounter *globalTimerRefCnt;
00404 
00406   ESSynchronizer *essync;
00407 
00409   QTimer *mediaTimeUpdater;
00410 
00412   MP7Doc *doc;
00413 
00415   MP7ListViewItem *currentMP7Item;
00416 
00418   SegmentSlider *currentSlider;
00419 
00421   SegmentSlider *totalSlider;
00422 };
00423 
00424 #endif

Generated on Mon Sep 27 09:12:05 2004 for Muvino by doxygen 1.3.2