blob: 6ce2f1bd743e1e4cb7c2704cd54834c1d10f3738 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
/*!
* \file vdr_player.h
* \brief A player/control combination to let VDR play music
*
* \version $Revision: 1.2 $
* \date $Date: 2004/05/28 15:29:19 $
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
* \author Responsible author: $Author: lvw $
*
* $Id: vdr_player.h,v 1.2 2004/05/28 15:29:19 lvw Exp $
*
* Adapted from
* MP3/MPlayer plugin to VDR (C++)
* (C) 2001,2002 Stefan Huelswitt <huels@iname.com>
*/
#ifndef ___DVB_MP3_H
#define ___DVB_MP3_H
#include <player.h>
// -------------------------------------------------------------------
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
{
private:
//! \brief the reference to the player
mgPCMPlayer *m_player;
//! \brief indicates, whether the osd should be visible
bool m_visible;
//! \brief indicates, whether an osd is currently displayed
bool m_has_osd;
public:
/*! \brief construct a control with a playlist
*
* \param plist - the playlist to be played
*/
mgPlayerControl(mgPlaylist *plist);
/*! \brief destructor
*/
virtual ~mgPlayerControl();
//! \brief indicate, whether the corresponding player is active
bool Active();
//! \brief stop the corresponding player
void Stop();
//! \brief toggle the pause mode of the corresponding player
void Pause();
//! \brief start playing
void Play();
//! \brief skip to the next song
void Forward();
//! \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 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 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
*/
void NewPlaylist( mgPlaylist *plist );
//! \brief a progress display
void ShowProgress();
//! \brief hide the osd, if present
void Hide();
//! \brief process key events
eOSState ProcessKey(eKeys key);
};
#endif //___DVB_MP3_H
/************************************************************
*
* $Log: vdr_player.h,v $
* Revision 1.2 2004/05/28 15:29:19 lvw
* Merged player branch back on HEAD branch.
*
* Revision 1.1.2.9 2004/05/25 06:48:24 lvw
* Documentation and code polishing.
*
* Revision 1.1.2.8 2004/05/25 00:10:45 lvw
* Code cleanup and added use of real database source files
*
* Revision 1.1.2.7 2004/05/11 06:35:16 lvw
* Added debugging while hunting stop bug.
*
* Revision 1.1.2.6 2004/05/07 06:46:41 lvw
* Removed a bug in playlist deallocation. Added infrastructure to display information while playing.
*
*
***********************************************************/
|