# 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  * $Revision: 21004 $
    00022  * $Author: rjongbloed $
    00023  * $Date: 2008-09-16 07:08:56 +0000 (Tue, 16 Sep 2008) $
    00024  */
    00025
    00026 #ifndef __OPAL_H281_H
    00027 #define __OPAL_H281_H
    00028
    00029 #ifdef P_USE_PRAGMA
    00030 #pragma interface
    00031 #endif
    00032
    00033 #ifndef _PTLIB_H
    00034 #include <ptlib.h>
    00035 #endif
    00036
    00037 #include <opal/buildopts.h>
    00038
    00039 #include <h224/h224.h>
    00040
    00041 class H281_Frame : public H224_Frame
    00042 {
    00043   PCLASSINFO(H281_Frame, H224_Frame);
    00044
    00045 public:
    00046
    00047   enum RequestType {
    00048         IllegalRequest          = 0x00,
    00049         StartAction                     = 0x01,
    00050         ContinueAction          = 0x02,
    00051         StopAction                      = 0x03,
    00052         SelectVideoSource       = 0x04,
    00053         VideoSourceSwitched = 0x05,
    00054         StoreAsPreset           = 0x07,
    00055         ActivatePreset          = 0x08
    00056   };
    00057
    00058   enum PanDirection {
    00059         NoPan           = 0x00,
    00060         IllegalPan      = 0x40,
    00061         PanLeft         = 0x80,
    00062         PanRight        = 0xc0,
    00063   };
    00064
    00065   enum TiltDirection {
    00066     NoTilt              = 0x00,
    00067         IllegalTilt = 0x10,
    00068         TiltDown        = 0x20,
    00069         TiltUp          = 0x30,
    00070   };
    00071
    00072   enum ZoomDirection {
    00073     NoZoom              = 0x00,
    00074         IllegalZoom = 0x04,
    00075         ZoomOut         = 0x08,
    00076         ZoomIn          = 0x0c
    00077   };
    00078
    00079   enum FocusDirection {
    00080     NoFocus                     = 0x00,
    00081         IllegalFocus    = 0x01,
    00082         FocusOut                = 0x02,
    00083         FocusIn                 = 0x03
    00084   };
    00085
    00086   enum VideoMode {
    00087     MotionVideo                                 = 0x00,
    00088         IllegalVideoMode                        = 0x01,
    00089         NormalResolutionStillImage      = 0x02,
    00090         DoubleResolutionStillImage      = 0x03
    00091   };
    00092
    00093   H281_Frame();
    00094   ~H281_Frame();
    00095
    00096   RequestType GetRequestType() const { return (RequestType)(GetClientDataPtr())[0]; }
    00097   void SetRequestType(RequestType requestType);
    00098
    00099   // The following methods are only valid when
    00100   // request type is either StartAction, ContinueAction or StopAction
    00101   PanDirection GetPanDirection() const;
    00102   void SetPanDirection(PanDirection direction);
    00103
    00104   TiltDirection GetTiltDirection() const;
    00105   void SetTiltDirection(TiltDirection direction);
    00106
    00107   ZoomDirection GetZoomDirection() const;
    00108   void SetZoomDirection(ZoomDirection direction);
    00109
    00110   FocusDirection GetFocusDirection() const;
    00111   void SetFocusDirection(FocusDirection direction);
    00112
    00113   // Only valid when RequestType is StartAction
    00114   BYTE GetTimeout() const;
    00115   void SetTimeout(BYTE timeout);
    00116
    00117   // Only valid when RequestType is SelectVideoSource or VideoSourceSwitched
    00118   BYTE GetVideoSourceNumber() const;
    00119   void SetVideoSourceNumber(BYTE videoSourceNumber);
    00120
    00121   VideoMode GetVideoMode() const;
    00122   void SetVideoMode(VideoMode videoMode);
    00123
    00124   // Only valid when RequestType is StoreAsPreset or ActivatePreset
    00125   BYTE GetPresetNumber() const;
    00126   void SetPresetNumber(BYTE presetNumber);
    00127 };
    00128
    00129 #endif // __OPAL_H281_H
    00130