kwave
18.07.70
|
#include <CodecPlugin.h>
Classes | |
struct | Codec |
Public Member Functions | |
CodecPlugin (QObject *parent, const QVariantList &args, Codec &codec) | |
virtual | ~CodecPlugin () Q_DECL_OVERRIDE |
virtual void | load (QStringList &) Q_DECL_OVERRIDE |
virtual void | unload () Q_DECL_OVERRIDE |
virtual QList< Kwave::Decoder * > | createDecoder ()=0 |
virtual QList< Kwave::Encoder * > | createEncoder ()=0 |
![]() | |
Plugin (QObject *parent, const QVariantList &args) | |
virtual | ~Plugin () Q_DECL_OVERRIDE |
virtual QString | name () const |
virtual QString | description () const |
virtual QString | progressText () |
virtual bool | canClose () const |
bool | isRunning () const |
bool | shouldStop () const |
virtual QStringList * | setup (QStringList &previous_params) |
virtual int | start (QStringList ¶ms) |
virtual int | stop () |
virtual void | run (QStringList params) |
Kwave::PluginManager & | manager () const |
Kwave::SignalManager & | signalManager () |
QWidget * | parentWidget () const |
QString | signalName () |
virtual sample_index_t | signalLength () |
virtual double | signalRate () |
virtual const QList< unsigned int > | selectedTracks () |
virtual sample_index_t | selection (QList< unsigned int > *tracks=Q_NULLPTR, sample_index_t *left=Q_NULLPTR, sample_index_t *right=Q_NULLPTR, bool expand_if_empty=false) |
virtual void | selectRange (sample_index_t offset, sample_index_t length) |
virtual void | migrateToActiveContext () |
![]() | |
virtual | ~Runnable () |
Protected Member Functions | |
template<class T > | |
QList< Kwave::Decoder * > | singleDecoder () |
template<class T > | |
QList< Kwave::Encoder * > | singleEncoder () |
![]() | |
int | execute (QStringList ¶ms) |
void | emitCommand (const QString &command) |
void | use () |
void | setPluginManager (Kwave::PluginManager *new_plugin_manager) |
virtual void | run_wrapper (const QVariant ¶ms) Q_DECL_OVERRIDE |
Private Attributes | |
Codec & | m_codec |
Additional Inherited Members | |
![]() | |
virtual void | setProgressDialogEnabled (bool enable) |
virtual void | updateProgress (qreal progress) |
virtual void | cancel () |
virtual void | close () |
void | release () |
![]() | |
void | sigRunning (Kwave::Plugin *plugin) |
void | sigDone (Kwave::Plugin *plugin) |
void | sigClosed (Kwave::Plugin *p) |
void | sigCommand (const QString &command) |
void | setProgressText (const QString &text) |
Definition at line 33 of file CodecPlugin.h.
Kwave::CodecPlugin::CodecPlugin | ( | QObject * | parent, |
const QVariantList & | args, | ||
Codec & | codec | ||
) |
Constructor
parent | pointer to the corresponding plugin manager |
args | argument list, containts internal meta data |
codec | reference to a static container for the codec |
Definition at line 26 of file CodecPlugin.cpp.
|
virtual |
|
pure virtual |
Create a new set of decoders
Implemented in Kwave::MP3CodecPlugin, Kwave::FlacCodecPlugin, Kwave::AsciiCodecPlugin, Kwave::OggCodecPlugin, Kwave::WavCodecPlugin, and Kwave::AudiofileCodecPlugin.
Referenced by load().
|
pure virtual |
Create a new set of encoders
Implemented in Kwave::MP3CodecPlugin, Kwave::FlacCodecPlugin, Kwave::AsciiCodecPlugin, Kwave::OggCodecPlugin, Kwave::WavCodecPlugin, and Kwave::AudiofileCodecPlugin.
Referenced by load().
|
virtual |
Gets called when the plugin is first loaded. Registers new encoder and decoder on first call, all subsequenct calls only increment the reference count of the existing encoder/decoder instances.
Reimplemented from Kwave::Plugin.
Reimplemented in Kwave::MP3CodecPlugin.
Definition at line 39 of file CodecPlugin.cpp.
References createDecoder(), createEncoder(), m_codec, Kwave::CodecPlugin::Codec::m_decoder, Kwave::CodecPlugin::Codec::m_encoder, Kwave::CodecPlugin::Codec::m_use_count, Kwave::CodecManager::registerDecoder(), Kwave::CodecManager::registerEncoder(), and Kwave::Plugin::use().
Referenced by Kwave::MP3CodecPlugin::load().
|
inlineprotected |
helper template to return a list with a single decoder, for use within createDecoder()
Definition at line 87 of file CodecPlugin.h.
|
inlineprotected |
helper template to return a list with a single encoder, for use within createEncoder()
Definition at line 98 of file CodecPlugin.h.
|
virtual |
Gets called before the plugin is unloaded. Decrements the use count of existing encoder/decoder instances and removes them if zero gets reached.
Reimplemented from Kwave::Plugin.
Definition at line 59 of file CodecPlugin.cpp.
References m_codec, Kwave::CodecPlugin::Codec::m_decoder, Kwave::CodecPlugin::Codec::m_encoder, Kwave::CodecPlugin::Codec::m_use_count, Kwave::Plugin::release(), Kwave::CodecManager::unregisterDecoder(), and Kwave::CodecManager::unregisterEncoder().
|
private |
reference to the static container with encoder/decoder/usecount
Definition at line 108 of file CodecPlugin.h.