]> git.vomp.tv Git - vompclient.git/blob - vaudioselector.h
Replace TCP. Use new IP API only, getMAC works with if!=eth0
[vompclient.git] / vaudioselector.h
1 /*
2     Copyright 2006 Chris Tallon, Marten Richter
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, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef VAUDIOSELECTOR_H
21 #define VAUDIOSELECTOR_H
22
23 #include <string>
24 #include <vector>
25
26 #include "tbboxx.h"
27 #include "wselectlist.h"
28
29 class RecInfo;
30 class Channel;
31
32 #define PES_AUDIO_START 0xc0
33 #define PES_AUDIO_MAXCHANNELS 0x20
34 #define PES_AUDIO_AC3_MAXCHANNELS 0x08
35 #define PES_AUDIO_AC3_START 0x80
36 #define PES_DVBSUBTITLE_MAXCHANNELS 0x08
37 #define PES_DVBSUBTITLE_START 0x20
38
39 class AudioSubtitleChannel
40 {
41   public:
42     int type;
43     int pestype;
44     int streamtype;
45     std::string name;
46 };
47
48 typedef std::vector<AudioSubtitleChannel> AudioSubtitleChannelList;
49
50 class VAudioSelector : public TBBoxx
51 {
52   public:
53     VAudioSelector(void* parent, bool* availableMpegAudioChannels,                    // Recording mode
54                    bool* availableAc3AudioChannels, int currentAudioChannel,
55                    bool* availableSubtitleChannels,
56                    int* ttxtpages,
57                    int currentSubtitleChannel, int currentSubtitleType,
58                    RecInfo* recInfo);
59
60     VAudioSelector(void* tparent, Channel* channel, int currentAudioChannel,
61                    int currentSubtitleChannel, int currentSubtitletype, int* ttxtpages);      // Live mode
62
63     virtual ~VAudioSelector();
64
65     int handleCommand(int command);
66     void processMessage(Message* m);
67     void draw();
68
69   private:
70     WSelectList asl;
71     WSelectList ssl;
72
73     void* parent;
74     bool liveMode;
75     bool subtitles{};
76     bool editsubtitles{};
77
78     AudioSubtitleChannelList acl;
79     AudioSubtitleChannelList scl;
80 };
81
82 #endif