3 * Copyright (C) 2016-2020 William Morrow
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 // as of 2020/01/06 using kernel version 5.3.16
24 // a patch is needed for: drivers/media/usb/em28xx/em28xx-rc.ko
25 // prototype in thirdparty/src/em28xx-input.patch1
29 #include "remotecontrol.h"
37 #define WTV_HOME 0x0162
38 #define WTV_BACK 0x00ae
39 #define WTV_MENU 0x008b
41 #define WTV_POWER 0x0074
42 #define WTV_VOLUP 0x0073
43 #define WTV_VOLDN 0x0072
44 #define WTV_CH_UP 0x0192
45 #define WTV_CH_DN 0x0193
55 #define WTV_TEXT 0x0184
58 #define WTV_BOX 0x0080
59 #define WTV_START 0x0195
60 #define WTV_REV 0x00a8
61 #define WTV_STOP 0x0077
62 #define WTV_PLAY 0x00cf
63 #define WTV_FWD 0x00d0
64 #define WTV_END 0x0197
65 #define WTV_MUTE 0x0071
66 #define WTV_PREV 0x019c
67 #define WTV_RED 0x00a7
71 class WinTV : public Thread
74 WinTV(MWindow *mwindow, int ifd);
79 static int open_usb_input(int vendor, int product, int &version);
80 static WinTV *probe(MWindow *mwindow);
83 int check_menu_keys(int code);
84 virtual int process_code() { return 1; }
92 class WinTVCWindowHandler : public RemoteHandler
95 WinTVCWindowHandler(WinTV *wintv, RemoteControl *remote_control);
96 int wintv_process_code(int code);
97 int process_key(int key);
98 int is_wintv() { return 1; }
103 class WinTVRecordHandler : public RemoteHandler
106 WinTVRecordHandler(WinTV *wintv, RemoteControl *remote_control);
107 int wintv_process_code(int code);
108 int process_key(int key);
109 int is_wintv() { return 1; }