www.pudn.com > MPEG2systemsrc.rar > TimeStamp.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.
*/
/* TimeStamp classes */
#ifndef timestamp_h
#define timestamp_h
class TimeStamp27;
class TimeStamp90
{
public:
TimeStamp90 (long);
TimeStamp90 (long, int);
TimeStamp90 (const TimeStamp27&);
int bit32;
long bits0_31;
void print ();
};
class TimeStamp27 : public TimeStamp90
{
public:
short ext;
TimeStamp27 ();
TimeStamp27 (long);
TimeStamp27 (long, short);
TimeStamp27 (long, int, short);
TimeStamp27& operator = (const TimeStamp27&); // x = y;
TimeStamp27& operator = (long); // x = 5;
friend TimeStamp27 operator + (TimeStamp27&, TimeStamp27&);
friend TimeStamp27 operator - (TimeStamp27&, TimeStamp27&);
friend int operator > (TimeStamp27&, TimeStamp27&);
long useconds ();
void print ();
};
/*
DOCUMENTATION
The TimeStamp classes are encapsulations of the 27MHz and 90KHz
timestamps found in MPEG Systems. The class TimeStamp27 currently
contains some additional utilities for performing arithmetic and
converting the TimeStamp to microseconds.
In both cases the 33'rd bit is frequently ignored; eventually this
will be fixed.
*/
#endif