|
Ocean
|
This class is the base class for all media libraries. More...
#include <Library.h>
Data Structures | |
| class | Definition |
| Class combining the url, type, library of a medium, and a unique identifier. More... | |
Public Types | |
| typedef std::vector< Definition > | Definitions |
| Definition of a vector holding medium definition objects. | |
Public Member Functions | |
| const std::string & | name () const |
| Returns the name of the library. | |
| virtual MediumRef | newMedium (const std::string &url, bool useExclusive=false)=0 |
| Creates a new medium by a given url. | |
| virtual MediumRef | newMedium (const std::string &url, const Medium::Type type, bool useExclusive=false)=0 |
| Creates a new medium by a given url and an expected type. | |
| virtual RecorderRef | newRecorder (const Recorder::Type type)=0 |
| Creates a new recorder specified by the recorder type. | |
| virtual Definitions | selectableMedia () const |
| Returns a list of selectable mediums. | |
| virtual Definitions | selectableMedia (const Medium::Type type) const |
| Returns a list of specific selectable mediums. | |
| bool | supports (const Medium::Type type) const |
| Returns whether the library supports a given medium type. | |
| virtual Medium::Type | supportedTypes () const |
| Returns the supported medium types. | |
| bool | notSupported (const std::string &extension) const |
| Returns whether a given file extension is not supported by this library. | |
Static Public Member Functions | |
| static std::string | convertDefinition (const Definition &definition) |
| Converts a medium definition to one string. | |
| static Definition | convertDefinition (const std::string &string) |
| Converts a string to a medium definition. | |
Protected Types | |
| typedef std::set< std::string > | ExtensionSet |
| Definition of a set holding file extensions. | |
Protected Member Functions | |
| Library (const Library &library)=delete | |
| Disabled copy constructor. | |
| Library (const std::string &name, const unsigned int priority) | |
| Creates a new Library object. | |
| virtual | ~Library () |
| Destructs a library. | |
| unsigned int | priority () const |
| Returns the priority of this library. | |
| void | registerNotSupportedExtension (const std::string &extension) |
| Registers file extensions not supported by this library. | |
| Library & | operator= (const Library &library)=delete |
| Disabled copy operator. | |
Protected Attributes | |
| std::string | libraryName |
| The name of the library. | |
| unsigned int | libraryPriority |
| Priority of this library, the higher the value, the higher the priority. | |
| Lock | lock |
| Library lock. | |
Private Attributes | |
| ExtensionSet | notSupportedExtensionSet |
| Set holding file extensions which are not supported by this library. | |
Friends | |
| class | Manager |
| class | ObjectRef< Library > |
This class is the base class for all media libraries.
Any derived library providing individual types of media objects must implement a library class which must be registered at the Manager object of the base media library.
A derived library may implement only one type of media object, all types of media objects or a subset of the media objects.
| typedef std::vector<Definition> Ocean::Media::Library::Definitions |
Definition of a vector holding medium definition objects.
|
protected |
Definition of a set holding file extensions.
|
protecteddelete |
Disabled copy constructor.
| library | Object which would be copied |
|
protected |
Creates a new Library object.
| name | The name of the library |
| priority | The priority of this library, libraries with higher priority will be privileged compared to libraries with lower priority |
|
protectedvirtual |
Destructs a library.
|
static |
|
static |
Converts a string to a medium definition.
| string | The string of the medium definition |
|
inline |
Returns the name of the library.
|
pure virtual |
Creates a new medium by a given url.
| url | Url to create the medium from |
| useExclusive | Determines whether the caller would like to use this medium exclusively |
Implemented in Ocean::Media::Android::ALibrary, Ocean::Media::AVFoundation::AVFLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::USB::USBLibrary, and Ocean::Media::WIC::WICLibrary.
|
pure virtual |
Creates a new medium by a given url and an expected type.
If no medium can be created an empty reference is returned.
| url | Url of the medium |
| type | The type of the expected medium |
| useExclusive | Determines whether the caller would like to use this medium exclusively |
Implemented in Ocean::Media::Android::ALibrary, Ocean::Media::AVFoundation::AVFLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::USB::USBLibrary, and Ocean::Media::WIC::WICLibrary.
|
pure virtual |
Creates a new recorder specified by the recorder type.
| type | The type of the recorder to return |
Implemented in Ocean::Media::Android::ALibrary, Ocean::Media::AVFoundation::AVFLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::USB::USBLibrary, and Ocean::Media::WIC::WICLibrary.
| bool Ocean::Media::Library::notSupported | ( | const std::string & | extension | ) | const |
Returns whether a given file extension is not supported by this library.
| extension | File extension to check with lower case |
Disabled copy operator.
| library | Object which would be copied |
|
inlineprotected |
Returns the priority of this library.
|
protected |
Registers file extensions not supported by this library.
| extension | Not supported file extension |
|
virtual |
Returns a list of selectable mediums.
Reimplemented in Ocean::Media::Android::ALibrary, Ocean::Media::AVFoundation::AVFLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::MediaFoundation::MFLibrary, and Ocean::Media::USB::USBLibrary.
|
virtual |
Returns a list of specific selectable mediums.
| type | The type of the selectable mediums |
Reimplemented in Ocean::Media::Android::ALibrary, Ocean::Media::AVFoundation::AVFLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::MediaFoundation::MFLibrary, and Ocean::Media::USB::USBLibrary.
|
virtual |
Returns the supported medium types.
Reimplemented in Ocean::Media::Android::ALibrary, Ocean::Media::AVFoundation::AVFLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::USB::USBLibrary, and Ocean::Media::WIC::WICLibrary.
| bool Ocean::Media::Library::supports | ( | const Medium::Type | type | ) | const |
Returns whether the library supports a given medium type.
| type | Medium type to check |
|
protected |
The name of the library.
|
protected |
Priority of this library, the higher the value, the higher the priority.
|
private |
Set holding file extensions which are not supported by this library.