# 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: 28134 $
    00027  * $Author: rjongbloed $
    00028  * $Date: 2012-08-01 19:48:35 -0500 (Wed, 01 Aug 2012) $
    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_T38_CAPABILITY
    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(const 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 setCodecOptions;
    00239     OpalPluginControl getOutputDataSizeControl;
    00240 };
    00241
    00242
    00244
    00245 class OpalPluginAudioFormatInternal : public OpalAudioFormatInternal, public OpalPluginMediaFormatInternal
    00246 {
    00247   public:
    00248     friend class OpalPluginCodecManager;
    00249
    00250     OpalPluginAudioFormatInternal(
    00251       const PluginCodec_Definition * codecDefn,
    00252       const char * fmtName,
    00253       const char * rtpEncodingName,
    00254       unsigned frameTime,
    00255       unsigned timeUnits,
    00256       time_t timeStamp
    00257     );
    00258     virtual PObject * Clone() const;
    00259     virtual bool IsValidForProtocol(const PString & protocol) const;
    00260     virtual bool ToNormalisedOptions();
    00261     virtual bool ToCustomisedOptions();
    00262 };
    00263
    00264
    00265 class OpalPluginFramedAudioTranscoder : public OpalFramedTranscoder, public OpalPluginTranscoder
    00266 {
    00267   PCLASSINFO(OpalPluginFramedAudioTranscoder, OpalFramedTranscoder);
    00268   public:
    00269     OpalPluginFramedAudioTranscoder(const PluginCodec_Definition * codecDefn, bool isEncoder);
    00270     bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
    00271     PBoolean ExecuteCommand(const OpalMediaCommand & command);
    00272     PBoolean ConvertFrame(const BYTE * input, PINDEX & consumed, BYTE * output, PINDEX & created);
    00273     virtual PBoolean ConvertSilentFrame(BYTE * buffer);
    00274     virtual bool AcceptComfortNoise() const { return comfortNoise; }
    00275   protected:
    00276     bool comfortNoise;
    00277 };
    00278
    00279
    00280 class OpalPluginStreamedAudioTranscoder : public OpalStreamedTranscoder, public OpalPluginTranscoder
    00281 {
    00282   PCLASSINFO(OpalPluginStreamedAudioTranscoder, OpalStreamedTranscoder);
    00283   public:
    00284     OpalPluginStreamedAudioTranscoder(const PluginCodec_Definition * codec, bool isEncoder);
    00285     bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
    00286     PBoolean ExecuteCommand(const OpalMediaCommand & command);
    00287     virtual bool AcceptComfortNoise() const { return comfortNoise; }
    00288     virtual int ConvertOne(int from) const;
    00289   protected:
    00290     bool comfortNoise;
    00291 };
    00292
    00293
    00295
    00296 #if OPAL_VIDEO
    00297
    00298 class OpalPluginVideoFormatInternal : public OpalVideoFormatInternal, public OpalPluginMediaFormatInternal
    00299 {
    00300   public:
    00301     OpalPluginVideoFormatInternal(
    00302       const PluginCodec_Definition * codec,
    00303       const char * fmtName,
    00304       const char * rtpEncodingName,
    00305       time_t timeStamp
    00306     );
    00307     virtual PObject * Clone() const;
    00308     virtual bool IsValidForProtocol(const PString & protocol) const;
    00309     virtual bool ToNormalisedOptions();
    00310     virtual bool ToCustomisedOptions();
    00311 };
    00312
    00313
    00314 class OpalPluginVideoTranscoder : public OpalVideoTranscoder, public OpalPluginTranscoder
    00315 {
    00316   PCLASSINFO(OpalPluginVideoTranscoder, OpalVideoTranscoder);
    00317   public:
    00318     OpalPluginVideoTranscoder(const PluginCodec_Definition * codec, bool isEncoder);
    00319     ~OpalPluginVideoTranscoder();
    00320
    00321     PBoolean ConvertFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00322     bool UpdateMediaFormats(const OpalMediaFormat & input, const OpalMediaFormat & output);
    00323     PBoolean ExecuteCommand(const OpalMediaCommand & command);
    00324
    00325   protected:
    00326     bool EncodeFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00327     bool DecodeFrames(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00328     bool DecodeFrame(const RTP_DataFrame & src, RTP_DataFrameList & dstList);
    00329
    00330     RTP_DataFrame * m_bufferRTP;
    00331     DWORD           m_lastSequenceNumber;
    00332     DWORD           m_lastDecodedTimestamp; // For missing marker bit detection
    00333     DWORD           m_lastMarkerTimestamp;  // For continuous marker bit detection
    00334     bool            m_badMarkers;
    00335     PSimpleTimer    m_videoPictureLossTimer;
    00336
    00337 #if PTRACING
    00338     unsigned m_consecutiveIntraFrames;
    00339 #endif
    00340 };
    00341
    00342 #endif
    00343
    00345
    00346 #if OPAL_FAX
    00347
    00348 class OpalPluginFaxFormatInternal : public OpalMediaFormatInternal, public OpalPluginMediaFormatInternal
    00349 {
    00350   public:
    00351     OpalPluginFaxFormatInternal(
    00352       const PluginCodec_Definition * codec,
    00353       const char * fmtName,
    00354       const char * rtpEncodingName,
    00355       unsigned frameTime,
    00356       unsigned /*timeUnits*/,
    00357       time_t timeStamp
    00358     );
    00359     virtual PObject * Clone() const;
    00360     virtual bool IsValidForProtocol(const PString & protocol) const;
    00361 };
    00362
    00363 #endif // OPAL_FAX
    00364
    00365
    00367 //
    00368 //  this is the base class for codecs accessible via the abstract factory functions
    00369 //
    00370
    00378 class OpalFactoryCodec : public PObject {
    00379   PCLASSINFO(OpalFactoryCodec, PObject)
    00380   public:
    00382     virtual const struct PluginCodec_Definition * GetDefinition()
    00383     { return NULL; }
    00384
    00386     virtual PString GetInputFormat() const = 0;
    00387
    00389     virtual PString GetOutputFormat() const = 0;
    00390
    00392     virtual int Encode(const void * from,
    00393                          unsigned * fromLen,
    00394                              void * to,
    00395                                  unsigned * toLen,
    00396                      unsigned int * flag
    00397                        ) = 0;
    00398
    00400     virtual unsigned int GetSampleRate() const = 0;
    00401
    00403     virtual unsigned int GetBitsPerSec() const = 0;
    00404
    00406     virtual unsigned int GetFrameTime() const = 0;
    00407
    00409     virtual unsigned int GetSamplesPerFrame() const = 0;
    00410
    00412     virtual unsigned int GetBytesPerFrame() const = 0;
    00413
    00415     virtual unsigned int GetRecommendedFramesPerPacket() const = 0;
    00416
    00418     virtual unsigned int GetMaxFramesPerPacket() const = 0;
    00419
    00421     virtual BYTE         GetRTPPayload() const = 0;
    00422
    00424     virtual PString      GetSDPFormat() const = 0;
    00425 };
    00426
    00428
    00429 template<class TranscoderClass>
    00430 class OpalPluginTranscoderFactory : public OpalTranscoderFactory
    00431 {
    00432   public:
    00433     class Worker : public OpalTranscoderFactory::WorkerBase
    00434     {
    00435       public:
    00436         Worker(const OpalTranscoderKey & key, const PluginCodec_Definition * codec, bool enc)
    00437           : OpalTranscoderFactory::WorkerBase(), codecDefn(codec), isEncoder(enc)
    00438         { OpalTranscoderFactory::Register(key, this); }
    00439
    00440       protected:
    00441         virtual OpalTranscoder * Create(const OpalTranscoderKey &) const
    00442         { return new TranscoderClass(codecDefn, isEncoder); }
    00443
    00444         const PluginCodec_Definition * codecDefn;
    00445         bool isEncoder;
    00446     };
    00447 };
    00448
    00450 //
    00451 // Helper class for handling plugin capabilities
    00452 //
    00453
    00454 class H323PluginCapabilityInfo
    00455 {
    00456   public:
    00457     H323PluginCapabilityInfo(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
    00458
    00459     //H323PluginCapabilityInfo(const PString & _baseName);
    00460
    00461     const PString & GetFormatName() const
    00462     { return m_capabilityFormatName; }
    00463
    00464   protected:
    00465     const PluginCodec_Definition * m_codecDefn;
    00466     PString                        m_capabilityFormatName;
    00467 };
    00468
    00469 #if OPAL_H323
    00470
    00472 //
    00473 // Class for handling most audio plugin capabilities
    00474 //
    00475
    00476 class H323AudioPluginCapability : public H323AudioCapability,
    00477                                   public H323PluginCapabilityInfo
    00478 {
    00479   PCLASSINFO(H323AudioPluginCapability, H323AudioCapability);
    00480   public:
    00481     H323AudioPluginCapability(const PluginCodec_Definition * codecDefn,
    00482                               const OpalMediaFormat & mediaFormat,
    00483                               unsigned pluginSubType);
    00484
    00485     virtual PObject * Clone() const;
    00486
    00487     virtual PString GetFormatName() const;
    00488
    00489     virtual unsigned GetSubType() const;
    00490
    00491   protected:
    00492     unsigned pluginSubType;
    00493 };
    00494
    00495 #define OPAL_DECLARE_EMPTY_AUDIO_CAPABILITY(fmt, type) \
    00496 class fmt##_CapabilityRegisterer { \
    00497   public: \
    00498     fmt##_CapabilityRegisterer() \
    00499     { H323CapabilityFactory::Register(fmt, new H323AudioPluginCapability(fmt, fmt, type)); } \
    00500 }; \
    00501
    00502 #define OPAL_DEFINE_EMPTY_AUDIO_CAPABILITY(fmt) \
    00503 static fmt##_CapabilityRegisterer fmt##_CapabilityRegisterer_instance; \
    00504
    00506 //
    00507 // Class for handling G.723.1 codecs
    00508 //
    00509
    00510 class H323PluginG7231Capability : public H323AudioPluginCapability
    00511 {
    00512   PCLASSINFO(H323PluginG7231Capability, H323AudioPluginCapability);
    00513   public:
    00514     H323PluginG7231Capability(const PluginCodec_Definition * codecDefn,
    00515                               const OpalMediaFormat & mediaFormat);
    00516
    00517     virtual PObject * Clone() const;
    00518     virtual PBoolean OnSendingPDU(H245_AudioCapability & cap, unsigned packetSize) const;
    00519     virtual PBoolean OnReceivedPDU(const H245_AudioCapability & cap,  unsigned & packetSize);
    00520 };
    00521
    00522 #define OPAL_DECLARE_EMPTY_G7231_CAPABILITY(fmt, annex) \
    00523 class fmt##_CapabilityRegisterer { \
    00524   public: \
    00525     fmt##_CapabilityRegisterer() \
    00526     { H323CapabilityFactory::Register(fmt, new H323PluginG7231Capability(fmt, annex)); } \
    00527 }; \
    00528
    00529 #define OPAL_DEFINE_EMPTY_G7231_CAPABILITY(fmt) \
    00530 static fmt##_CapabilityRegisterer fmt##_CapabilityRegisterer_instance; \
    00531
    00533 //
    00534 // Class for handling non standard audio capabilities
    00535 //
    00536
    00537 class H323CodecPluginNonStandardAudioCapability : public H323NonStandardAudioCapability,
    00538                                                   public H323PluginCapabilityInfo
    00539 {
    00540   PCLASSINFO(H323CodecPluginNonStandardAudioCapability, H323NonStandardAudioCapability);
    00541   public:
    00542     H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition * codecDefn,
    00543                                               const OpalMediaFormat & mediaFormat,
    00544                                               H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
    00545                                               const unsigned char * data, unsigned dataLen);
    00546
    00547     H323CodecPluginNonStandardAudioCapability(const PluginCodec_Definition * codecDefn,
    00548                                               const OpalMediaFormat & mediaFormat,
    00549                                               const unsigned char * data, unsigned dataLen);
    00550
    00551     virtual PObject * Clone() const;
    00552
    00553     virtual PString GetFormatName() const;
    00554 };
    00555
    00557 //
    00558 // Class for handling generic audio capabilities
    00559 //
    00560
    00561 class H323CodecPluginGenericAudioCapability : public H323GenericAudioCapability,
    00562                                               public H323PluginCapabilityInfo
    00563 {
    00564   PCLASSINFO(H323CodecPluginGenericAudioCapability, H323GenericAudioCapability);
    00565   public:
    00566     H323CodecPluginGenericAudioCapability(const PluginCodec_Definition * codecDefn,
    00567                                           const OpalMediaFormat & mediaFormat,
    00568                                           const PluginCodec_H323GenericCodecData * data);
    00569
    00570     virtual PObject * Clone() const;
    00571     virtual PString GetFormatName() const;
    00572 };
    00573
    00574
    00575 #if OPAL_VIDEO
    00576
    00578 //
    00579 // Class for handling non standard video capabilities
    00580 //
    00581
    00582 class H323CodecPluginNonStandardVideoCapability : public H323NonStandardVideoCapability,
    00583                                                   public H323PluginCapabilityInfo
    00584 {
    00585   PCLASSINFO(H323CodecPluginNonStandardVideoCapability, H323NonStandardVideoCapability);
    00586   public:
    00587     H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition * codecDefn,
    00588                                               const OpalMediaFormat & mediaFormat,
    00589                                               H323NonStandardCapabilityInfo::CompareFuncType compareFunc,
    00590                                               const unsigned char * data, unsigned dataLen);
    00591
    00592     H323CodecPluginNonStandardVideoCapability(const PluginCodec_Definition * codecDefn,
    00593                                               const OpalMediaFormat & mediaFormat,
    00594                                               const unsigned char * data, unsigned dataLen);
    00595
    00596     virtual PObject * Clone() const;
    00597
    00598     virtual PString GetFormatName() const;
    00599 };
    00600
    00602 //
    00603 // Class for handling generic video capabilities
    00604 //
    00605
    00606 class H323CodecPluginGenericVideoCapability : public H323GenericVideoCapability,
    00607                                               public H323PluginCapabilityInfo
    00608 {
    00609   PCLASSINFO(H323CodecPluginGenericVideoCapability, H323GenericVideoCapability);
    00610   public:
    00611     H323CodecPluginGenericVideoCapability(const PluginCodec_Definition * codecDefn,
    00612                                           const OpalMediaFormat & mediaFormat,
    00613                                           const PluginCodec_H323GenericCodecData * data);
    00614
    00615     virtual PObject * Clone() const;
    00616
    00617     virtual PString GetFormatName() const;
    00618 };
    00619
    00621 //
    00622 // Class for handling H.261 plugin capabilities
    00623 //
    00624
    00625 class H323H261PluginCapability : public H323VideoCapability,
    00626                                  public H323PluginCapabilityInfo
    00627 {
    00628     PCLASSINFO(H323H261PluginCapability, H323VideoCapability);
    00629   public:
    00630     H323H261PluginCapability(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
    00631
    00632     Comparison Compare(const PObject & obj) const;
    00633
    00634     virtual PObject * Clone() const;
    00635
    00636     virtual PString GetFormatName() const;
    00637     virtual unsigned GetSubType() const;
    00638
    00639     virtual PBoolean OnSendingPDU(
    00640       H245_VideoCapability & pdu
    00641     ) const;
    00642
    00643     virtual PBoolean OnSendingPDU(
    00644       H245_VideoMode & pdu
    00645     ) const;
    00646
    00647     virtual PBoolean OnReceivedPDU(
    00648       const H245_VideoCapability & pdu
    00649     );
    00650 };
    00651
    00653 //
    00654 // Class for handling H.263 plugin capabilities
    00655 //
    00656
    00657 class H323H263PluginCapability : public H323VideoCapability,
    00658                                  public H323PluginCapabilityInfo
    00659 {
    00660   PCLASSINFO(H323H263PluginCapability, H323VideoCapability);
    00661   public:
    00662     H323H263PluginCapability(const PluginCodec_Definition * codecDefn, const OpalMediaFormat & mediaFormat);
    00663
    00664     Comparison Compare(const PObject & obj) const;
    00665
    00666     virtual PObject * Clone() const;
    00667
    00668     virtual PString GetFormatName() const;
    00669     virtual unsigned GetSubType() const;
    00670
    00671     virtual PBoolean OnSendingPDU(
    00672       H245_VideoCapability & pdu
    00673     ) const;
    00674
    00675     virtual PBoolean OnSendingPDU(
    00676       H245_VideoMode & pdu
    00677     ) const;
    00678
    00679     virtual PBoolean OnReceivedPDU(
    00680       const H245_VideoCapability & pdu
    00681     );
    00682     virtual PBoolean IsMatch(
    00683       const PASN_Choice & subTypePDU,
    00684       const PString & mediaPacketization
    00685     ) const;
    00686 };
    00687
    00688 #endif // OPAL_VIDEO
    00689 #endif // OPAL_H323
    00690
    00691 #endif // OPAL_CODEC_OPALPLUGINMGR_H