h281.h

Go to the documentation of this file.
00001 /*
00002  * h281.h
00003  *
00004  * H.281 PDU implementation for the OpenH323 Project.
00005  *
00006  * Copyright (c) 2006 Network for Educational Technology, ETH Zurich.
00007  * Written by Hannes Friederich.
00008  *
00009  * The contents of this file are subject to the Mozilla Public License
00010  * Version 1.0 (the "License"); you may not use this file except in
00011  * compliance with the License. You may obtain a copy of the License at
00012  * http://www.mozilla.org/MPL/
00013  *
00014  * Software distributed under the License is distributed on an "AS IS"
00015  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00016  * the License for the specific language governing rights and limitations
00017  * under the License.
00018  *
00019  * Contributor(s): ______________________________________.
00020  *
00021  * $Log: h281.h,v $
00022  * Revision 1.3  2007/04/19 06:17:20  csoutheren
00023  * Fixes for precompiled headers with gcc
00024  *
00025  * Revision 1.2  2006/04/23 18:52:19  dsandras
00026  * Removed warnings when compiling with gcc on Linux.
00027  *
00028  * Revision 1.1  2006/04/20 16:48:17  hfriederich
00029  * Initial version of H.224/H.281 implementation.
00030  *
00031  */
00032 
00033 #ifndef __OPAL_H281_H
00034 #define __OPAL_H281_H
00035 
00036 #ifdef P_USE_PRAGMA
00037 #pragma interface
00038 #endif
00039 
00040 #ifndef _PTLIB_H
00041 #include <ptlib.h>
00042 #endif
00043 
00044 #include <h224/h224.h>
00045 
00046 class H281_Frame : public H224_Frame
00047 {
00048   PCLASSINFO(H281_Frame, H224_Frame);
00049         
00050 public:
00051         
00052   enum RequestType {
00053         IllegalRequest          = 0x00,
00054         StartAction                     = 0x01,
00055         ContinueAction          = 0x02,
00056         StopAction                      = 0x03,
00057         SelectVideoSource       = 0x04,
00058         VideoSourceSwitched = 0x05,
00059         StoreAsPreset           = 0x07,
00060         ActivatePreset          = 0x08
00061   };
00062         
00063   enum PanDirection {
00064         NoPan           = 0x00,
00065         IllegalPan      = 0x40,
00066         PanLeft         = 0x80,
00067         PanRight        = 0xc0,
00068   };
00069         
00070   enum TiltDirection {
00071     NoTilt              = 0x00,
00072         IllegalTilt = 0x10,
00073         TiltDown        = 0x20,
00074         TiltUp          = 0x30,
00075   };
00076         
00077   enum ZoomDirection {
00078     NoZoom              = 0x00,
00079         IllegalZoom = 0x04,
00080         ZoomOut         = 0x08,
00081         ZoomIn          = 0x0c
00082   };
00083         
00084   enum FocusDirection {
00085     NoFocus                     = 0x00,
00086         IllegalFocus    = 0x01,
00087         FocusOut                = 0x02,
00088         FocusIn                 = 0x03
00089   };
00090         
00091   enum VideoMode {      
00092     MotionVideo                                 = 0x00,
00093         IllegalVideoMode                        = 0x01,
00094         NormalResolutionStillImage      = 0x02,
00095         DoubleResolutionStillImage      = 0x03
00096   };
00097         
00098   H281_Frame();
00099   ~H281_Frame();
00100         
00101   RequestType GetRequestType() const { return (RequestType)(GetClientDataPtr())[0]; }
00102   void SetRequestType(RequestType requestType);
00103         
00104   // The following methods are only valid when
00105   // request type is either StartAction, ContinueAction or StopAction   
00106   PanDirection GetPanDirection() const;
00107   void SetPanDirection(PanDirection direction);
00108         
00109   TiltDirection GetTiltDirection() const;
00110   void SetTiltDirection(TiltDirection direction);
00111 
00112   ZoomDirection GetZoomDirection() const;
00113   void SetZoomDirection(ZoomDirection direction);
00114         
00115   FocusDirection GetFocusDirection() const;
00116   void SetFocusDirection(FocusDirection direction);
00117         
00118   // Only valid when RequestType is StartAction
00119   BYTE GetTimeout() const;
00120   void SetTimeout(BYTE timeout);
00121         
00122   // Only valid when RequestType is SelectVideoSource or VideoSourceSwitched
00123   BYTE GetVideoSourceNumber() const;
00124   void SetVideoSourceNumber(BYTE videoSourceNumber);
00125         
00126   VideoMode GetVideoMode() const;
00127   void SetVideoMode(VideoMode videoMode);
00128         
00129   // Only valid when RequestType is StoreAsPreset or ActivatePreset
00130   BYTE GetPresetNumber() const;
00131   void SetPresetNumber(BYTE presetNumber);
00132 };
00133 
00134 #endif // __OPAL_H281_H
00135 

Generated on Fri Mar 7 06:33:31 2008 for OPAL by  doxygen 1.5.1