#include <decoder.h>
◆ Decoder()
Decoder |
( |
QIODevice * |
input = nullptr | ) |
|
Object contsructor.
- Parameters
-
input | QIODevice-based input source. |
◆ ~Decoder()
◆ addMetaData()
Informs decoder about new received metadata. Call of this function is required for all non-local streams/files
- Parameters
-
◆ audioParameters()
Returns detected audio parameters.
◆ bitrate()
virtual int bitrate |
( |
| ) |
const |
|
pure virtual |
Returns current bitrate (in kbps). Subclass should reimplement this function.
◆ configure() [1/3]
Use this function inside initialize() reimplementation to tell other plugins about audio parameters.
- Parameters
-
srate | Sample rate. |
map | Map of channels. |
f | Audio format. |
◆ configure() [2/3]
Use this function inside initialize() reimplementation to tell other plugins about audio parameters.
- Parameters
-
srate | Sample rate. |
channels | Number of channels (internal channel sequence). |
f | Audio format. |
◆ configure() [3/3]
Use this function inside initialize() reimplementation to tell other plugins about audio parameters.
- Parameters
-
◆ enabledFactories()
Returns a list of enabled decoder factories.
◆ factories()
Returns a list of decoder factories.
◆ file()
Returns plugin file path.
- Parameters
-
◆ findByContent()
Returns DecoderFactory pointer which supports data provided by input or 0 if data is unsupported.
◆ findByFileExtension()
static QList<DecoderFactory *> findByFileExtension |
( |
const QString & |
path | ) |
|
|
static |
Returns a list of DecoderFactory pointers which support extension of the required file
- Parameters
-
path | Full file path or url with correct extension. |
◆ findByFilePath()
static DecoderFactory* findByFilePath |
( |
const QString & |
path, |
|
|
bool |
useContent = false |
|
) |
| |
|
static |
Returns DecoderFactory pointer which supports file path or nullptr if file path is unsupported
- Parameters
-
path | Full local file path. |
useContent | Content-based file type determination (true - enabled, false - disabled) |
◆ findByMime()
Returns DecoderFactory pointer which supports mime type mime or nullptr if mime type mime is unsupported
◆ findByProtocol()
Returns DecoderFactory pointer which supports protocol p or nullptr if protocol is not supported.
◆ hasMetaData()
bool hasMetaData |
( |
| ) |
const |
Returns true when new metadata has received, otherwise returns false.
◆ initialize()
virtual bool initialize |
( |
| ) |
|
|
pure virtual |
Prepares decoder for usage. Subclass should reimplement this function.
◆ input()
Returns QIODevice-based input source assigned for this decoder.
◆ isEnabled()
Returns true if input plugin is enabled, otherwise returns false
- Parameters
-
◆ nameFilters()
static QStringList nameFilters |
( |
| ) |
|
|
static |
Returns a list of file name filters, i.e. "*.mp3 *.mpg".
◆ next()
Tells decoder that it should play next track. By default this function does nothing. Reimplemet it if your decoder can play next track without stop/start cycle. This may be useful for multitrack formats like cue or cda.
◆ nextURL()
virtual const QString nextURL |
( |
| ) |
const |
|
virtual |
Returns url which decoder can play without stop/start cycle. By default this function does nothing. Reimplemet it if your decoder can play next track without stop/start cycle.
◆ properties()
◆ protocols()
static QStringList protocols |
( |
| ) |
|
|
static |
Returns a list of supported protocols (including meta-protocols). This fuction ignores disabled decoders.
◆ read()
virtual qint64 read |
( |
unsigned char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
pure virtual |
Reads up to maxSize bytes of decoded audio to data Returns the number of bytes read, or -1 if an error occurred. Subclass should reimplement this function.
◆ replayGainInfo()
Returns ReplayGain information.
◆ seek()
virtual void seek |
( |
qint64 |
time | ) |
|
|
pure virtual |
Requests a seek to the time time indicated, specified in milliseconds. Subclass should reimplement this function.
◆ setEnabled()
static void setEnabled |
( |
DecoderFactory * |
factory, |
|
|
bool |
enable = true |
|
) |
| |
|
static |
Sets whether the input plugin is enabled.
- Parameters
-
factory | Decoder plugin factory. |
enable | Plugin enable state (true - enable, false - disable) |
◆ setProperties()
Updates all extra track properties.
- Parameters
-
properties | New track properties. |
◆ setProperty()
Sets extra track property.
- Parameters
-
key | Property key. |
value | Property value. |
◆ setReplayGainInfo()
Sets ReplayGain information. Use this function before playback.
- Parameters
-
◆ takeMetaData()
Takes metadata out of decoder and returns it. Attention: hasMetaData() should return true before using of this fuction.
◆ totalTime()
virtual qint64 totalTime |
( |
| ) |
const |
|
pure virtual |
Returns the total time in milliseconds. Subclass should reimplement this function.
The documentation for this class was generated from the following file:
- /usr/src/RPM/BUILD/qmmp-1.4.6/src/qmmp/decoder.h