The InputSource class provides the base interface class of transports.
More...
#include <inputsource.h>
Inherited by EmptyInputSource, and FileInputSource.
List of all members.
Detailed Description
The InputSource class provides the base interface class of transports.
- Author:
- Ilya Kotov <forkotov02@hotmail.ru>
Constructor & Destructor Documentation
InputSource |
( |
const QString & |
url, |
|
|
QObject * |
parent = 0 |
|
) |
| |
Object contsructor.
- Parameters:
-
url | Input source path or url. |
parent | Parent object. |
Member Function Documentation
Informs input source object about new received metadata. Call of this function is required for all non-local streams/files
- Parameters:
-
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. |
virtual QString contentType |
( |
| ) |
const [virtual] |
Returns content type of the input stream. Default implementation returns empty string.
static InputSource* create |
( |
const QString & |
url, |
|
|
QObject * |
parent = 0 |
|
) |
| [static] |
Creates InputSource object.
- Parameters:
-
url | Input source path or url. |
parent | Parent object. Returns 0 if the given url is not supported. |
Returns a list of enabled transport factories.
This signal is emitted after an error occurred.
Returns a list of transport factories.
Returns plugin file path.
- Parameters:
-
factory | Transport plugin factory. |
bool hasMetaData |
( |
| ) |
const |
Returns true when new metadata has received, otherwise returns false.
bool hasStreamInfo |
( |
| ) |
const |
Returns true when stream information has received, otherwise returns false.
virtual bool initialize |
( |
| ) |
[pure virtual] |
Prepares input data source for usage. Subclass shoud reimplement this function.
virtual QIODevice* ioDevice |
( |
| ) |
[pure virtual] |
Returns QIODevice-based object for I/O operations. Subclass shoud reimplement this function.
Returns true if input plugin is enabled, otherwise returns false
- Parameters:
-
virtual bool isReady |
( |
| ) |
[pure virtual] |
Returns true if transport is ready for usage; otherwise returns false.
virtual bool isWaiting |
( |
| ) |
[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.
Returns start position in ms;
static QStringList protocols |
( |
| ) |
[static] |
Returns a list of supported protocols.
This signal is emitted when transport is ready for usage.
Sets whether the input plugin is enabled.
- Parameters:
-
factory | Transport plugin factory. |
enable | Plugin enable state (true - enable, false - disable) |
void setOffset |
( |
qint64 |
offset | ) |
|
Sets start position to offset ms.
Takes metadata out of InputSource object and returns it. Attention: hasMetaData() should return true before use of this fuction.
QHash<QString, QString> takeStreamInfo |
( |
| ) |
|
Takes stream information out of InputSource object and returns it. Attention: hasStreamInfo() should return true before use of this fuction.
const QString url |
( |
| ) |
const |
Returns input source path or url.
The documentation for this class was generated from the following file: