OPAL  Version 3.14.3
h281.h
Go to the documentation of this file.
1 /*
2  * h281.h
3  *
4  * H.281 PDU implementation for the OpenH323 Project.
5  *
6  * Copyright (c) 2006 Network for Educational Technology, ETH Zurich.
7  * Written by Hannes Friederich.
8  *
9  * The contents of this file are subject to the Mozilla Public License
10  * Version 1.0 (the "License"); you may not use this file except in
11  * compliance with the License. You may obtain a copy of the License at
12  * http://www.mozilla.org/MPL/
13  *
14  * Software distributed under the License is distributed on an "AS IS"
15  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
16  * the License for the specific language governing rights and limitations
17  * under the License.
18  *
19  * Contributor(s): ______________________________________.
20  *
21  * $Revision: 31445 $
22  * $Author: rjongbloed $
23  * $Date: 2014-02-12 17:30:15 +1100 (Wed, 12 Feb 2014) $
24  */
25 
26 #ifndef OPAL_H224_H281_H
27 #define OPAL_H224_H281_H
28 
29 #ifdef P_USE_PRAGMA
30 #pragma interface
31 #endif
32 
33 #include <opal_config.h>
34 
35 #if OPAL_HAS_H281
36 
37 #include <h224/h224.h>
38 
39 class H281_Frame : public H224_Frame
40 {
41  PCLASSINFO(H281_Frame, H224_Frame);
42 
43 public:
44 
45  enum RequestType {
47  StartAction = 0x01,
49  StopAction = 0x03,
52  StoreAsPreset = 0x07,
54  };
55 
56  enum VideoMode {
57  MotionVideo = 0x00,
61  };
62 
63  H281_Frame();
64  ~H281_Frame();
65 
67  void SetRequestType(RequestType requestType);
68 
69  // The following methods are only valid when
70  // request type is either StartAction, ContinueAction or StopAction
71  int GetDirection(PVideoControlInfo::Types type) const;
72  void SetDirection(PVideoControlInfo::Types type, int direction);
73 
74  // Only valid when RequestType is StartAction
75  BYTE GetTimeout() const;
76  void SetTimeout(BYTE timeout);
77 
78  // Only valid when RequestType is SelectVideoSource or VideoSourceSwitched
79  BYTE GetVideoSourceNumber() const;
80  void SetVideoSourceNumber(BYTE videoSourceNumber);
81 
82  VideoMode GetVideoMode() const;
83  void SetVideoMode(VideoMode videoMode);
84 
85  // Only valid when RequestType is StoreAsPreset or ActivatePreset
86  BYTE GetPresetNumber() const;
87  void SetPresetNumber(BYTE presetNumber);
88 };
89 
90 
91 extern const OpalMediaFormat & GetOpalFECC_RTP();
92 extern const OpalMediaFormat & GetOpalFECC_HDLC();
93 
94 #define OpalFECC_RTP GetOpalFECC_RTP()
95 #define OpalFECC_HDLC GetOpalFECC_HDLC()
96 
97 
98 #endif // OPAL_HAS_H281
99 
100 #endif // OPAL_H224_H281_H