diff options
Diffstat (limited to 'vdr_player.h')
-rw-r--r-- | vdr_player.h | 167 |
1 files changed, 83 insertions, 84 deletions
diff --git a/vdr_player.h b/vdr_player.h index e87d577..5b8ea9f 100644 --- a/vdr_player.h +++ b/vdr_player.h @@ -9,16 +9,16 @@ * * $Id$ * - * Adapted from + * Adapted from * MP3/MPlayer plugin to VDR (C++) * (C) 2001,2002 Stefan Huelswitt <huels@iname.com> */ - #ifndef ___VDR_PLAYER_H #define ___VDR_PLAYER_H #include <player.h> +#include "mg_db.h" #if VDRVERSNUM >= 10307 class cOsd; #endif @@ -26,125 +26,124 @@ class cOsd; // ------------------------------------------------------------------- class mgPCMPlayer; -class mgPlaylist; // ------------------------------------------------------------------- -/*! +/*! * \brief exerts control over the player itself * * This control is launched from the main menu and manages a link * to the player. Key events are caught and signaled to the player. */ -class mgPlayerControl : public cControl +class mgPlayerControl:public cControl { -private: + private: - //! \brief the reference to the player - mgPCMPlayer *player; +//! \brief the reference to the player + mgPCMPlayer * player; - //! \brief indicates, whether the osd should be visible - int m_visible; +//! \brief indicates, whether the osd should be visible + bool m_visible; - //! \brief indicates, whether an osd is currently displayed - bool m_has_osd; +//! \brief indicates, whether an osd is currently displayed + bool m_has_osd; - //! \brief indicates, whether the osd displays a track view (true) or a playlist view (false) - int m_track_view; - - //! \brief indicates, whether the osd presents progress (true) or detail information (false) - int m_progress_view; + bool m_track_view; + bool m_progress_view; #if VDRVERSNUM >= 10307 - //! \brief a replay display to show the progress during playback - cSkinDisplayReplay *m_display; - cSkinDisplayMenu *m_menu; +//! \brief a replay display to show the progress during playback + cSkinDisplayReplay *m_display; + cSkinDisplayMenu *m_menu; - cOsd *osd; - const cFont *font; + cOsd *osd; + const cFont *font; #endif - //! \brief Last Message for Statusmonitor - char* m_szLastShowStatusMsg; +//! \brief Last Message for Statusmonitor + char *m_szLastShowStatusMsg; -public: + public: - /*! \brief construct a control with a playlist - * - * \param plist - the playlist to be played - * \param first - the index where to start the playlist - */ - mgPlayerControl(mgPlaylist *plist, unsigned first); +/*! \brief construct a control with a playlist + * + * \param plist - the playlist to be played + */ + mgPlayerControl (mgSelection * plist); - /*! \brief destructor - */ - virtual ~mgPlayerControl(); +/*! \brief destructor + */ + virtual ~ mgPlayerControl (); - //! \brief indicate, whether the corresponding player is active - bool Active(); +//! \brief indicate whether the corresponding player is active + bool Active (); - //! \brief stop the corresponding player - void Stop(); +//! \brief stop the corresponding player + void Stop (); - //! \brief toggle the pause mode of the corresponding player - void Pause(); +//! \brief toggle the pause mode of the corresponding player + void Pause (); - //! \brief start playing - void Play(); +//! \brief start playing + void Play (); - //! \brief skip to the next song - void Forward(); +//! \brief skip to the next song + void Forward (); - //! \brief skip to the previous song - void Backward(); +//! \brief skip to the previous song + void Backward (); - /*! \brief skip a specified number of seconds - * - * \param seconds - the number of seconds to skip - */ - void SkipSeconds(int seconds); +/*! \brief skip a specified number of seconds + * + * \param seconds - the number of seconds to skip + */ + void SkipSeconds (int seconds); - /*! \brief goto a certain position in the playlist - * - * \param index - the position in the playlist to skip to - * \param still - currently unused - */ - void Goto(int index, bool still = false); +/*! \brief goto a certain position in the playlist + * + * \param index - the position in the playlist to skip to + * \param still - currently unused + */ + void Goto (int index, bool still = false); - //! \brief toggle the shuffle mode of the corresponding player - void ToggleShuffle(); +//! \brief toggle the shuffle mode of the corresponding player + void ToggleShuffle (); - //! \brief toggle the loop mode of the corresponding player - void ToggleLoop(); +//! \brief toggle the loop mode of the corresponding player + void ToggleLoop (); - /*! \brief signal a new playlist - * - * The caller has to take care of deallocating the previous list - * - * \param plist - the new playlist to be played - * \param first - the index where to start the playlist - */ - void NewPlaylist( mgPlaylist *plist, unsigned start ); + /*! \brief tell the player to reload the play list. + * This is needed if we play a collection + * and the user changed the collection while playing it + */ + void ReloadPlaylist(); - //! \brief a progress display - void ShowProgress(); +/*! \brief signal a new playlist + * + * The caller has to take care of deallocating the previous list + * + * \param plist - the new playlist to be played + */ + void NewPlaylist (mgSelection * plist); - void Display(); +//! \brief a progress display + void ShowProgress (); - void ShowContents(); + void Display (); - //! \brief hide the osd, if present - void Hide(); + void ShowContents (); - //! \brief hide the osd, if present - void InternalHide(); +//! \brief hide the osd, if present + void Hide (); - //! \brief process key events - eOSState ProcessKey(eKeys key); +//! \brief hide the osd, if present + void InternalHide (); -protected: - //! \brief signal a played file to any cStatusMonitor inside vdr - void StatusMsgReplaying(); -}; +//! \brief process key events + eOSState ProcessKey (eKeys key); -#endif //___VDR_PLAYER_H + protected: +//! \brief signal a played file to any cStatusMonitor inside vdr + void StatusMsgReplaying (); +}; +#endif //___VDR_PLAYER_H |