#include <inputsource.h>
Inherits QObject.
Inherited by EmptyInputSource, and FileInputSource.
The InputSource class provides the base interface class of transports.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
◆ InputSource()
InputSource |
( |
const QString & | path, |
|
|
QObject * | parent = nullptr ) |
|
explicit |
Object contsructor.
- Parameters
-
path | Input source path or url. |
parent | Parent object. |
◆ addMetaData()
Informs input source object about new received metadata. Call of this function is required for all non-local streams/files
- Parameters
-
◆ addStreamInfo()
void addStreamInfo |
( |
const QHash< QString, QString > & | info | ) |
|
Informs input source object about received stream information (for example icy data). Call of this function is required for all non-local streams/files
- Parameters
-
info | Stream information map. |
◆ contentType()
virtual QString contentType |
( |
| ) |
const |
|
virtual |
Returns content type of the input stream. Default implementation returns empty string.
◆ create()
static InputSource * create |
( |
const QString & | path, |
|
|
QObject * | parent = nullptr ) |
|
static |
Creates InputSource object.
- Parameters
-
path | Input source path or url. |
parent | Parent object. Returns 0 if the given url is not supported. |
◆ enabledFactories()
Returns a list of enabled transport factories.
◆ error
This signal is emitted after an error occurred.
◆ factories()
Returns a list of transport factories.
◆ file()
Returns plugin file path.
- Parameters
-
factory | Transport plugin factory. |
◆ findByUrl()
Returns InputSourceFactory pointer which supports URL url or nullptr if URL is not supported.
◆ hasMetaData()
bool hasMetaData |
( |
| ) |
const |
Returns true when new metadata has received, otherwise returns false.
◆ hasStreamInfo()
bool hasStreamInfo |
( |
| ) |
const |
Returns true when stream information has received, otherwise returns false.
◆ initialize()
virtual bool initialize |
( |
| ) |
|
|
pure virtual |
Prepares input data source for usage. Subclass shoud reimplement this function.
◆ ioDevice()
virtual QIODevice * ioDevice |
( |
| ) |
const |
|
pure virtual |
Returns QIODevice-based object for I/O operations. Subclass shoud reimplement this function.
◆ isEnabled()
Returns true if input plugin is enabled, otherwise returns false
- Parameters
-
◆ isReady()
virtual bool isReady |
( |
| ) |
const |
|
pure virtual |
Returns true if transport is ready for usage; otherwise returns false.
◆ isWaiting()
virtual bool isWaiting |
( |
| ) |
const |
|
virtual |
Returns true if the transport is waiting more data; otherwise returns false. Reader should wait until this function returns false. Default implementation allways returns false.
◆ offset()
Returns start position in ms;
◆ path()
const QString path |
( |
| ) |
const |
Returns input source path or url.
◆ properties()
Returns stream properties
◆ protocols()
static QStringList protocols |
( |
| ) |
|
|
static |
Returns a list of supported protocols.
◆ ready
This signal is emitted when transport is ready for usage.
◆ regExps()
static QList< QRegularExpression > regExps |
( |
| ) |
|
|
static |
Returns a list of supported regular expressions for URL.
◆ setEnabled()
Sets whether the input plugin is enabled.
- Parameters
-
factory | Transport plugin factory. |
enable | Plugin enable state (true - enable, false - disable) |
◆ setOffset()
void setOffset |
( |
qint64 | offset | ) |
|
Sets start position to offset ms.
◆ setProperties()
Updates all extra stream properties.
- Parameters
-
properties | New track properties. |
◆ setProperty()
Sets extra stream property.
- Parameters
-
key | Property key. |
value | Property value. |
◆ stop()
Stops long operation (reading, seeking) from another thead, if necessary. Default implementation does nothing.
◆ takeMetaData()
Takes metadata out of InputSource object and returns it. Attention: hasMetaData() should return true before use of this fuction.
◆ takeStreamInfo()
QHash< QString, QString > takeStreamInfo |
( |
| ) |
|
Takes stream information out of InputSource object and returns it. Attention: hasStreamInfo() should return true before use of this fuction.
The documentation for this class was generated from the following file: