📄 sectordemultiplexer.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_DVD_DEMUX_SECTORDEMULTIPLEXER_H#define DXR3PLAYER_DVD_DEMUX_SECTORDEMULTIPLEXER_H//------------------------------------------------------------------------------namespace dvd { namespace demux {//------------------------------------------------------------------------------class StreamProcessor;class Sector;class SectorBitReader;//------------------------------------------------------------------------------/** * Demultiplexer for sectors. */class SectorDemultiplexer{private: /** * PES ID: pack header */ static const unsigned char PESID_PACK_HEADER = 0xba; /** * PES ID: system header */ static const unsigned char PESID_SYSTEM_HEADER = 0xbb; /** * PES ID: private stream 1 */ static const unsigned char PESID_PRIVATE1 = 0xbd; /** * PES ID: padding stream */ static const unsigned char PESID_PADDING = 0xbe; /** * PES ID: private stream 2 */ static const unsigned char PESID_PRIVATE2 = 0xbf; /** * PES ID: first MPEG audio stream */ static const unsigned char PESID_MPEG_AUDIO_FIRST = 0xc0; /** * PES ID: last MPEG audio stream */ static const unsigned char PESID_MPEG_AUDIO_LAST = 0xdf; /** * PES ID: first MPEG video stream */ static const unsigned char PESID_MPEG_VIDEO_FIRST = 0xe0; /** * PES ID: last MPEG video stream */ static const unsigned char PESID_MPEG_VIDEO_LAST = 0xef; /** * Private stream 2 substream ID: PCI packet */ static const unsigned char PRIVATE2_PCI = 0x00; /** * Private stream 2 substream ID: DSI packet */ static const unsigned char PRIVATE2_DSI = 0x01; /** * The stream processor to pass stream data to. */ StreamProcessor& streamProcessor;public: /** * Construct a sector demultiplexer with the given stream * processor. */ SectorDemultiplexer(StreamProcessor& streamProcessor); /** * Demultiplex the given sector. */ void demultiplex(const Sector& sector); /** * Demultiplex the given data block. It is assumed to have a * length of SECTOR_SIZE. */ void demultiplex(const unsigned char* data); /** * Demultiplex the PES packet from the given reader */ void demultiplexPESPacket(SectorBitReader& reader); /** * Demultiplex a pack header. */ void demultiplexPackHeader(SectorBitReader& reader); /** * Demultiplex a system header. */ void demultiplexSystemHeader(SectorBitReader& reader); /** * Demultiplex a private stream 1. */ void demultiplexPrivate1(SectorBitReader& reader); /** * Demultiplex a padding stream. */ void demultiplexPadding(SectorBitReader& reader); /** * Demultiplex a private stream 2. */ void demultiplexPrivate2(SectorBitReader& reader); /** * Demultiplex an MPEG audio stream. */ void demultiplexMPEGAudio(SectorBitReader& reader, unsigned char streamID); /** * Demultiplex an MPEG video stream. */ void demultiplexMPEGVideo(SectorBitReader& reader, unsigned char streamID);};//------------------------------------------------------------------------------//------------------------------------------------------------------------------} /* namespace dvd::demux */ } /* namespace dvd *///------------------------------------------------------------------------------#endif // DXR3PLAYER_DVD_DEMUX_SECTORDEMULTIPLEXER_H// Local variables:// mode: c++// End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -