⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ir401inputhandler.cc

📁 Linux下比较早的基于命令行的DVD播放器
💻 CC
字号:
//// Copyright (c) 2003 by Istv醤 V醨adi//// This file is part of dxr3Player, a DVD player written specifically // for the DXR3 (aka Hollywood+) decoder card.// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//------------------------------------------------------------------------------#include "IR401InputHandler.h"#include <cstdio>//------------------------------------------------------------------------------using input::IR401InputHandler;using input::CharInputHandler;using input::InputListener;//------------------------------------------------------------------------------static CharInputHandler::Sequence ir401Sequences[]={    { "\360\177\031\367", 4, InputListener::UP },                    // ^    { "\360\177\021\367", 4, InputListener::DOWN },                  // v    { "\360\177\024\367", 4, InputListener::LEFT },                  // <    { "\360\177\026\367", 4, InputListener::RIGHT },                 // >    { "\360\177\025\367", 4, InputListener::ACTIVATE },              // ENTER    { "\360\177\030\367", 4, InputListener::MENU_TITLE },            // CANCEL    { "\360\177\032\367", 4, InputListener::MENU_ROOT },             // MENU    { "\360\177\022\367", 4, InputListener::MENU_SUBPICTURE },       // SUBTITLE    { "\360\177\014\367", 4, InputListener::MENU_AUDIO },            // MUTE    { "\360\177\015\367", 4, InputListener::MENU_ANGLE },            // SCREEN    { "\360\177\020\367", 4, InputListener::MENU_PART },             // CHAPTER    { "\360\177\006\367", 4, InputListener::PREVIOUS_CHAPTER },      // |<<    { "\360\177\007\367", 4, InputListener::NEXT_CHAPTER },          // >>|    { "\360\177\010\367", 4, InputListener::PLAY },                  // PLAY    { "\360\177\011\367", 4, InputListener::PAUSE },                 // PAUSE    { "\360\177\005\367", 4, InputListener::PLAY_FAST_FORWARD },     // >>    { "\360\177\004\367", 4, InputListener::PLAY_FAST_BACKWARD },    // <<    { "\360\177\012\367", 4, InputListener::EJECT },                 // STOP    { "\360\177\001\367", 4, InputListener::RESYNCHRONIZE },         // F1    { "\360\177\002\367", 4, InputListener::RESYNCHRONIZE_ALL },     // F2    { "\360\177\003\367", 4, InputListener::VOLUME_RESET },          // F3    { "\360\177\033\367", 4, InputListener::VOLUME_UP },             // VOLUME ^    { "\360\177\027\367", 4, InputListener::VOLUME_DOWN },           // VOLUME v    { "\360\177\013\367", 4, InputListener::CHANGE_ANGLE },          // REPEAT    { "\360\177\000\367", 4, InputListener::TOGGLE_EXTRA_SUBTITLE }, // MOUSE    { "\360\177\037\367", 4, InputListener::QUIT },                  // EXIT    { 0, 0, InputListener::NONE }};//------------------------------------------------------------------------------IR401InputHandler::IR401InputHandler(InputListener& listener) :    ReaderInputHandler(listener, "input::IR401InputHandler", ir401Sequences){    int fd = open("/dev/midi", O_RDONLY|O_NONBLOCK);    if (fd<0) {        perror("open");    } else {        start(fd);    }}    //------------------------------------------------------------------------------//------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -