]> git.vomp.tv Git - vompclient.git/blob - playerradio.h
Mods to get 250k on first packet for demuxer.scan
[vompclient.git] / playerradio.h
1 /*
2     Copyright 2004-2005 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef PLAYERRADIO_H
22 #define PLAYERRADIO_H
23
24 #include <stdio.h>
25
26 #include "player.h"
27 #include "audio.h"
28 #include "afeedr.h"
29 #include "remote.h"
30 #include "thread.h"
31 #include "vdr.h"
32 #include "callback.h"
33 #include "stream.h"
34
35 class PlayerRadio : public Player
36 {
37   public:
38     PlayerRadio();
39     virtual ~PlayerRadio();
40
41     int init();
42     int shutdown();
43
44     int play();
45     void stop();
46     void togglePause();
47     void toggleFastForward();
48     void toggleFastBackward();
49     void jumpToPercent(int percent);
50     void skipForward();
51     void skipBackward();
52     void call(); // for callback interface
53     void setPosition(ULLONG position);
54     void setLength(ULLONG length);
55
56     void threadMethod();
57
58     void skipForward(int) {};
59     void skipBackward(int) {};
60     void test() {};
61     void test2() {};
62
63   private:
64     Stream stream;
65     AFeedR afeedr;
66     ULLONG feedPosition;
67     UCHAR feedMode;
68     const static UCHAR MODE_NORMAL = 1;
69     const static UCHAR MODE_BACKWARDS = 2;
70     const static UINT blockSize = 2000;
71
72     UCHAR playing;    // As in not stopped, (playing && paused) can == TRUE
73     UCHAR paused;     // Must be in playing state as well
74     UCHAR ffwd;       // Must be in playing state as well
75     UCHAR fbwd;       // Must be in playing state as well
76 };
77
78 #endif