# rfc2435.h

Go to the documentation of this file.

    00001 /*
    00002  * RFC2435 JPEG transport for uncompressed video
    00003  *
    00004  * Open Phone Abstraction Library
    00005  *
    00006  * Copyright (C) 2010 Post Increment
    00007  *
    00008  * The contents of this file are subject to the Mozilla Public License
    00009  * Version 1.0 (the "License"); you may not use this file except in
    00010  * compliance with the License. You may obtain a copy of the License at
    00011  * http://www.mozilla.org/MPL/
    00012  *
    00013  * Software distributed under the License is distributed on an "AS IS"
    00014  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
    00015  * the License for the specific language governing rights and limitations
    00016  * under the License.
    00017  *
    00018  * The Original Code is Open Phone Abstraction Library.
    00019  *
    00020  * The Initial Developer of the Original Code is Post Increment
    00021  *
    00022  * Contributor(s): ______________________________________.
    00023  *
    00024  * $Revision: 25004 $
    00025  * $Author: rjongbloed $
    00026  * $Date: 2011-01-04 23:26:51 -0600 (Tue, 04 Jan 2011) $
    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