kwave  18.07.70
OggDecoder.h
Go to the documentation of this file.
1 /*************************************************************************
2  OggDecoder.h - decoder for Ogg/Vorbis data
3  -------------------
4  begin : Tue Sep 10 2002
5  copyright : (C) 2002 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 OGG_DECODER_H
19 #define OGG_DECODER_H
20 
21 #include "config.h"
22 
23 #include <ogg/ogg.h>
24 
25 #include "libkwave/Decoder.h"
26 #include "libkwave/FileInfo.h"
27 
28 namespace Kwave
29 {
30  class OggSubDecoder;
31 
32  class OggDecoder: public Kwave::Decoder
33  {
34  public:
36  OggDecoder();
37 
39  virtual ~OggDecoder() Q_DECL_OVERRIDE;
40 
42  virtual Kwave::Decoder *instance() Q_DECL_OVERRIDE;
43 
51  virtual bool open(QWidget *widget, QIODevice &source) Q_DECL_OVERRIDE;
52 
60  virtual bool decode(QWidget *widget, Kwave::MultiWriter &dst)
61  Q_DECL_OVERRIDE;
62 
66  virtual void close() Q_DECL_OVERRIDE;
67 
68  protected:
69 
76  int parseHeader(QWidget *widget);
77 
78  private:
79 
82 
84  QIODevice *m_source;
85 
87  ogg_sync_state m_oy;
88 
90  ogg_stream_state m_os;
91 
93  ogg_page m_og;
94 
96  ogg_packet m_op;
97 
98  };
99 }
100 
101 #endif /* OGG_DECODER_H */
102 
103 //***************************************************************************
104 //***************************************************************************
Definition: App.h:33
virtual bool decode(QWidget *widget, Kwave::MultiWriter &dst) Q_DECL_OVERRIDE
Definition: OggDecoder.cpp:200
virtual bool open(QWidget *widget, QIODevice &source) Q_DECL_OVERRIDE
Definition: OggDecoder.cpp:173
virtual ~OggDecoder() Q_DECL_OVERRIDE
Definition: OggDecoder.cpp:64
virtual Kwave::Decoder * instance() Q_DECL_OVERRIDE
Definition: OggDecoder.cpp:70
ogg_sync_state m_oy
Definition: OggDecoder.h:87
QIODevice * m_source
Definition: OggDecoder.h:84
int parseHeader(QWidget *widget)
Definition: OggDecoder.cpp:76
Kwave::OggSubDecoder * m_sub_decoder
Definition: OggDecoder.h:81
ogg_stream_state m_os
Definition: OggDecoder.h:90
ogg_packet m_op
Definition: OggDecoder.h:96
virtual void close() Q_DECL_OVERRIDE
Definition: OggDecoder.cpp:275