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

📄 sectionproducers.h

📁 1、简介 此代码是IS0 13818-5 MPEG2系统层协议分析代码
💻 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.*//* SectionProducer classes */#ifndef secproducer_h#define secproducer_h#include "Producer.H"#include "Section.H"#include "Directory.H"#include "Encoder.H"class SectionProducer : public Producer{public:  SectionProducer (Encoder*, Section*);protected:  virtual int fill_buffer ();  virtual void send_section () = 0;  void send_header_a ();            // table_id .. section_length  void send_header_b ();            // reserved .. last_section_number  void send_CRC ();private:  Section* sec;};class PATProducer : public SectionProducer{public:  PATProducer (Encoder*, PATSection*);  virtual void send_section ();  PATSection* patsec;};class MapProducer : public SectionProducer{public:  MapProducer (Encoder*, MapSection*);  virtual void send_section ();  MapSection* mapsec;private:};class CAProducer : public SectionProducer{public:  CAProducer (Encoder*, CASection*);  virtual void send_section ();private:  CASection* casec;};/* DOCUMENTATION SectionProducer is a base class from which the PSI-related Producers PATProducer, MapProducer and CAProducer are derived. Since the syntax for these sections is similar reproduction of code is avoided by defining fill_buffer in the base class SectionProducer and calling the virtual function send_section.  send_section is defined in each of the derived classes.  The definitions of send_section, then, use as utilities the functions send_header_a and send_header_b, which are defined back in the base class.  Note that the syntax objects: casec, mapsec and patsec are stored twice in each structure.  Once under the generic name "sec" and once under the more specific name.  This is a hack to work around a well-known and annoying C++ strong-typing problem; if you don't mind the extra pointer and they are "write-once", then it's a pretty effective solution.*/#endif

⌨️ 快捷键说明

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