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

📄 navreader.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 "NAVReader.h"#include <cstring>#include <cassert>//------------------------------------------------------------------------------using ifodump::NAVReader;//------------------------------------------------------------------------------// Hidden methods (for GCC <3.0)//------------------------------------------------------------------------------inline void NAVReader::read(uint16_t& x){    FileReader::read(x);}inline void NAVReader::read(uint32_t& x){    FileReader::read(x);}inline void NAVReader::read(uint64_t& x){    FileReader::read(x);}inline void NAVReader::read(void* buffer, size_t length){    FileReader::read(buffer, length);}inline void NAVReader::read(vm_cmd_t& cmd){    Reader<NAVReader>::read(cmd);}inline void NAVReader::read(user_ops_t& userOperations){    Reader<NAVReader>::read(userOperations);}//------------------------------------------------------------------------------//------------------------------------------------------------------------------void NAVReader::read(pci_gi_t& pciGeneral){    pciGeneral.nv_pck_lbn = read32();    read(pciGeneral.vobu_uop_ctl);    pciGeneral.vobu_s_ptm = read32();    pciGeneral.vobu_e_ptm = read32();}//------------------------------------------------------------------------------void NAVReader::read(nsml_agli_t& pciAngle){    readFixedArray(sizeof(pciAngle.nsml_agl_dsta), pciAngle.nsml_agl_dsta);}//------------------------------------------------------------------------------void NAVReader::read(hl_gi_t& pciHighlightGeneral){    pciHighlightGeneral.hli_ss = read16();    pciHighlightGeneral.fosl_btnn = read8();    pciHighlightGeneral.btn_ofn = read8();    pciHighlightGeneral.btn_ns = read8();        read(reinterpret_cast<unsigned char*>(&pciHighlightGeneral) + 14, 2);}    //------------------------------------------------------------------------------void NAVReader::read(btn_colit_t& pciButtonColor){    for(size_t i = 0; i<3; ++i) {        read(pciButtonColor.btn_coli[i][0]);    }}    //------------------------------------------------------------------------------void NAVReader::read(btni_t& pciButton){    read(&pciButton, 10);    read(pciButton.cmd);}//------------------------------------------------------------------------------void NAVReader::read(hli_t& pciHighlight){    read(pciHighlight.hl_gi);    read(pciHighlight.btn_colit);    size_t numButtonGroups = pciHighlight.hl_gi.btngr_ns;    if (numButtonGroups>0) {        size_t buttonGroupSize =             sizeof(pciHighlight.btnit)/sizeof(pciHighlight.btnit[0]) /             numButtonGroups;             for(size_t i = 0; i<numButtonGroups; ++i) {            readFixedArray(pciHighlight.hl_gi.btn_ns * sizeof(btni_t),                             pciHighlight.btnit + buttonGroupSize * i);        }    }}//------------------------------------------------------------------------------void NAVReader::read(dsi_gi_t& dsiGeneral){    dsiGeneral.nv_pck_lbn = read32();    dsiGeneral.vobu_ea = read32();    dsiGeneral.vobu_1stref_ea = read32();    dsiGeneral.vobu_2ndref_ea = read32();    dsiGeneral.vobu_3rdref_ea = read32();}    //------------------------------------------------------------------------------void NAVReader::read(vobu_sri_t& dsiVOBUSearch){    dsiVOBUSearch.next_vobu = read32();    dsiVOBUSearch.prev_vobu = read32();}    //------------------------------------------------------------------------------void NAVReader::read(sml_agl_data_t& dsiAngleData){    dsiAngleData.address = read32();}//------------------------------------------------------------------------------void NAVReader::read(sml_agli_t& dsiAngle){    readFixedArray(sizeof(dsiAngle.data), dsiAngle.data);}//------------------------------------------------------------------------------NAVReader::NAVReader(FILE* file, unsigned version) :     Reader<NAVReader>(file, version){}//------------------------------------------------------------------------------void NAVReader::read(pci_t& pci){    memset(&pci, 0, sizeof(pci));    read(pci.pci_gi);    read(pci.nsml_agli);    read(pci.hli);}//------------------------------------------------------------------------------void NAVReader::read(dsi_t& dsi){    memset(&dsi, 0, sizeof(dsi));    read(dsi.dsi_gi);    read(dsi.vobu_sri);    read(dsi.sml_agli);}//------------------------------------------------------------------------------

⌨️ 快捷键说明

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