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

📄 outputport.h

📁 用于解析ts流中的各种业务信息表可以用于dvb中嘛流分析
💻 H
字号:
/* Copyright (C) 1995, Tektronix Inc. All Rights Reserved. * *   Usage Restrictions * * License is granted to copy, to use, and to make and to use derivative * works for research and evaluation purposes only. * *   Disclaimer of Warranty * * These software programs are available to the user without any license * fee or royalty on an "as is" basis.  Tektronix Inc. disclaims any and * all warranties, whether express, implied, or statuary, including any * implied warranties or merchantability or of fitness for a particular * purpose.  In no event shall the copyright-holder be liable for any  * incidental, punitive, or consequential damages of any kind whatsoever * arising from the use of these programs. * * This disclaimer of warranty extends to the user of these programs and * user's customers, employees, agents, transferees, successors, and * assigns. * * The Tektronix Inc. does not represent or warrant that the programs * furnished hereunder are free of infringement of any third-party * patents.*//* OutputPorts are used to send bitstreams to other processes. */#ifndef outputport_h#define outputport_h#include "TimeStamp.H"#include "Poly.H"#define ZERO '0'#define ONE '1'#define BADBIT '2'#define TRUE 1#define FALSE 0class OutputPort{public:  OutputPort (int);  void write_bit (char);  void write_byte (char);  void flush ();  void write_pattern (char*);  void write_uimsbf (int, int);  void write_tcimsbf (int, int);    void write_markerbit ();  void write_reserved_bits (int);  void write_timestamp90 (TimeStamp90*);  void write_timestamp27_pes_format (TimeStamp27*);  void write_timestamp27_ts_format (TimeStamp27*);  void start_crc ();  void stop_crc ();  void write_crc ();protected:  virtual void output_bit (char) = 0;  virtual void output_byte (char) = 0;  virtual void output_flush () = 0;    int textflag;private:  int crc_flag;  Poly* poly;};/* DOCUMENTATION OutputPorts provide a generic target for the output of data.  This data can be written to the port with calls to functions such as write_byte, write_nbits, write_pattern, etc. A CRC check can be stated, and stopped and written to the port as described below. Subclasses of OutputPort provide various implementations.  For example, OPortToFile will write bytes from a disk file, OPortToRam will write bytes to a ram buffer.  These subclasses must implement three virtual functions: output_bit, output_byte, and output_flush which are then used by the generic code implemented in this base class. Bits specified to the port are represented as the chars '0' and '1' (only an actual bit is written to the port, of course, but internally bits are efficiently managed as chars). Public methods are:  OutputPort (int);    The only constuctor - never called directly by an application.    The argument is the text_flag.  When set to true the port will output    char's '0' and '1'.  This is useful for debugging.   void write_bit (char);  void write_byte (char);    This function requires that the port be on a byte boundary.  void flush ();    The actions taken here depend on the subclass.       void write_pattern (char*);  void write_uimsbf (int, int);  void write_tcimsbf (int, int);    void write_markerbit ();  void write_reserved_bits (int);  void write_timestamp90 (TimeStamp90*);  void write_timestamp27_pes_format (TimeStamp27*);  void write_timestamp27_ts_format (TimeStamp27*);    These each write a corresponding object to the port.  void start_crc ();  void stop_crc ();  void write_crc ();    start_crc will initialize an internal degree 32 polynomial and    arrange so that subsequent calls to any of the write functions will    perform the appropriate bitshift operation on the polynomial.    stop_crc will stop the bitshift.  write_crc will output the    polynomial as the next 32 bits. */ #endif

⌨️ 快捷键说明

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