#include <ExtensionManager.h>
The PRT plugin (extension) manager. This class is used as a singleton, see instance(). Its main use case is the creation of StreamAdaptors, ResolveMapProviders, Decoders and Encoders based on their extension IDs and URIs.
- See also
- prtx::Extension
-
prtx::Encoder
-
prtx::Decoder
-
prtx::StreamAdaptor
-
prtx::ResolveMapProvider
◆ addFactory()
Registers an extension factory class. Use this member function to register any custom extensions. Factories will be released on PRT shutdown (i.e. on destruction of the PRT license handle, see prt::init).
- Parameters
-
factory | The instance of the factory to register. Ownership is transferred to the ExtensionManager. |
◆ createDecoder() [1/2]
Creates a decoder instance which matches the content type and can handle a specific URI. If multiple compatible decoders are available the one with the highest merit is returned.
- Parameters
-
[in] | ct | The content type of the desired decoder instance. |
[in] | uri | The URI which the decoder must be able to handle. |
- Returns
- A shared pointer to a new decoder instance.
- See also
- prtx::Extension::getMerit()
◆ createDecoder() [2/2]
virtual DecoderPtr prtx::ExtensionManager::createDecoder |
( |
const std::wstring & |
id | ) |
const |
|
pure virtual |
Create a decoder directly by its identifier. See listDecoderIds().
- Returns
- A shared pointer to the new decoder instance.
◆ createDecoderInfo()
virtual prt::DecoderInfo const* prtx::ExtensionManager::createDecoderInfo |
( |
const std::wstring & |
id | ) |
const |
|
pure virtual |
Creates a decoder info object based on an decoder ID.
- Parameters
-
[in] | id | The ID of the new decoder info instance. |
- Returns
- A new DecoderInfo instance. Must be destroyed by the caller.
◆ createEncoder()
virtual EncoderPtr prtx::ExtensionManager::createEncoder |
( |
const std::wstring & |
id, |
|
|
const prt::AttributeMap * |
options, |
|
|
prt::Callbacks *const |
callbacks |
|
) |
| const |
|
pure virtual |
Creates an encoder instance based on its identifier. See listEncoderIds().
- Returns
- A shared pointer to the new encoder instance.
- Parameters
-
[in] | id | The ID of the encoder to be instantiated. |
[in] | options | Encoder options for the new instance. |
[in] | callbacks | Callbacks to be used by the new encoder instance. |
◆ createEncoderInfo()
virtual prt::EncoderInfo const* prtx::ExtensionManager::createEncoderInfo |
( |
const std::wstring & |
id | ) |
const |
|
pure virtual |
Creates an encoder info object based on an encoder ID. Throws prtx::StatusException if the id is unknown or if the corresponding EncoderFactory is not setup properly.
- Parameters
-
[in] | id | The ID of the new info instance. |
- Returns
- A new EncoderInfo instance. Must be destroyed by the caller.
◆ createResolveMapProvider()
virtual ResolveMapProviderPtr prtx::ExtensionManager::createResolveMapProvider |
( |
const prtx::URIPtr & |
uri | ) |
const |
|
pure virtual |
Create a resolve map provider which matches the URI. If multiple resolve map providers can handle the URI the one with the highest merit is returned.
- Parameters
-
[in] | uri | The uri which the resolve map provider must be able to handle. |
- Returns
- A shared pointer to the new resolve map provider instance.
◆ createStreamAdaptor()
virtual StreamAdaptorPtr prtx::ExtensionManager::createStreamAdaptor |
( |
const prtx::URIPtr & |
uri | ) |
const |
|
pure virtual |
Create a stream adaptor which matches the URI. If multiple stream adaptors can handle the URI the one with the highest merit is returned.
- Parameters
-
[in] | uri | The uri which the stream adaptor must be able to handle. |
- Returns
- A shared pointer to the new stream adaptor instance.
◆ instance()
◆ listDecoderIds()
virtual void prtx::ExtensionManager::listDecoderIds |
( |
std::vector< std::wstring > & |
result | ) |
const |
|
pure virtual |
◆ listEncoderIds()
virtual void prtx::ExtensionManager::listEncoderIds |
( |
std::vector< std::wstring > & |
result | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: