# opalpluginmgr.h

Go to the documentation of this file.

    00001 /*
    00002  * opalpluginmgr.h
    00003  *
    00004  * OPAL codec plugins handler
    00005  *
    00006  * OPAL Library
    00007  *
    00008  * Copyright (C) 2005-2006 Post Increment
    00009  *
    00010  * The contents of this file are subject to the Mozilla Public License
    00011  * Version 1.0 (the "License"); you may not use this file except in
    00012  * compliance with the License. You may obtain a copy of the License at
    00013  * http://www.mozilla.org/MPL/
    00014  *
    00015  * Software distributed under the License is distributed on an "AS IS"
    00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
    00017  * the License for the specific language governing rights and limitations
    00018  * under the License.
    00019  *
    00020  * The Original Code is Open Phone Abstraction Library.
    00021  *
    00022  * The Initial Developer of the Original Code is Post Increment
    00023  *
    00024  * Contributor(s): ______________________________________.
    00025  *
    00026  * $Revision: 29929 $
    00027  * $Author: rjongbloed $
    00028  * $Date: 2013-06-12 02:11:18 -0500 (Wed, 12 Jun 2013) $
    00029  */
    00030
    00031 #ifndef OPAL_CODEC_OPALPLUGINMGR_H
    00032 #define OPAL_CODEC_OPALPLUGINMGR_H
    00033
    00034 #ifdef P_USE_PRAGMA
    00035 #pragma interface
    00036 #endif
    00037
    00038 #include <ptlib/object.h>
    00039
    00040 #include <opal/buildopts.h>
    00041
    00042 #include <ptlib/pluginmgr.h>
    00043 #include <ptlib/pfactory.h>
    00044 #include <codec/opalplugin.h>
    00045 #include <opal/mediafmt.h>
    00046 #include <opal/transcoders.h>
    00047
    00048 #if OPAL_H323
    00049 #include <h323/h323caps.h>
    00050 #endif
    00051
    00052 #if OPAL_VIDEO
    00053 #include <codec/vidcodec.h>
    00054 #endif
    00055
    00056
    00058
    00059 class H323Capability;
    00060
    00061 class H323StaticPluginCodec
    00062 {
    00063   public:
    00064     virtual ~H323StaticPluginCodec() { }
    00065     virtual PluginCodec_GetAPIVersionFunction Get_GetAPIFn() = 0;
    00066     virtual PluginCodec_GetCodecFunction Get_GetCodecFn() = 0;
    00067 };
    00068
    00069 typedef PFactory<H323StaticPluginCodec> H323StaticPluginCodecFactory;
    00070
    00071
    00073
    00074 class OpalPluginCodecManager;
    00075
    00076 PFACTORY_LOAD(OpalPluginCodecManager);
    00077
    00078 class OpalPluginCodecHandler : public PObject
    00079 {
    00080   PCLASSINFO(OpalPluginCodecHandler, PObject);
    00081   public:
    00082     OpalPluginCodecHandler();
    00083
    00084     static int GetChannelCount(const PluginCodec_Definition * codeDefn);
    00085
    00086     virtual OpalMediaFormatInternal * OnCreateAudioFormat(OpalPluginCodecManager & mgr,
    00087                                             const PluginCodec_Definition * codecDefn,
    00088                                                               const char * fmtName,
    00089                                                               const char * rtpEncodingName,
    00090                                                                   unsigned frameTime,
    00091                                                                   unsigned timeUnits,
    00092                                                                     time_t timeStamp);
    00093
    00094 #if OPAL_VIDEO
    00095     virtual OpalMediaFormatInternal * OnCreateVideoFormat(OpalPluginCodecManager & mgr,
    00096                                             const PluginCodec_Definition * codecDefn,
    00097                                                               const char * fmtName,
    00098                                                               const char * rtpEncodingName,
    00099                                                                     time_t timeStamp);
    00100     virtual void RegisterVideoTranscoder(const PString & src, const PString & dst, const PluginCodec_Definition * codec, bool v);
    00101 #endif
    00102
    00103 #if OPAL_FAX
    00104     virtual OpalMediaFormatInternal * OnCreateFaxFormat(OpalPluginCodecManager & mgr,
    00105                                           const PluginCodec_Definition * codecDefn,
    00106                                                             const char * fmtName,
    00107                                                             const char * rtpEncodingName,
    00108                                                                 unsigned frameTime,
    00109                                                                 unsigned timeUnits,
    00110                                                                   time_t timeStamp);
    00111 #endif
    00112 };
    00113
    00114
    00115 class OpalPluginCodecManager : public PPluginModuleManager
    00116 {
    00117   PCLASSINFO(OpalPluginCodecManager, PPluginModuleManager);
    00118   public:
    00119     OpalPluginCodecManager(PPluginManager * pluginMgr = NULL);
    00120     ~OpalPluginCodecManager();
    00121
    00122     PFACTORY_GET_SINGLETON(PFactory<PPluginModuleManager>, OpalPluginCodecManager);
    00123
    00124     void RegisterStaticCodec(const H323StaticPluginCodecFactory::Key_T & name,
    00125                              PluginCodec_GetAPIVersionFunction getApiVerFn,
    00126                              PluginCodec_GetCodecFunction getCodecFn);
    00127
    00128     void OnLoadPlugin(PDynaLink & dll, INT code);
    00129
    00130     virtual void OnShutdown();
    00131
    00132 #if OPAL_H323
    00133     H323Capability * CreateCapability(
    00134           const PString & _mediaFormat,
    00135           const PString & _baseName,
    00136                  unsigned maxFramesPerPacket,
    00137                  unsigned recommendedFramesPerPacket,
    00138                  unsigned _pluginSubType);
    00139 #endif
    00140
    00141   protected:
    00142     // Note the below MUST NOT be an OpalMediaFormatList
    00143     PList<OpalMediaFormat> mediaFormatsOnHeap;
    00144
    00145     void RegisterCodecPlugins  (unsigned int count, const PluginCodec_Definition * codecList, OpalPluginCodecHandler * handler);
    00146     void UnregisterCodecPlugins(unsigned int count, const PluginCodec_Definition * codecList, OpalPluginCodecHandler * handler);
    00147
    00148     bool AddMediaFormat(OpalPluginCodecHandler * handler, const PTime & timeNow, const PluginCodec_Definition * codecDefn, const char * fmtName);
    00149 #if OPAL_H323
    00150     void RegisterCapability(const PluginCodec_Definition * codecDefn);
    00151 #endif
    00152 };
    00153
    00154
    00156
    00157 class OpalPluginControl
    00158 {
    00159   public:
    00160     OpalPluginControl(const PluginCodec_Definition * def, const char * name);
    00161
    00162     bool Exists() const
    00163     {
    00164       return controlDef != NULL;
    00165     }
    00166
    00167     int Call(void * parm, unsigned * parmLen, void * context = NULL) const
    00168     {
    00169       return controlDef != NULL ? (*controlDef->control)(codecDef, context, fnName, parm, parmLen) : -1;
    00170     }
    00171
    00172     int Call(void * parm, unsigned   parmLen, void * context = NULL) const
    00173     {
    00174       return Call(parm, &parmLen, context);
    00175     }
    00176
    00177     const char * GetName() const { return fnName; }
    00178
    00179   protected:
    00180     const PluginCodec_Definition  * codecDef;
    00181     const char                    * fnName;
    00182     const PluginCodec_ControlDefn * controlDef;
    00183 };
    00184
    00185
    00187
    00188 class OpalPluginMediaFormatInternal
    00189 {
    00190   public:
    00191     OpalPluginMediaFormatInternal(const PluginCodec_Definition * defn);
    00192
    00193     bool AdjustOptions(OpalMediaFormatInternal & fmt, OpalPluginControl & control) const;
    00194     void PopulateOptions(OpalMediaFormatInternal & format);
    00195     void SetOldStyleOption(OpalMediaFormatInternal & format, const PString & _key, const PString & _val, const PString & type);
    00196     bool IsValidForProtocol(const PString & _protocol) const;
    00197
    00198     const PluginCodec_Definition * codecDef;
    00199     OpalPluginControl getOptionsControl;
    00200     OpalPluginControl freeOptionsControl;
    00201     OpalPluginControl validForProtocolControl;
    00202     OpalPluginControl toNormalisedControl;
    00203     OpalPluginControl toCustomisedControl;
    00204 };
    00205
    00206
    00207 class OpalPluginMediaFormat : public OpalMediaFormat
    00208 {
    00209   public:
    00210     OpalPluginMediaFormat(OpalMediaFormatInternal * info)
    00211       : OpalMediaFormat(info)
    00212     {
    00213     }
    00214
    00215     OpalPluginMediaFormatInternal * GetInfo() const { return dynamic_cast<OpalPluginMediaFormatInternal *>(m_info); }
    00216 };
    00217
    00218
    00219 class OpalPluginTranscoder
    00220 {
    00221   public:
    00222     OpalPluginTranscoder(const PluginCodec_Definition * defn, bool isEnc);
    00223     ~OpalPluginTranscoder();
    00224
    00225     bool UpdateOptions(OpalMediaFormat & fmt);
    00226     bool ExecuteCommand(const OpalMediaCommand & command);
    00227     bool Transcode(const void * from, unsigned * fromLen, void * to, unsigned * toLen, unsigned * flags) const
    00228     {
    00229       return codecDef != NULL && codecDef->codecFunction != NULL &&
    00230             (codecDef->codecFunction)(codecDef, context, from, fromLen, to, toLen, flags) != 0;
    00231     }
    00232
    00233   protected:
    00234     const PluginCodec_Definition * codecDef;
    00235     bool   isEncoder;
    00236     void * context;
    00237
    00238     OpalPluginControl setCodecOptionsControl;
    00239     OpalPluginControl getActiveOptionsControl;
    00240     OpalPluginControl freeOptionsControl;
    00241     OpalPluginControl getOutputDataSizeControl;
    00242     OpalPluginControl getCodecStatistics;
    00243 };
    00244
    00245
    00247
    00248 class OpalPluginAudioFormatInternal : public OpalAudioFormatInternal, public OpalPluginMediaFormatInternal
    00249 {
    00250   public:
    00251     friend class OpalPluginCodecManager;
    00252
    00253     OpalPluginAudioFormatInternal(
    00254       const PluginCodec_Definition * codecDefn,
    00255       const char * fmtName,
    00256       const char * rtpEncodingName,
    00257       unsigned frameTime,
    00258       unsigned timeUnits,
    00259       time_t timeStamp
    00260     );
    00261     virtual PObject * Clone() const;
    00262     virtual bool IsValidForProtocol(const PString & protocol) const;
    00263     virtual bool ToNormalisedOptions();
    00264     virtual bool ToCustomisedOptions();
    00265 };
    00266
    00267
    00268 class OpalPluginFramedAudioTranscoder : public OpalFramedTranscoder, public OpalPluginTranscoder
    00269 {
    00270   PCLASSINFO(OpalPluginFramedAudioTranscoder, OpalFramedTranscoder);
    00271   public:
    00272     OpalPluginFramedAudioTranscoder(const PluginCodec_Definition * codecDefn, bool isEncoder);
    00273     bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
    00274     PBoolean ExecuteCommand(const OpalMediaCommand & command);
    00275     PBoolean ConvertFrame(const BYTE * input, PINDEX & consumed, BYTE * output, PINDEX & created);
    00276     virtual PBoolean ConvertSilentFrame(BYTE * buffer);
    00277     virtual bool AcceptComfortNoise() const { return comfortNoise; }
    00278   protected:
    00279     bool comfortNoise;
    00280 };
    00281
    00282
    00283 class OpalPluginStreamedAudioTranscoder : public OpalStreamedTranscoder, public OpalPluginTranscoder
    00284 {
    00285   PCLASSINFO(OpalPluginStreamedAudioTranscoder, OpalStreamedTranscoder);
    00286   public:
    00287     OpalPluginStreamedAudioTranscoder(const PluginCodec_Definition * codec, bool isEncoder);
    00288     bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
    00289     PBoolean ExecuteCommand(const OpalMediaCommand & command);
    00290     virtual bool AcceptComfortNoise() const { return comfortNoise; }
    00291     virtual int ConvertOne(int from) const;
    00292   protected:
    00293     bool comfortNoise;
    00294 };
    00295
    00296
    00298
    00299 #if OPAL_VIDEO
    00300
    00301 class OpalPluginVideoFormatInternal : public OpalVideoFormatInternal, public OpalPluginMediaFormatInternal
    00302 {
    00303   public:
    00304     OpalPluginVideoFormatInternal(
    00305       const PluginCodec_Definition * codec,
    00306       const char * fmtName,
    00307       const char * rtpEncodingName,
    00308       time_t timeStamp
    00309     );
    00310     virtual PObject * Clone() const;
    00311     virtual bool IsValidForProtocol(const PString & protocol) const;
    00312     virtual bool ToNormalisedOptions();
    00313     virtual bool ToCustomisedOptions();
    00314 };
    00315
    00316
    00317 class OpalPluginVideoTranscoder : public OpalVideoTranscoder, public OpalPluginTranscoder
    00318 {
    00319   PCLASSINFO(OpalPluginVideoTranscoder, OpalVideoTranscoder);
    00320   public:
    00321     OpalPluginVideoTranscoder(const PluginCodec_Definition * codec, bool isEncoder);
    00322     ~OpalPluginVideoTranscoder();
    00323
    00324 #if OPAL_STATISTICS
    00325     virtual void GetStatistics(OpalMediaStatistics & statistics) const;
    00326 #endif
    00327
    00328     PBoolean ConvertFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00329     bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
    00330     PBoolean ExecuteCommand(const OpalMediaCommand & command);
    00331
    00332   protected:
    00333     bool EncodeFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00334     bool DecodeFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00335     bool DecodeFrame(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00336
    00337     RTP_DataFrame * m_bufferRTP;
    00338     DWORD           m_lastSequenceNumber;
    00339     DWORD           m_lastDecodedTimestamp; // For missing marker bit detection
    00340     DWORD           m_lastMarkerTimestamp;  // For continuous marker bit detection
    00341     bool            m_badMarkers;
    00342
    00343 #if PTRACING
    00344     unsigned m_consecutiveIntraFrames;
    00345 #endif
    00346 };
    00347
    00348 #endif
    00349
    00351
    00352 #if OPAL_FAX
    00353
    00354 class OpalPluginFaxFormatInternal : public OpalMediaFormatInternal, public OpalPluginMediaFormatInternal
    00355 {
    00356   public:
    00357     OpalPluginFaxFormatInternal(
    00358       const PluginCodec_Definition * codec,
    00359       const char * fmtName,
    00360       const char * rtpEncodingName,
    00361       unsigned frameTime,
    00362       unsigned /*timeUnits*/,
    00363       time_t timeStamp
    00364     );
    00365     virtual PObject * Clone() const;
    00366     virtual bool IsValidForProtocol(const PString & protocol) const;
    00367 };
    00368
    00369 #endif // OPAL_FAX
    00370
    00371
    00373 //
    00374 //  this is the base class for codecs accessible via the abstract factory functions
    00375 //
    00376
    00384 class OpalFactoryCodec : public PObject {
    00385   PCLASSINFO(OpalFactoryCodec, PObject)
    00386   public:
    00388     virtual const struct PluginCodec_Definition * GetDefinition()
    00389     { return NULL; }
    00390
    00392     virtual PString GetInputFormat() const = 0;
    00393
    00395     virtual PString GetOutputFormat() const = 0;
    00396
    00398     virtual int Encode(const void * from,
    00399                          unsigned * fromLen,
    00400                              void * to,
    00401                                  unsigned * toLen,
    00402                      unsigned int * flag
    00403                        ) = 0;
    00404
    00406     virtual unsigned int GetSampleRate() const = 0;
    00407
    00409     virtual unsigned int GetBitsPerSec() const = 0;
    00410
    00412     virtual unsigned int GetFrameTime() const = 0;
    00413
    00415     virtual unsigned int GetSamplesPerFrame() const = 0;
    00416
    00418     virtual unsigned int GetBytesPerFrame() const = 0;
    00419
    00421     virtual unsigned int GetRecommendedFramesPerPacket() const = 0;
    00422
    00424     virtual unsigned int GetMaxFramesPerPacket() const = 0;
    00425
    00427     virtual BYTE         GetRTPPayload() const = 0;
    00428
    00430     virtual PString      GetSDPFormat() const = 0;
    00431 };
    00432
    00434
    00435 template<class TranscoderClass>
    00436 class OpalPluginTranscoderFactory : public OpalTranscoderFactory
    00437 {
    00438   public:
    00439     class Worker : public OpalTranscoderFactory::WorkerBase
    00440     {
    00441       public:
    00442         Worker(const OpalTranscoderKey & key, const PluginCodec_Definition * codec, bool enc)
    00443           : OpalTranscoderFactory::WorkerBase(), codecDefn(codec), isEncoder(enc)
    00444         { OpalTranscoderFactory::Register(key, this); }
    00445
    00446       protected:
    00447         virtual OpalTranscoder * Create(const OpalTranscoderKey &) const
    00448         { return new TranscoderClass(codecDefn, isEncoder); }
    00449
    00450         const PluginCodec_Definition * codecDefn;
    00451         bool isEncoder;
    00452     };
    00453 };
    00454
    00456 //
    00457 // Helper class for handling plugin capabilities
    00458 //
    00459
    00460 class H323PluginCapabilityInfo
    00461 {
    00462   public:
    00463     H323PluginCapabilityInfo(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
    00464
    00465     //H323PluginCapabilityInfo(const PString & _baseName);
    00466
    00467     const PString & GetFormatName() const
    00468     { return m_capabilityFormatName; }
    00469
    00470   protected:
    00471     const PluginCodec_Definition * m_codecDefn;
    00472     PString                        m_capabilityFormatName;
    00473 };
    00474
    00475 #if OPAL_H323
    00476
    00478 //
    00479 // Class for handling most audio plugin capabilities
    00480 //
    00481
    00482 class H323AudioPluginCapability : public H323AudioCapability,
    00483                                   public H323PluginCapabilityInfo
    00484 {
    00485   PCLASSINFO(H323AudioPluginCapability, H323AudioCapability);
    00486   public:
    00487     H323AudioPluginCapability(const PluginCodec_Definition * codecDefn,
    00488                               const OpalMediaFormat & mediaFormat,
    00489                               unsigned pluginSubType);
    00490
    00491     virtual PObject * Clone() const;
    00492
    00493     virtual PString GetFormatName() const;
    00494
    00495     virtual unsigned GetSubType() const;
    00496
    00497   protected:
    00498     unsigned pluginSubType;
    00499 };
    00500
    00501
    00503 //
    00504 // Class for handling G.723.1 codecs
    00505 //
    00506
    00507 class H323PluginG7231Capability : public H323AudioPluginCapability
    00508 {
    00509   PCLASSINFO(H323PluginG7231Capability, H323AudioPluginCapability);
    00510   public:
    00511     H323PluginG7231Capability(const PluginCodec_Definition * codecDefn,
    00512                               const OpalMediaFormat & mediaFormat);
    00513
    00514     virtual PObject * Clone() const;
    00515     virtual PBoolean OnSendingPDU(H245_AudioCapability & cap, unsigned packetSize) const;
    00516     virtual PBoolean OnReceivedPDU(const H245_AudioCapability & cap,  unsigned & packetSize);
    00517 };
    00518
    00519
    00521 //
    00522 // Class for handling non standard audio capabilities
    00523 //
    00524
    00525 class H323CodecPluginNonStandardAudioCapability : public H323NonStandardAudioCapability,
    00526                                                   public H323PluginCapabilityInfo
    00527 {
    00528   PCLASSINFO(H323CodecPluginNonStandardAudioCapability, H323NonStandardAudioCapability);
    00529   public:
    00530     H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition * codecDefn,
    00531                                               const OpalMediaFormat & mediaFormat,
    00532                                               H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
    00533                                               const unsigned char * data, unsigned dataLen);
    00534
    00535     H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition * codecDefn,
    00536                                               const OpalMediaFormat & mediaFormat,
    00537                                               const unsigned char * data, unsigned dataLen);
    00538
    00539     virtual PObject * Clone() const;
    00540
    00541     virtual PString GetFormatName() const;
    00542 };
    00543
    00545 //
    00546 // Class for handling generic audio capabilities
    00547 //
    00548
    00549 class H323CodecPluginGenericAudioCapability : public H323GenericAudioCapability,
    00550                                               public H323PluginCapabilityInfo
    00551 {
    00552   PCLASSINFO(H323CodecPluginGenericAudioCapability, H323GenericAudioCapability);
    00553   public:
    00554     H323CodecPluginGenericAudioCapability(const PluginCodec_Definition * codecDefn,
    00555                                           const OpalMediaFormat & mediaFormat,
    00556                                           const PluginCodec_H323GenericCodecData * data);
    00557
    00558     virtual PObject * Clone() const;
    00559     virtual PString GetFormatName() const;
    00560 };
    00561
    00562
    00563 #if OPAL_VIDEO
    00564
    00566 //
    00567 // Class for handling non standard video capabilities
    00568 //
    00569
    00570 class H323CodecPluginNonStandardVideoCapability : public H323NonStandardVideoCapability,
    00571                                                   public H323PluginCapabilityInfo
    00572 {
    00573   PCLASSINFO(H323CodecPluginNonStandardVideoCapability, H323NonStandardVideoCapability);
    00574   public:
    00575     H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition * codecDefn,
    00576                                               const OpalMediaFormat & mediaFormat,
    00577                                               H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
    00578                                               const unsigned char * data, unsigned dataLen);
    00579
    00580     H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition * codecDefn,
    00581                                               const OpalMediaFormat & mediaFormat,
    00582                                               const unsigned char * data, unsigned dataLen);
    00583
    00584     virtual PObject * Clone() const;
    00585
    00586     virtual PString GetFormatName() const;
    00587 };
    00588
    00590 //
    00591 // Class for handling generic video capabilities
    00592 //
    00593
    00594 class H323CodecPluginGenericVideoCapability : public H323GenericVideoCapability,
    00595                                               public H323PluginCapabilityInfo
    00596 {
    00597   PCLASSINFO(H323CodecPluginGenericVideoCapability, H323GenericVideoCapability);
    00598   public:
    00599     H323CodecPluginGenericVideoCapability(const PluginCodec_Definition * codecDefn,
    00600                                           const OpalMediaFormat & mediaFormat,
    00601                                           const PluginCodec_H323GenericCodecData * data);
    00602
    00603     virtual PObject * Clone() const;
    00604
    00605     virtual PString GetFormatName() const;
    00606 };
    00607
    00609 //
    00610 // Class for handling H.261 plugin capabilities
    00611 //
    00612
    00613 class H323H261Capability : public H323VideoCapability
    00614 {
    00615     PCLASSINFO(H323H261Capability, H323VideoCapability);
    00616   public:
    00617     H323H261Capability();
    00618
    00619     Comparison Compare(const PObject & obj) const;
    00620
    00621     virtual PObject * Clone() const;
    00622
    00623     virtual PString GetFormatName() const;
    00624     virtual unsigned GetSubType() const;
    00625
    00626     virtual PBoolean OnSendingPDU(
    00627       H245_VideoCapability & pdu
    00628     ) const;
    00629
    00630     virtual PBoolean OnSendingPDU(
    00631       H245_VideoMode & pdu
    00632     ) const;
    00633
    00634     virtual PBoolean OnReceivedPDU(
    00635       const H245_VideoCapability & pdu
    00636     );
    00637 };
    00638
    00639
    00640 class H323H261PluginCapability : public H323H261Capability,
    00641                                  public H323PluginCapabilityInfo
    00642 {
    00643     PCLASSINFO(H323H261PluginCapability, H323VideoCapability);
    00644   public:
    00645     H323H261PluginCapability(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
    00646
    00647     virtual PObject * Clone() const;
    00648 };
    00649
    00650
    00652 //
    00653 // Class for handling H.263 plugin capabilities
    00654 //
    00655
    00656 class H323H263Capability : public H323VideoCapability
    00657 {
    00658   public:
    00659     H323H263Capability(const PString & variant);
    00660
    00661     Comparison Compare(const PObject & obj) const;
    00662
    00663     virtual PObject * Clone() const;
    00664
    00665     virtual PString GetFormatName() const;
    00666     virtual unsigned GetSubType() const;
    00667
    00668     virtual PBoolean OnSendingPDU(
    00669       H245_VideoCapability & pdu
    00670     ) const;
    00671
    00672     virtual PBoolean OnSendingPDU(
    00673       H245_VideoMode & pdu
    00674     ) const;
    00675
    00676     virtual PBoolean OnReceivedPDU(
    00677       const H245_VideoCapability & pdu
    00678     );
    00679     virtual PBoolean IsMatch(
    00680       const PASN_Choice & subTypePDU,
    00681       const PString & mediaPacketization
    00682     ) const;
    00683
    00684   protected:
    00685     PString m_variant;
    00686 };
    00687
    00688 class H323H263PluginCapability : public H323H263Capability,
    00689                                  public H323PluginCapabilityInfo
    00690 {
    00691     PCLASSINFO(H323H263PluginCapability, H323VideoCapability);
    00692   public:
    00693     H323H263PluginCapability(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat)
    00694       : H323H263Capability(mediaFormat)
    00695       , H323PluginCapabilityInfo(codecDefn, mediaFormat)
    00696     {
    00697     }
    00698 };
    00699
    00700 #endif // OPAL_VIDEO
    00701 #endif // OPAL_H323
    00702
    00703 #endif // OPAL_CODEC_OPALPLUGINMGR_H