📄 dxr3.h
字号:
//// Copyright (c) 2002 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_DXR3_H#define DXR3PLAYER_DXR3_H//------------------------------------------------------------------------------#include "Video.h"#include "Audio.h"#include "Device.h"#include "Overlay.h"#include <cstdlib>//------------------------------------------------------------------------------namespace dxr3 {//------------------------------------------------------------------------------/** * Class representing the DXR3 device. If any file operation fails, it aborts. */class DXR3{private: /** * The number of the device. */ unsigned deviceNumber; /** * The device. */ Device dev; /** * The video subdevice */ Video video; /** * The overlay device. */ Overlay overlay; /** * The audio subdevice */ Audio audio;public: /** * Construct the object. Note that it does not initialize the * subdevices, in case microcode should still be updated. */ DXR3(unsigned deviceNumber = 0); /** * Upload microcode. */ void uploadMicrocode(void* data, size_t size); /** * Upload microcode from the given file. */ void uploadMicrocode(const char* fileName); /** * Initialize the subdevices. */ void initializeSubdevices(); /** * Get the overlay subdevice. */ Overlay& getOverlay(); /** * Get the video subdevice. */ Video& getVideo(); /** * Get the audio subdevice. */ Audio& getAudio();private: /** * Execute an MV or MA command on the device. */ void executeCommand(int commandRegister, int command, int statusRegister, int expectedStatus); /** * Wait for the last command having been executed. */ void waitCommand(int reg, int value); friend class Audio; friend class Video; friend class Overlay;};//------------------------------------------------------------------------------// Inline definitions//------------------------------------------------------------------------------inline Overlay& DXR3::getOverlay(){ return overlay;}//------------------------------------------------------------------------------inline Video& DXR3::getVideo(){ return video;}//------------------------------------------------------------------------------inline Audio& DXR3::getAudio(){ return audio;}//------------------------------------------------------------------------------} /* namespace dxr3 *///------------------------------------------------------------------------------#endif // DXR3PLAYER_DXR3_H// Local variables:// mode: c++// End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -