consumer.cpp

来自「用VC++编译的13818-5 MPEG2系统层分析代码」· C++ 代码 · 共 64 行

CPP
64
字号
/* 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.*//* Consumer class implementation *///#include "stdAfx.h"#include "Utilities.H"#include "TSConsumer.H"Consumer::Consumer (Decoder* d){  decoder = d;}void Consumer::connect (InputPort* p){  iport = p;}void Consumer::flush (){}int Consumer::read_partial (int n){  sys_message("unexpected virtual function call - Consumer::read_partial");  for (int i = 0; i < n; i++)    (void) iport->read_byte();  return 1;}void Consumer::set_cstate (CState cs){  cstate = cs;  return;}CState Consumer::get_cstate (){  return cstate;}

⌨️ 快捷键说明

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