📄 outputprocessor.h
字号:
//// 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#ifndef DXR3PLAYER_OUTPUT_OUTPUTPROCESSOR_H#define DXR3PLAYER_OUTPUT_OUTPUTPROCESSOR_H//------------------------------------------------------------------------------#include "sched/Schedulable.h"// We should put input event types into their own file#include "input/InputListener.h"#include "enums.h"//------------------------------------------------------------------------------namespace dvd { namespace vm {class State;class ProcessorCommandQueue;} namespace packet {class PacketQueue;}class DVD;}//------------------------------------------------------------------------------namespace dvd { namespace packet {class PacketQueue;} }//------------------------------------------------------------------------------namespace output {//------------------------------------------------------------------------------class OSDHandler;//------------------------------------------------------------------------------/** * Output packet processor. */class OutputProcessor : public sched::Schedulable{public: /** * Return type for operations that possibly change the output * processor's state. * * FIXME: move this type somewhere into dvd::vm */ typedef enum processorChange_t { // No change NONE, // The state changed, should simply be copied into the reader STATE, // The reader should branch BRANCH, // The application should quit QUIT };public: /** * Construct the output processor with the given input queue. */ OutputProcessor(const char* name); /** * Reset the output processor for the given play mode. */ virtual void reset(playMode_t newPlayMode, bool hasDVD = true) = 0; /** * Reset volume. * * @return the new volume (between 0 and 100) */ virtual unsigned volumeReset() = 0; /** * Increase volume. * * @return the new volume (between 0 and 100) */ virtual unsigned volumeUp() = 0; /** * Decrease volume. * * @return the new volume (between 0 and 100) */ virtual unsigned volumeDown() = 0; /** * Toggle the audio. * * @return true if the audio was enable as a result of this operation. */ virtual bool toggleAudio() = 0; /** * Increase the brightness. * * @return the new brightness (between 0 and 100) */ virtual unsigned increaseBrightness() = 0; /** * Decrease the brightness. * * @return the new brightness (between 0 and 100) */ virtual unsigned decreaseBrightness() = 0; /** * Increase the contrast. * * @return the new contrast (between 0 and 100) */ virtual unsigned increaseContrast() = 0; /** * Decrease the contrast. * * @return the new contrast (between 0 and 100) */ virtual unsigned decreaseContrast() = 0; /** * Increase the saturation. * * @return the new saturation (between 0 and 100) */ virtual unsigned increaseSaturation() = 0; /** * Decrease the saturation. * * @return the new saturation (between 0 and 100) */ virtual unsigned decreaseSaturation() = 0; /** * Perform the given user operation that might change the * processor state. * * @param processorState will contain the state to be set or branched to */ virtual processorChange_t handleOperation(input::InputListener::operation_t operation, dvd::vm::State& processorState) = 0; /** * Get the state of the output VM processor. */ virtual const dvd::vm::State& getVMState() = 0; /** * Toggle the output target. */ virtual void toggleOutput() = 0; /** * Get the OSD handler. */ virtual OSDHandler& getOSDHandler() = 0;};//------------------------------------------------------------------------------// Inline definitions//------------------------------------------------------------------------------inline OutputProcessor::OutputProcessor(const char* name) : sched::Schedulable(name){}//------------------------------------------------------------------------------} /* namespace output *///------------------------------------------------------------------------------#endif // DXR3PLAYER_OUTPUT_OUTPUTPROCESSOR_H// Local variables:// mode: c++// End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -