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.1  2006/06/22 11:07:22  shorne
00023  * Backport of FECC (H.224) from Opal
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 #include <ptlib.h>
00041 #include <h224.h>
00042 
00043 class H281_Frame : public H224_Frame
00044 {
00045   PCLASSINFO(H281_Frame, H224_Frame);
00046         
00047 public:
00048         
00049   enum RequestType {
00050         IllegalRequest          = 0x00,
00051         StartAction                     = 0x01,
00052         ContinueAction          = 0x02,
00053         StopAction                      = 0x03,
00054         SelectVideoSource       = 0x04,
00055         VideoSourceSwitched = 0x05,
00056         StoreAsPreset           = 0x07,
00057         ActivatePreset          = 0x08
00058   };
00059         
00060   enum PanDirection {
00061         NoPan           = 0x00,
00062         IllegalPan      = 0x40,
00063         PanLeft         = 0x80,
00064         PanRight        = 0xc0,
00065   };
00066         
00067   enum TiltDirection {
00068     NoTilt              = 0x00,
00069         IllegalTilt = 0x10,
00070         TiltDown        = 0x20,
00071         TiltUp          = 0x30,
00072   };
00073         
00074   enum ZoomDirection {
00075     NoZoom              = 0x00,
00076         IllegalZoom = 0x04,
00077         ZoomOut         = 0x08,
00078         ZoomIn          = 0x0c
00079   };
00080         
00081   enum FocusDirection {
00082     NoFocus                     = 0x00,
00083         IllegalFocus    = 0x01,
00084         FocusOut                = 0x02,
00085         FocusIn                 = 0x03
00086   };
00087         
00088   enum VideoMode {      
00089     MotionVideo                                 = 0x00,
00090         IllegalVideoMode                        = 0x01,
00091         NormalResolutionStillImage      = 0x02,
00092         DoubleResolutionStillImage      = 0x03
00093   };
00094         
00095   H281_Frame();
00096   ~H281_Frame();
00097         
00098   RequestType GetRequestType() const { return (RequestType)(GetClientDataPtr())[0]; }
00099   void SetRequestType(RequestType requestType);
00100         
00101   // The following methods are only valid when
00102   // request type is either StartAction, ContinueAction or StopAction   
00103   PanDirection GetPanDirection() const;
00104   void SetPanDirection(PanDirection direction);
00105         
00106   TiltDirection GetTiltDirection() const;
00107   void SetTiltDirection(TiltDirection direction);
00108 
00109   ZoomDirection GetZoomDirection() const;
00110   void SetZoomDirection(ZoomDirection direction);
00111         
00112   FocusDirection GetFocusDirection() const;
00113   void SetFocusDirection(FocusDirection direction);
00114         
00115   // Only valid when RequestType is StartAction
00116   BYTE GetTimeout() const;
00117   void SetTimeout(BYTE timeout);
00118         
00119   // Only valid when RequestType is SelectVideoSource or VideoSourceSwitched
00120   BYTE GetVideoSourceNumber() const;
00121   void SetVideoSourceNumber(BYTE videoSourceNumber);
00122         
00123   VideoMode GetVideoMode() const;
00124   void SetVideoMode(VideoMode videoMode);
00125         
00126   // Only valid when RequestType is StoreAsPreset or ActivatePreset
00127   BYTE GetPresetNumber() const;
00128   void SetPresetNumber(BYTE presetNumber);
00129 };
00130 
00131 #endif // __OPAL_H281_H
00132 

Generated on Wed Feb 6 09:02:38 2008 for OpenH323 by  doxygen 1.5.4