Logo
  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

mmsdvd.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider,             *
00003  *                           Matthias Hardt, Guido Madaus                  *
00004  *                                                                         *
00005  *   Copyright (C) 2007-2008 BerLinux Solutions GbR                        *
00006  *                           Stefan Schwarzer & Guido Madaus               *
00007  *                                                                         *
00008  *   Copyright (C) 2009-2013 BerLinux Solutions GmbH                       *
00009  *                                                                         *
00010  *   Authors:                                                              *
00011  *      Stefan Schwarzer   <stefan.schwarzer@diskohq.org>,                 *
00012  *      Matthias Hardt     <matthias.hardt@diskohq.org>,                   *
00013  *      Jens Schneider     <jens.schneider@diskohq.org>,                   *
00014  *      Guido Madaus       <guido.madaus@diskohq.org>,                     *
00015  *      Patrick Helterhoff <patrick.helterhoff@diskohq.org>,               *
00016  *      René Bählkow       <rene.baehlkow@diskohq.org>                     *
00017  *                                                                         *
00018  *   This library is free software; you can redistribute it and/or         *
00019  *   modify it under the terms of the GNU Lesser General Public            *
00020  *   License version 2.1 as published by the Free Software Foundation.     *
00021  *                                                                         *
00022  *   This library is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00025  *   Lesser General Public License for more details.                       *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU Lesser General Public      *
00028  *   License along with this library; if not, write to the                 *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
00031  **************************************************************************/
00032 
00033 #ifndef MMSDVD_H_
00034 #define MMSDVD_H_
00035 
00036 #include "mmsmedia/mmsav.h"
00037 
00038 /**
00039  * @brief   Handles DVD playback.
00040  *
00041  * @ingroup     mmsmedia
00042  *
00043  * @author      Stefan Schwarzer (stefan.schwarzer@diskohq.org)
00044  * @author      Matthias Hardt (matthias.hardt@diskohq.org)
00045  * @author      Jens Schneider (pupeider@gmx.de)
00046  * @author      Guido Madaus (guido.madaus@diskohq.org)
00047  * @author      Patrick Helterhoff (patrick.helterhoff@diskohq.org)
00048  * @author      René Bählkow (rene.baehlkow@diskohq.org)
00049  *
00050  * This class is derived from MMSAV and specialized in
00051  * handling DVD playback.
00052  */
00053 class MMSDVD : public MMSAV {
00054     private:
00055         string          device;             /**< dvd device to use                      */
00056         int             audioChannel,       /**< current audio channel                  */
00057                         spuChannel;         /**< current subtitle channel               */
00058         int             maxAudioChannels,   /**< number of available audio channels     */
00059                         maxSpuChannels;     /**< number of available subtitle channels  */
00060         unsigned int    windowWidth,        /**< width of given video window            */
00061                         windowHeight;       /**< height of given video window           */
00062 
00063         void checkDevice(const string device);
00064         void initialize(MMSWindow *window, const string device, const bool verbose);
00065 
00066         void mouseEvent(const unsigned int event, const unsigned int x, const unsigned int y) const;
00067 
00068 #ifdef __HAVE_GSTREAMER__
00069 #endif
00070 #ifdef __HAVE_XINE__
00071         void xineOpen();
00072 #endif
00073 
00074     protected:
00075 
00076     public:
00077         /* status constants */
00078         static const unsigned short STATUS_PREVIOUS                 =  100;     /**< playing previous chapter           */
00079         static const unsigned short STATUS_NEXT                     =  101;     /**< playing next chapter               */
00080         static const unsigned short STATUS_EJECT                    =  102;     /**< ejecting DVD                       */
00081         static const unsigned short STATUS_ANGLE_PREVIOUS           =  103;     /**< setting previous angle             */
00082         static const unsigned short STATUS_ANGLE_NEXT               =  104;     /**< setting next angle                 */
00083         static const unsigned short STATUS_AUDIO_PREVIOUS           =  105;     /**< using previous audio channel       */
00084         static const unsigned short STATUS_AUDIO_NEXT               =  106;     /**< using next audio channel           */
00085         static const unsigned short STATUS_SPU_PREVIOUS             =  107;     /**< using previous subtitle channel    */
00086         static const unsigned short STATUS_SPU_NEXT                 =  108;     /**< using next subtitle channel        */
00087 
00088 
00089         MMSDVD(MMSWindow *window, const string device = "/dev/dvd", const bool verbose = false);
00090         ~MMSDVD();
00091 
00092         void startPlaying(const bool cont = true);
00093         void rewind();
00094         void previous();
00095         void next();
00096         void anglePrevious();
00097         void angleNext();
00098         void audioChannelPrevious();
00099         void audioChannelNext();
00100         void spuChannelPrevious();
00101         void spuChannelNext();
00102 
00103         void eject();
00104 
00105         void menuUp();
00106         void menuDown();
00107         void menuLeft();
00108         void menuRight();
00109         void menuSelect();
00110         void showMainMenu();
00111         bool inMenu();
00112 
00113         void mouseButton(const unsigned int x, const unsigned int y) const;
00114         void mouseMove(const unsigned int x, const unsigned int y) const;
00115 
00116         /* get DVD information */
00117         string getTitle();
00118         int    getChapterNumber();
00119         int    getChapterCount();
00120         int    getTitleNumber();
00121         int    getTitleCount();
00122 
00123         void   updateChannelInfo();
00124 };
00125 
00126 #endif /*MMSDVD_H_*/

Generated by doxygen