KVIrc  4.9.2
DeveloperAPIs
KviOggTheoraDecoder.h
Go to the documentation of this file.
1 #ifndef _KVI_OGGTHEORADECODER_H_
2 #define _KVI_OGGTHEORADECODER_H_
3 //=============================================================================
4 //
5 // File : KviOggTheoraDecoder.h
6 // Creation date : Sat Nov 21 2009 22:53:21 CEST by Fabio Bas
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2009 Fabio Bas (ctrlaltca at libero dot it)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
33 #ifndef COMPILE_DISABLE_OGG_THEORA
34 
35 #include "kvi_settings.h"
36 #include "KviOggTheoraGeometry.h"
37 
38 #include "theora/theoradec.h"
39 
43 #define ARGB32_BPP 4
44 
45 class KviDataBuffer;
46 
52 {
53 public:
60  KviOggTheoraDecoder(KviDataBuffer * videoSignal, KviDataBuffer * textSignal);
61 
65  virtual ~KviOggTheoraDecoder();
66 
72  void addData(KviDataBuffer * stream);
73 
74 private:
78  unsigned char * RGBbuffer;
80  // Ogg and codec state for demux/decode
81  ogg_sync_state oy;
82  ogg_packet op;
83  ogg_page og;
84  ogg_stream_state to;
85  ogg_stream_state zo;
87  th_info ti;
88  th_comment tc;
89  th_dec_ctx * td;
90  th_setup_info * ts;
91  th_pixel_fmt px_fmt;
93  int theora_p;
94  int irct_p;
95  int stateflag;
97  int lu_Y[256];
98  int lu_R[256];
99  int lu_GU[256];
100  int lu_GV[256];
101  int lu_B[256];
103  // Single frame video buffering
105  ogg_int64_t videobuf_granulepos;
106  double videobuf_time;
109  int pp_level;
110  int pp_inc;
112  bool thda;
113  bool thtic;
114 private:
119  int queue_page(ogg_page * page);
124  void video_write(void);
125 };
126 
127 #endif // COMPILE_DISABLE_OGG_THEORA
128 #endif // KVI_OGGTHEORADECODER_H_
double videobuf_time
Definition: KviOggTheoraDecoder.h:106
ogg_stream_state to
Definition: KviOggTheoraDecoder.h:84
int irct_p
Definition: KviOggTheoraDecoder.h:94
Definition: KviDataBuffer.h:30
th_comment tc
Definition: KviOggTheoraDecoder.h:88
th_info ti
Definition: KviOggTheoraDecoder.h:87
int pp_level_max
Definition: KviOggTheoraDecoder.h:108
th_setup_info * ts
Definition: KviOggTheoraDecoder.h:90
This file was originally part of KviTheoraDecoder.h.
ogg_page og
Definition: KviOggTheoraDecoder.h:83
KviOggTheoraGeometry geometry
Definition: KviOggTheoraDecoder.h:77
KviDataBuffer * m_pVideoSignal
Definition: KviOggTheoraDecoder.h:75
ogg_packet op
Definition: KviOggTheoraDecoder.h:82
ogg_int64_t videobuf_granulepos
Definition: KviOggTheoraDecoder.h:105
int stateflag
Definition: KviOggTheoraDecoder.h:95
int pp_level
Definition: KviOggTheoraDecoder.h:109
int theora_p
Definition: KviOggTheoraDecoder.h:93
unsigned char * RGBbuffer
Definition: KviOggTheoraDecoder.h:78
int videobuf_ready
Definition: KviOggTheoraDecoder.h:104
int pp_inc
Definition: KviOggTheoraDecoder.h:110
th_dec_ctx * td
Definition: KviOggTheoraDecoder.h:89
th_pixel_fmt px_fmt
Definition: KviOggTheoraDecoder.h:91
ogg_sync_state oy
Definition: KviOggTheoraDecoder.h:81
bool thtic
Definition: KviOggTheoraDecoder.h:113
This file contains compile time settings.
KviDataBuffer * m_pTextSignal
Definition: KviOggTheoraDecoder.h:76
bool thda
Definition: KviOggTheoraDecoder.h:112
Definition: KviOggTheoraGeometry.h:40
An ogg/theora+irct decoder class; accepts a proper ogg stream, outputs argb32 images and binary text...
Definition: KviOggTheoraDecoder.h:51
#define KVILIB_API
Definition: kvi_settings.h:125
ogg_stream_state zo
Definition: KviOggTheoraDecoder.h:85