OPAL  Version 3.18.8
rfc2435.h
Go to the documentation of this file.
1 /*
2  * RFC2435 JPEG transport for uncompressed video
3  *
4  * Open Phone Abstraction Library
5  *
6  * Copyright (C) 2010 Post Increment
7  *
8  * The contents of this file are subject to the Mozilla Public License
9  * Version 1.0 (the "License"); you may not use this file except in
10  * compliance with the License. You may obtain a copy of the License at
11  * http://www.mozilla.org/MPL/
12  *
13  * Software distributed under the License is distributed on an "AS IS"
14  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15  * the License for the specific language governing rights and limitations
16  * under the License.
17  *
18  * The Original Code is Open Phone Abstraction Library.
19  *
20  * The Initial Developer of the Original Code is Post Increment
21  *
22  * Contributor(s): ______________________________________.
23  */
24 
25 #ifndef OPAL_CODEC_RFC2435_H
26 #define OPAL_CODEC_RFC2435_H
27 
28 #ifdef P_USE_PRAGMA
29 #pragma interface
30 #endif
31 
32 #include <ptlib.h>
33 
34 #include <opal_config.h>
35 
36 #if OPAL_RFC2435
37 
38 #include <ptclib/random.h>
39 
40 #include <opal/transcoders.h>
41 #include <codec/opalplugin.h>
42 #include <codec/vidcodec.h>
43 
44 #include <jpeglib.h>
45 
46 #define OPAL_RFC2435_JPEG "RFC2435_JPEG"
47 extern const OpalVideoFormat & GetOpalRFC2435_JPEG();
48 #define OpalRFC2435_JPEG GetOpalRFC2435_JPEG()
49 
50 
52 
53 class OpalRFC2435Encoder : public OpalVideoTranscoder
54 {
55  PCLASSINFO(OpalRFC2435Encoder, OpalVideoTranscoder);
56  public:
57  OpalRFC2435Encoder();
58  bool ConvertFrames(const RTP_DataFrame & input, RTP_DataFrameList & output);
59 
60  public:
61  struct jpeg_compress_struct m_jpegCompressor;
62 };
63 
65 
66 class OpalRFC2435Decoder : public OpalVideoTranscoder
67 {
68  PCLASSINFO(OpalRFC2435Decoder, OpalVideoTranscoder);
69  public:
70  OpalRFC2435Decoder();
71 
72  bool ConvertFrames(const RTP_DataFrame & input, RTP_DataFrameList & output);
73 };
74 
76 
77 #define OPAL_REGISTER_RFC2435_JPEG() \
78  OPAL_REGISTER_TRANSCODER(OpalRFC2435Decoder, OpalRFC2435_JPEG, OpalYUV420P); \
79  OPAL_REGISTER_TRANSCODER(OpalRFC2435Encoder, OpalYUV420P, OpalRFC2435_JPEG);
80 
82 
83 #endif // OPAL_RFC2435
84 
85 #endif // OPAL_CODEC_RFC2435_H
Definition: rtp.h:540
virtual PBoolean ConvertFrames(const RTP_DataFrame &input, RTP_DataFrameList &output)
Definition: mediafmt.h:1481
Definition: vidcodec.h:142