kwave  18.07.70
MP3CodecPlugin.h
Go to the documentation of this file.
1 /*************************************************************************
2  MP3CodecPlugin.h - import and export of MP3 data
3  -------------------
4  begin : Mon May 28 2012
5  copyright : (C) 2012 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef MP3_CODEC_PLUGIN_H
19 #define MP3_CODEC_PLUGIN_H
20 
21 #include "config.h"
22 
23 #include "libkwave/CodecPlugin.h"
24 #include "libkwave/Compression.h"
25 
26 namespace Kwave
27 {
28 
30  {
31  Q_OBJECT
32  public:
33 
39  MP3CodecPlugin(QObject *parent, const QVariantList &args);
40 
42  virtual ~MP3CodecPlugin();
43 
45  virtual void load(QStringList &params);
46 
54  virtual QStringList *setup(QStringList &previous_params);
55 
57  virtual QList<Kwave::Decoder *> createDecoder();
58 
60  virtual QList<Kwave::Encoder *> createEncoder();
61 
62  private:
65  };
66 
67 }
68 
69 /* see RFC3003 */
70 #define REGISTER_MIME_TYPES { \
71  addMimeType( \
72  "audio/x-mp3, audio/mpeg", \
73  i18n("MPEG layer III audio"), \
74  "*.mp3" \
75  ); \
76  \
77  addMimeType( \
78  "audio/mpeg, audio/x-mp2", \
79  i18n("MPEG layer II audio"), \
80  "*.mp2" \
81  ); \
82  \
83  addMimeType( \
84  "audio/mpeg, audio/x-mpga", \
85  i18n("MPEG layer I audio"), \
86  "*.mpga *.mpg *.mp1" \
87  ); \
88 }
89 
90 #define REGISTER_COMPRESSION_TYPES { \
91  addCompression(Kwave::Compression::MPEG_LAYER_I); \
92  addCompression(Kwave::Compression::MPEG_LAYER_II); \
93  addCompression(Kwave::Compression::MPEG_LAYER_III); \
94 }
95 
96 #endif /* MP3_CODEC_PLUGIN_H */
97 
98 //***************************************************************************
99 //***************************************************************************
virtual QList< Kwave::Decoder * > createDecoder()
virtual QList< Kwave::Encoder * > createEncoder()
Definition: App.h:33
virtual void load(QStringList &params)
virtual QStringList * setup(QStringList &previous_params)
MP3CodecPlugin(QObject *parent, const QVariantList &args)
static CodecPlugin::Codec m_codec