Source: tracepacket.h


Annotated List
Files
Globals
Hierarchy
Index
// ##########################################################################
// ####                                                                  ####
// ####                    Master Thesis Implementation                  ####
// ####  Management of Layered Variable Bitrate Multimedia Streams over  ####
// ####                  DiffServ with A Priori Knowledge                ####
// ####                                                                  ####
// #### ================================================================ ####
// ####                                                                  ####
// ####                                                                  ####
// #### Trace Packet                                                     ####
// ####                                                                  ####
// #### Version 1.00  --  October 10, 2000                               ####
// ####                                                                  ####
// #### Copyright (C) 2000 Thomas Dreibholz                              ####
// #### University of Bonn, Department of Computer Science IV            ####
// #### EMail: Dreibholz@bigfoot.com                                     ####
// #### WWW:   http://www.bigfoot.com/~dreibholz/diplom/index.html       ####
// ####                                                                  ####
// ##########################################################################


#ifndef TRACEPACKET_H
#define TRACEPACKET_H


#include "system.h"
#include "mediainfo.h"


namespace Coral {


/**
  * This class defines the packet format for the trace encoder.
  *
  * @short   Trace Packet
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  *
  * @see TraceEncoder
  * @see TraceDecoder
  */
class TracePacket
{
   // ====== Constructor ====================================================
   public:
   /**
     * Constructor.
     */
   TracePacket();


   // ====== Byte order translation =========================================
   /**
     * Translate byte order.
     */
   void translate();


   // ====== Status functions ===============================================
   /**
     * Reset report.
     */
   void reset();


   // ====== Constants ======================================================
   /**
     * Type ID for Trace Encoding.
     */
   static const card16 TraceTypeID = 0x8833;

   /**
     * Name for Trace Encoding.
     */
   static const char TraceTypeName[];

   /**
     * Trace Encoding package format ID.
     */
   static const card32 TraceFormatID = 0x33140000 | TraceTypeID;


   // ====== Packet data ====================================================
   public:
   /**
     * Packet format ID.
     */
   card32 FormatID;

   /**
     * Layer number
     */
   card8 Layer;

   /**
     * Number of layers
     */
   card8 Layers;

   /**
     * Error code.
     */
   card8 ErrorCode;

   /**
     * Flags.
     */
   card8 Flags;

   /**
     * Emumeration of Flags.
     */
   enum TraceFlags {
      TF_None        = 0,
      TF_Information = 1,
   };

   /**
     * Current position in nanoseconds.
     */
   card64 Position;

   /**
     * Maximum position in nanoseconds.
     */
   card64 MaxPosition;

   /**
     * Frame ID.
     */
   card32 FrameID;

   /**
     * Fragment offset.
     */
   card32 Offset;

   /**
     * Packet data.
     */   
   char Data[0];
};



/**
  * This is the trace packet payload.
  *
  * @short   Trace Packet Data
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct TracePacketData
{
   /**
     * Frame rate.
     */
   card64 FrameRate;

   /**
     * Utilization.
     */
   card64 Utilization;

   /**
     * Bandwidth.
     */
   card32 Bandwidth;

   /**
     * Minimum bandwidth.
     */
   card32 MinBandwidth;

   /**
     * Maximum bandwidth.
     */
   card32 MaxBandwidth;

   /**
     * Media Info.
     */
   MediaInfo Information;

   /**
     * Stream priority.
     */
   int8 StreamPriority;

   /**
     * Session priority.
     */
   int8 SessionPriority;
};


}


#endif

Generated by: viper@odin on Mon Oct 16 11:49:26 2000, using kdoc 2.0a36.