The InputSource class provides the base interface class of transports.
More...
#include <inputsource.h>
The InputSource class provides the base interface class of transports.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
Definition at line 35 of file inputsource.h.
InputSource::InputSource |
( |
const QString & |
path, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
Object contsructor.
- Parameters
-
path | Input source path or url. |
parent | Parent object. |
Informs input source object about new received metadata. Call of this function is required for all non-local streams/files
- Parameters
-
void InputSource::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. |
virtual QString InputSource::contentType |
( |
| ) |
const |
|
virtual |
Returns content type of the input stream. Default implementation returns empty string.
static InputSource* 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. |
Returns a list of enabled transport factories.
void InputSource::error |
( |
| ) |
|
|
signal |
This signal is emitted after an error occurred.
Returns InputSourceFactory pointer which supports URL url or nullptr if URL is not supported.
bool InputSource::hasMetaData |
( |
| ) |
const |
Returns true when new metadata has received, otherwise returns false.
bool InputSource::hasStreamInfo |
( |
| ) |
const |
Returns true when stream information has received, otherwise returns false.
virtual bool InputSource::initialize |
( |
| ) |
|
|
pure virtual |
virtual QIODevice* InputSource::ioDevice |
( |
| ) |
const |
|
pure virtual |
virtual bool InputSource::isReady |
( |
| ) |
const |
|
pure virtual |
virtual bool InputSource::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.
static void InputSource::loadPlugins |
( |
| ) |
|
|
staticprivate |
qint64 InputSource::offset |
( |
| ) |
const |
Returns start position in ms;
QString InputSource::path |
( |
| ) |
const |
Returns input source path or url.
Returns stream properties
static QStringList InputSource::protocols |
( |
| ) |
|
|
static |
Returns a list of supported protocols.
void InputSource::ready |
( |
| ) |
|
|
signal |
This signal is emitted when transport is ready for usage.
Returns a list of supported regular expressions for URL.
Sets whether the input plugin is enabled.
- Parameters
-
factory | Transport plugin factory. |
enable | Plugin enable state (true - enable, false - disable) |
Referenced by MusicPluginItem::setEnabled().
void InputSource::setOffset |
( |
qint64 |
offset | ) |
|
Sets start position to offset ms.
Updates all extra stream properties.
- Parameters
-
properties | New track properties. |
Sets extra stream property.
- Parameters
-
key | Property key. |
value | Property value. |
virtual void InputSource::stop |
( |
| ) |
|
|
virtual |
Stops long operation (reading, seeking) from another thead, if necessary. Default implementation does nothing.
Takes metadata out of InputSource object and returns it. Attention: hasMetaData() should return true before use of this fuction.
QHash<QString, QString> InputSource::takeStreamInfo |
( |
| ) |
|
Takes stream information out of InputSource object and returns it. Attention: hasStreamInfo() should return true before use of this fuction.
QStringList InputSource::m_disabledNames |
|
staticprivate |
bool InputSource::m_hasMetaData = false |
|
private |
bool InputSource::m_hasStreamInfo = false |
|
private |
qint64 InputSource::m_offset = -1 |
|
private |
QString InputSource::m_path |
|
private |
QHash<QString, QString> InputSource::m_streamInfo |
|
private |
The documentation for this class was generated from the following file: