Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

xinecontrol.h

Go to the documentation of this file.
00001 /*
00002                             This file is part of the Opie Project
00003 
00004                              Copyright (c)  2002 Max Reiss <harlekin@handhelds.org>
00005                              Copyright (c)  2002 L. Potter <ljp@llornkcor.com>
00006                              Copyright (c)  2002 Holger Freyther <zecke@handhelds.org>
00007               =.
00008             .=l.
00009            .>+-=
00010  _;:,     .>    :=|.         This program is free software; you can
00011 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00012 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00013 .="- .-=="i,     .._         License as published by the Free Software
00014  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00015      ._= =}       :          or (at your option) any later version.
00016     .%`+i>       _;_.
00017     .i_,=:_.      -<s.       This program is distributed in the hope that
00018      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00019     : ..    .:,     . . .    without even the implied warranty of
00020     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00021   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00022 ..}^=.=       =       ;      General Public License for more
00023 ++=   -.     .`     .:       details.
00024  :     =  ...= . :.=-
00025  -.   .:....=;==+<;          You should have received a copy of the GNU
00026   -_. . .   )=.  =           General Public License along with
00027     --        :-=`           this library; see the file COPYING.LIB.
00028                              If not, write to the Free Software Foundation,
00029                              Inc., 59 Temple Place - Suite 330,
00030                              Boston, MA 02111-1307, USA.
00031 
00032 */
00033 
00034 #ifndef XINECONTROL_H
00035 #define XINECONTROL_H
00036 
00037 #include "lib.h"
00038 
00039 #include "mediaplayerstate.h"
00040 
00041 class XineControl : public QObject  {
00042     Q_OBJECT
00043 public:
00044     // note that this constructor takes over ownership of the passed
00045     // XINE::Lib object.
00046     XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, 
00047                  MediaPlayerState &_mediaPlayerState, 
00048                  QObject *parent = 0, const char *name =0 );
00049     ~XineControl();
00050 
00051     bool hasVideo() const { return hasVideoChannel; }
00052     bool hasAudio() const { return hasAudioChannel; }
00053 
00054 public slots:
00055     void play( const QString& fileName );
00056     void stop( bool );
00057 
00062     void pause( bool );
00063 
00068     void setFullscreen( bool );
00069 
00073     long currentTime();
00074     void seekTo( long );
00075     // get length of media file and set it
00076     void length();
00077     long position();
00078 
00082     void nextMedia();
00083 
00087     QString getMetaInfo();
00088 
00093     QString getErrorCode();
00094 
00095 
00096     void videoResized ( const QSize &s );
00097 
00102     void setGamma( int );
00103 
00104 private:
00105     void init();
00106 
00107     XINE::Lib *libXine;
00108     long m_currentTime;
00109     long m_position;
00110     int m_length;
00111     QString m_fileName;
00112     bool disabledSuspendScreenSaver : 1;
00113     bool hasVideoChannel : 1;
00114     bool hasAudioChannel : 1;
00115     MediaPlayerState &mediaPlayerState;
00116     XineVideoWidget *xineVideoWidget;
00117     bool m_wasError : 1; // used for chaeting on the metainfo
00118 
00119 signals:
00120     void positionChanged( long );
00121 };
00122 
00123 
00124 #endif

Generated on Sat Nov 5 16:17:33 2005 for OPIE by  doxygen 1.4.2