OPAL  Version 3.10.4
vidcodec.h
Go to the documentation of this file.
1 /*
2  * vidcodec.h
3  *
4  * Uncompressed video handler
5  *
6  * Open Phone Abstraction Library
7  *
8  * Copyright (c) 2003 Equivalence Pty. Ltd.
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Open Phone Abstraction Library.
21  *
22  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23  *
24  * Contributor(s):
25  *
26  * $Revision: 26728 $
27  * $Author: rjongbloed $
28  * $Date: 2011-12-01 22:59:14 -0600 (Thu, 01 Dec 2011) $
29  */
30 
31 #ifndef OPAL_CODEC_VIDCODEC_H
32 #define OPAL_CODEC_VIDCODEC_H
33 
34 #ifdef P_USE_PRAGMA
35 #pragma interface
36 #endif
37 
38 #include <opal/buildopts.h>
39 
40 #include <opal/transcoders.h>
41 
42 #if OPAL_VIDEO
43 
44 #if OPAL_H323
45 #include <h323/h323caps.h>
46 #endif
47 
48 #include <codec/opalplugin.h>
49 
50 
51 #define OPAL_RGB24 "RGB24"
52 #define OPAL_RGB32 "RGB32"
53 #define OPAL_YUV420P "YUV420P"
54 
55 extern const OpalVideoFormat & GetOpalRGB24();
56 extern const OpalVideoFormat & GetOpalRGB32();
57 extern const OpalVideoFormat & GetOpalYUV420P();
58 
59 #define OpalRGB24 GetOpalRGB24()
60 #define OpalRGB32 GetOpalRGB32()
61 #define OpalYUV420P GetOpalYUV420P()
62 
63 
65 
73 {
75  public:
77 
85  );
87 
103  virtual bool UpdateMediaFormats(
106  );
107 
114  virtual PINDEX GetOptimalDataFrameSize(
115  PBoolean input
116  ) const;
117 
127  virtual PBoolean ExecuteCommand(
128  const OpalMediaCommand & command
129  );
130 
141  virtual PBoolean Convert(
142  const RTP_DataFrame & input,
143  RTP_DataFrame & output
144  );
145 
146 #if OPAL_STATISTICS
147  virtual void GetStatistics(OpalMediaStatistics & statistics) const;
148 #endif
149 
150  bool WasLastFrameIFrame() const { return lastFrameWasIFrame; }
151  void ForceIFrame() { forceIFrame = true; }
153 
154  protected:
155  PINDEX inDataSize;
156  PINDEX outDataSize;
159 
161  DWORD m_keyFrames;
162 };
163 
164 
166 
167 OPAL_DEFINE_MEDIA_COMMAND(OpalVideoFreezePicture, "Freeze Picture");
168 
175 {
177  public:
178  virtual PString GetName() const;
179 };
180 
187 {
189  public:
190  OpalVideoPictureLoss(unsigned sequenceNumber = 0, unsigned timestamp = 0);
191 
192  virtual PString GetName() const;
193 
194  unsigned GetSequenceNumber() const { return m_sequenceNumber; }
195  unsigned GetTimestamp() const { return m_timestamp; }
196 
197  protected:
199  unsigned m_timestamp;
200 };
201 
202 
211 {
213  public:
214  OpalTemporalSpatialTradeOff(int tradeoff) : m_tradeOff(tradeoff) { }
215 
216  virtual PString GetName() const;
217 
218  int GetTradeOff() const { return m_tradeOff; }
219 
220  protected:
222 };
223 
224 
225 #endif // OPAL_VIDEO
226 
227 #endif // OPAL_CODEC_VIDCODEC_H
228