encodervorbis.h 2.35 KB
Newer Older
1
2
3
4
5
6
7
/*
  Copyright (C) 2000 Rik Hemsley (rikkus) <rik@kde.org>
  Copyright (C) 2000, 2001, 2002 Michael Matz <matz@kde.org>
  Copyright (C) 2001 Carsten Duvenhorst <duvenhorst@m2.uni-hannover.de>
  Copyright (C) 2001 Adrian Schroeter <adrian@suse.de>
  Copyright (C) 2003 Richard Lärkäng <richard@goteborg.utfors.se>
  Copyright (C) 2003 Scott Wheeler <wheeler@kde.org>
Benjamin Meyer's avatar
Benjamin Meyer committed
8
  Copyright (C) 2004, 2005 Benjamin Meyer <ben at meyerhome dot net>
9
10
11
12
13
14
15
16
17
18
19
20
21

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
Dirk Mueller's avatar
Dirk Mueller committed
22
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
23
24
25
26
27
*/

#ifndef ENCODER_VORBIS_H
#define ENCODER_VORBIS_H

Laurent Montel's avatar
Laurent Montel committed
28
#include "ui_encodervorbisconfig.h"
29

30
#include <audiocdencoder.h>
31

Laurent Montel's avatar
Laurent Montel committed
32
33
34
35
36
37
38
39
40
class EncoderVorbisConfig : public QWidget, public Ui::EncoderVorbisConfig
{
public:
  EncoderVorbisConfig( QWidget *parent = 0 ) : QWidget( parent ) {
    setupUi( this );
  }
};


41
42
/**
 * Ogg Vorbis encoder.
43
 * Check out https://xiph.org/vorbis/ for more information.
44
 */
45
class EncoderVorbis : public AudioCDEncoder {
46
47

public:
Yuri Chornoivan's avatar
Yuri Chornoivan committed
48
  explicit EncoderVorbis(KIO::SlaveBase *slave);
49
  ~EncoderVorbis();
50

51
52
53
54
55
56
57
58
59
60
61
  virtual QString type() const override { return QLatin1String( "Ogg Vorbis" ); }
  virtual bool init() override;
  virtual void loadSettings() override;
  virtual unsigned long size(long time_secs) const override;
  virtual const char * fileType() const override { return "ogg"; }
  virtual const char * mimeType() const override;
  virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) override;
  virtual long readInit(long size) override;
  virtual long read(qint16 * buf, int frames) override;
  virtual long readCleanup() override;
  virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const override;
62

63
64
private:
  long flush_vorbis();
65

66
67
  class Private;
  Private * d;
68

69
70
71
72
};

#endif // ENCODER_VORBIS_H