www.pudn.com > MPEG2systemsrc.rar > TSProducer.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.
*/

/* TSProducer class */
#ifndef tsproducer_h
#define tsproducer_h

#include "Producer.H"
#include "Encoder.H"
#include "TS.H"

class Producer; 

class TSProducer : public Producer
{
public:
  TSProducer (Encoder*);
  TS* ts;
  void send_ts_packet (Producer*);
private:
  void send_adaptation (Producer*);
  void send_payload (Producer*);
};

/*
 DOCUMENTATION

 TSProducers write transport packets to OutputPorts with a call to the
 member send_ts_packet.

 Public members are:

  TSProducer (Encoder*);
    The only constructor.

  TS* ts;
    ts is used as a template for TS packets.  Some members of ts may
    be modified as the packet is generated (e.g. the
    continuity_counter is incremented, the PCR is adjusted, etc.)

  void send_ts_packet (Producer*);
    This will generate a transport packet directly on the output port.
    the Producer passed as an argument is used to generate the packet
    payload. 
*/

#endif