]> git.vomp.tv Git - vompclient.git/blob - vdp6.h
Fix black background for 16:9 live TV on 4:3 screen
[vompclient.git] / vdp6.h
1 /*
2     Copyright 2019 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, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef VDP_H
21 #define VDP_H
22
23 #if IPV6
24
25 #include <thread>
26 #include <vector>
27
28 #include "defines.h"
29
30 struct VDRServer;
31
32 /*
33  * Until VDP is reorganised, getServers must be called after stop
34  * and the buffers pointed to by the VDRServer structs must be freed
35  * by the caller.
36  */
37
38 class VDP6
39 {
40   public:
41     VDP6();
42
43     void run();
44     void stop();
45     UINT numFound();
46     std::vector<VDRServer>* getServers() { return &servers; }
47
48   private:
49     int pfds[2];
50     int sock;
51     std::thread receiveThread;
52     std::vector<VDRServer> servers;
53 };
54
55 #endif
56
57
58
59 #endif