15 #ifndef _MpCodecFactory_h_ 16 #define _MpCodecFactory_h_ 26 #include "sdp/SdpCodecList.h" 27 #include "utl/UtlHashBag.h" 28 #include "utl/UtlHashBagIterator.h" 29 #include "os/OsSharedLibMgr.h" 30 #include "os/OsStatus.h" 31 #include "os/OsBSem.h" 35 #ifdef __pingtel_on_posix__ // [ 36 # define CODEC_PLUGINS_FILTER "^codec_.*\\.so$" 37 #elif defined(WIN32) // __pingtel_on_posix__ ] [ 38 # define CODEC_PLUGINS_FILTER "^codec_.*\\.dll$" 40 # error Unknown platform! Please specify correct codec plugins file filter. 110 const UtlString &fmtp,
126 const UtlString &fmtp,
180 int numChannels)
const;
227 #endif // _MpCodecFactory_h_ static void freeStaticCodecs()
Freeing internal data of static codecs. Should be called only from global .dtor.
Definition: MpCodecFactory.cpp:532
void getCodecInfoArray(unsigned &count, const MppCodecInfoV1_1 **&codecInfoArray) const
Get list of all codecs' info.
Definition: MpCodecFactory.cpp:385
static MpCodecFactory * spInstance
Pointer to the singleton instance.
Definition: MpCodecFactory.h:206
Definition: MpCodecFactory.h:58
MpCodecSubInfo * searchByMIME(const UtlString &mime, int sampleRate, int numChannels) const
Search codec by given MIME-subtype, sample rate and channels number.
Definition: MpCodecFactory.cpp:455
static MpCodecCallInfoV1 * sStaticCodecsV1
Filled by global magic .ctor.
Definition: MpCodecFactory.h:209
Base class for all media processing decoders.
Definition: MpDecoderBase.h:37
OsStatus createEncoder(const UtlString &mime, const UtlString &fmtp, int sampleRate, int numChannels, int payloadType, MpEncoderBase *&rpEncoder) const
Returns a new instance of an encoder of the indicated type.
Definition: MpCodecFactory.cpp:351
Object-oriented wrapper for codec.
Definition: MpPlgStaffV1.h:94
OsStatus loadDynCodec(const char *name)
Load specified codec plugin.
Definition: MpCodecFactory.cpp:133
Base class for all media processing encoders.
Definition: MpEncoderBase.h:35
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
Definition: MpCodecFactory.cpp:34
unsigned mCachedCodecInfoNum
Number of elements in mpMimeTypesCache.
Definition: MpCodecFactory.h:201
OsStatus createDecoder(const UtlString &mime, const UtlString &fmtp, int sampleRate, int numChannels, int payloadType, MpDecoderBase *&rpDecoder) const
Returns a new instance of a decoder of the indicated type.
Definition: MpCodecFactory.cpp:315
void updateCodecInfoCache() const
Update cached array of MIME-types of loaded codecs.
Definition: MpCodecFactory.cpp:548
static MpCodecFactory * getMpCodecFactory(void)
Get/create singleton factory.
Definition: MpCodecFactory.cpp:75
OsStatus addCodecWrapperV1(MpCodecCallInfoV1 *wrapper)
Add new codec wrapper to codec list.
Definition: MpCodecFactory.cpp:569
static OsBSem sLock
Definition: MpCodecFactory.h:207
void freeAllLoadedLibsAndCodec()
Deinitialize all dynamic codecs. Should be called only from mpShutdown()
Definition: MpCodecFactory.cpp:487
static MpCodecCallInfoV1 * addStaticCodec(MpCodecCallInfoV1 *sStaticCode)
Add static codec to factory.
Definition: MpCodecFactory.cpp:294
UtlHashBag mCodecsInfo
List of all known and workable codecs.
Definition: MpCodecFactory.h:199
UtlBoolean mCodecInfoCacheValid
Should we rebuild MIME-subtypes cache?
Definition: MpCodecFactory.h:200
MpCodecFactory & operator=(const MpCodecFactory &rhs)
Assignment operator (not supported)
static void freeSingletonHandle()
Deinitialize all static codecs and freeing handle. Should be called only mpShutdown() ...
Definition: MpCodecFactory.cpp:92
~MpCodecFactory()
Destructor.
Definition: MpCodecFactory.cpp:112
const MppCodecInfoV1_1 ** mpCodecInfoCache
This is used as return value of getMimeTypes().
Definition: MpCodecFactory.h:202
void addCodecsToList(SdpCodecList &codecList) const
Add all supported codecs to SDP descriptions list.
Definition: MpCodecFactory.cpp:397
OsStatus loadAllDynCodecs(const char *path, const char *regexFilter)
Load all codec plugins within specified path and filter.
Definition: MpCodecFactory.cpp:267
void initializeStaticCodecs()
Initialize all static codecs.
Definition: MpCodecFactory.cpp:523
Generic information about codec.
Definition: PlgDefsV1.h:169
MpCodecFactory()
Constructor (called only indirectly via getMpCodecFactory())
Definition: MpCodecFactory.cpp:104