00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef OPAL_CODEC_RFC2435_H
00030 #define OPAL_CODEC_RFC2435_H
00031
00032 #ifdef P_USE_PRAGMA
00033 #pragma interface
00034 #endif
00035
00036 #include <ptlib.h>
00037
00038 #include <opal/buildopts.h>
00039
00040 #if OPAL_RFC2435
00041
00042 #include <ptclib/random.h>
00043
00044 #include <opal/transcoders.h>
00045 #include <codec/opalplugin.h>
00046 #include <codec/vidcodec.h>
00047
00048 #include <jpeglib.h>
00049
00050 #define OPAL_RFC2435_JPEG "RFC2435_JPEG"
00051 extern const OpalVideoFormat & GetOpalRFC2435_JPEG();
00052 #define OpalRFC2435_JPEG GetOpalRFC2435_JPEG()
00053
00054
00056
00057 class OpalRFC2435Encoder : public OpalVideoTranscoder
00058 {
00059 PCLASSINFO(OpalRFC2435Encoder, OpalVideoTranscoder);
00060 public:
00061 OpalRFC2435Encoder();
00062 bool ConvertFrames(const RTP_DataFrame & input, RTP_DataFrameList & output);
00063
00064 public:
00065 struct jpeg_compress_struct m_jpegCompressor;
00066 };
00067
00069
00070 class OpalRFC2435Decoder : public OpalVideoTranscoder
00071 {
00072 PCLASSINFO(OpalRFC2435Decoder, OpalVideoTranscoder);
00073 public:
00074 OpalRFC2435Decoder();
00075
00076 bool ConvertFrames(const RTP_DataFrame & input, RTP_DataFrameList & output);
00077 };
00078
00080
00081 #define OPAL_REGISTER_RFC2435_JPEG() \
00082 OPAL_REGISTER_TRANSCODER(OpalRFC2435Decoder, OpalRFC2435_JPEG, OpalYUV420P); \
00083 OPAL_REGISTER_TRANSCODER(OpalRFC2435Encoder, OpalYUV420P, OpalRFC2435_JPEG);
00084
00086
00087 #endif // OPAL_RFC2435
00088
00089 #endif // OPAL_CODEC_RFC2435_H