Ocean
|
This class is the base class for all media libraries. More...
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. More... | |
Public Member Functions | |
const std::string & | name () const |
Returns the name of the library. More... | |
virtual MediumRef | newMedium (const std::string &url, bool useExclusive=false)=0 |
Creates a new medium by a given url. More... | |
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. More... | |
virtual RecorderRef | newRecorder (const Recorder::Type type)=0 |
Creates a new recorder specified by the recorder type. More... | |
virtual Definitions | selectableMedia () const |
Returns a list of selectable mediums. More... | |
virtual Definitions | selectableMedia (const Medium::Type type) const |
Returns a list of specific selectable mediums. More... | |
bool | supports (const Medium::Type type) const |
Returns whether the library supports a given medium type. More... | |
virtual Medium::Type | supportedTypes () const |
Returns the supported medium types. More... | |
bool | notSupported (const std::string &extension) const |
Returns whether a given file extension is not supported by this library. More... | |
Static Public Member Functions | |
static std::string | convertDefinition (const Definition &definition) |
Converts a medium definition to one string. More... | |
static Definition | convertDefinition (const std::string &string) |
Converts a string to a medium definition. More... | |
Protected Types | |
typedef std::set< std::string > | ExtensionSet |
Definition of a set holding file extensions. More... | |
Protected Member Functions | |
Library (const Library &library)=delete | |
Disabled copy constructor. More... | |
Library (const std::string &name, const unsigned int priority) | |
Creates a new Library object. More... | |
virtual | ~Library () |
Destructs a library. More... | |
unsigned int | priority () const |
Returns the priority of this library. More... | |
void | registerNotSupportedExtension (const std::string &extension) |
Registers file extensions not supported by this library. More... | |
Library & | operator= (const Library &library)=delete |
Disabled copy operator. More... | |
Protected Attributes | |
std::string | libraryName |
The name of the library. More... | |
unsigned int | libraryPriority |
Priority of this library, the higher the value, the higher the priority. More... | |
Lock | lock |
Library lock. More... | |
Private Attributes | |
ExtensionSet | notSupportedExtensionSet |
Set holding file extensions which are not supported by this library. More... | |
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::WIC::WICLibrary, Ocean::Media::USB::USBLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::AVFoundation::AVFLibrary, and Ocean::Media::Android::ALibrary.
|
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::WIC::WICLibrary, Ocean::Media::USB::USBLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::AVFoundation::AVFLibrary, and Ocean::Media::Android::ALibrary.
|
pure virtual |
Creates a new recorder specified by the recorder type.
type | The type of the recorder to return |
Implemented in Ocean::Media::WIC::WICLibrary, Ocean::Media::USB::USBLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::AVFoundation::AVFLibrary, and Ocean::Media::Android::ALibrary.
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::USB::USBLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::DirectShow::DSLibrary, and Ocean::Media::AVFoundation::AVFLibrary.
|
virtual |
Returns a list of specific selectable mediums.
type | The type of the selectable mediums |
Reimplemented in Ocean::Media::USB::USBLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::DirectShow::DSLibrary, and Ocean::Media::AVFoundation::AVFLibrary.
|
virtual |
Returns the supported medium types.
Reimplemented in Ocean::Media::WIC::WICLibrary, Ocean::Media::USB::USBLibrary, Ocean::Media::OpenImageLibraries::OILLibrary, Ocean::Media::MediaFoundation::MFLibrary, Ocean::Media::ImageIO::IIOLibrary, Ocean::Media::FFmpeg::FFMLibrary, Ocean::Media::DirectShow::DSLibrary, Ocean::Media::AVFoundation::AVFLibrary, and Ocean::Media::Android::ALibrary.
bool Ocean::Media::Library::supports | ( | const Medium::Type | type | ) | const |
Returns whether the library supports a given medium type.
type | Medium type to check |
|
friend |
|
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.