kwave  18.07.70
Kwave::Encoder Class Referenceabstract

#include <Encoder.h>

Inheritance diagram for Kwave::Encoder:
Inheritance graph
Collaboration diagram for Kwave::Encoder:
Collaboration graph

Public Member Functions

 Encoder ()
 
virtual ~Encoder ()
 
virtual Encoderinstance ()=0
 
virtual bool encode (QWidget *widget, Kwave::MultiTrackReader &src, QIODevice &dst, const Kwave::MetaDataList &meta_data)=0
 
virtual QList< Kwave::FilePropertysupportedProperties ()
 
virtual QList< Kwave::FilePropertyunsupportedProperties (const QList< Kwave::FileProperty > &properties_to_check)
 
- Public Member Functions inherited from Kwave::CodecBase
 CodecBase ()
 
virtual ~CodecBase ()
 
virtual bool supports (const QMimeType &mimetype)
 
virtual bool supports (const QString &mimetype_name)
 
virtual QStringList extensions (const QString &mimetype_name) const
 
virtual const QList< CodecBase::MimeTypemimeTypes ()
 
virtual const QList< Kwave::Compression::TypecompressionTypes ()
 
virtual void addMimeType (const char *name, const QString &description, const char *patterns)
 
virtual void addCompression (Kwave::Compression::Type compression)
 
virtual QString mimeTypeOf (const QUrl &url)
 

Detailed Description

Definition at line 38 of file Encoder.h.

Constructor & Destructor Documentation

◆ Encoder()

Kwave::Encoder::Encoder ( )

Constructor

Definition at line 21 of file Encoder.cpp.

22  :QObject(), Kwave::CodecBase()
23 {
24 }

◆ ~Encoder()

virtual Kwave::Encoder::~Encoder ( )
inlinevirtual

Destructor

Definition at line 46 of file Encoder.h.

46 {}

Member Function Documentation

◆ encode()

virtual bool Kwave::Encoder::encode ( QWidget *  widget,
Kwave::MultiTrackReader src,
QIODevice &  dst,
const Kwave::MetaDataList meta_data 
)
pure virtual

Encodes a signal into a stream of bytes.

Parameters
widgeta widget that can be used for displaying message boxes or dialogs
srcMultiTrackReader used as source of the audio data
dstfile or other source to receive a stream of bytes
meta_datameta data of the file to save
Returns
true if succeeded, false on errors

Implemented in Kwave::FlacEncoder, Kwave::MP3Encoder, Kwave::WavEncoder, Kwave::AsciiEncoder, and Kwave::OggEncoder.

Referenced by Kwave::MimeData::encode().

Here is the caller graph for this function:

◆ instance()

virtual Encoder* Kwave::Encoder::instance ( )
pure virtual

Returns a new instance of the encoder

Implemented in Kwave::FlacEncoder, Kwave::MP3Encoder, Kwave::WavEncoder, Kwave::AsciiEncoder, and Kwave::OggEncoder.

Referenced by Kwave::CodecManager::encoder().

Here is the caller graph for this function:

◆ supportedProperties()

virtual QList<Kwave::FileProperty> Kwave::Encoder::supportedProperties ( )
inlinevirtual

Returns a list of supported file properties

Reimplemented in Kwave::FlacEncoder, Kwave::MP3Encoder, Kwave::WavEncoder, Kwave::AsciiEncoder, and Kwave::OggEncoder.

Definition at line 66 of file Encoder.h.

Referenced by unsupportedProperties().

66  {
67  QList<Kwave::FileProperty> empty;
68  return empty;
69  }
Here is the caller graph for this function:

◆ unsupportedProperties()

QList< Kwave::FileProperty > Kwave::Encoder::unsupportedProperties ( const QList< Kwave::FileProperty > &  properties_to_check)
virtual

Returns a list of all properties within a list of properties which are not supported by this encoder

Parameters
properties_to_checklist of properties to check
Returns
list of unsupported properties (may be empty)

Definition at line 27 of file Encoder.cpp.

References Kwave::FileInfo::canLoadSave(), and supportedProperties().

Referenced by Kwave::K3BExportPlugin::saveBlocks(), and Kwave::SaveBlocksPlugin::start().

29 {
30  QList<Kwave::FileProperty> unsupported;
31  const QList<Kwave::FileProperty> supported(supportedProperties());
32  const Kwave::FileInfo info;
33 
34  foreach (const Kwave::FileProperty &s, properties_to_check) {
35  if (info.canLoadSave(s) && !supported.contains(s))
36  unsupported.append(s);
37  }
38 
39  return unsupported;
40 }
bool canLoadSave(FileProperty key) const
Definition: FileInfo.h:220
virtual QList< Kwave::FileProperty > supportedProperties()
Definition: Encoder.h:66
FileProperty
Definition: FileInfo.h:45
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: