KVIrc 5.2.6
Developer APIs
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
32
33#ifndef COMPILE_DISABLE_OGG_THEORA
34
35#include "kvi_settings.h"
37
38#include "theora/theoradec.h"
39
43#define ARGB32_BPP 4
44
45class KviDataBuffer;
46
52{
53public:
60 KviOggTheoraDecoder(KviDataBuffer * videoSignal, KviDataBuffer * textSignal);
61
65 virtual ~KviOggTheoraDecoder();
66
72 void addData(KviDataBuffer * stream);
73
74private:
78 unsigned char * RGBbuffer;
79
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;
86
87 th_info ti;
88 th_comment tc;
89 th_dec_ctx * td;
90 th_setup_info * ts;
91 th_pixel_fmt px_fmt;
92
94 int irct_p;
96
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];
102
103 // Single frame video buffering
107
110 int pp_inc;
111
112 bool thda;
113 bool thtic;
114private:
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_
This file was originally part of KviTheoraDecoder.h.
Definition KviDataBuffer.h:31
unsigned char * RGBbuffer
Definition KviOggTheoraDecoder.h:78
int lu_GU[256]
Definition KviOggTheoraDecoder.h:99
KviDataBuffer * m_pTextSignal
Definition KviOggTheoraDecoder.h:76
int lu_Y[256]
Definition KviOggTheoraDecoder.h:97
bool thtic
Definition KviOggTheoraDecoder.h:113
int lu_R[256]
Definition KviOggTheoraDecoder.h:98
ogg_sync_state oy
Definition KviOggTheoraDecoder.h:81
th_dec_ctx * td
Definition KviOggTheoraDecoder.h:89
th_setup_info * ts
Definition KviOggTheoraDecoder.h:90
ogg_page og
Definition KviOggTheoraDecoder.h:83
int pp_inc
Definition KviOggTheoraDecoder.h:110
int pp_level
Definition KviOggTheoraDecoder.h:109
int irct_p
Definition KviOggTheoraDecoder.h:94
ogg_stream_state zo
Definition KviOggTheoraDecoder.h:85
ogg_int64_t videobuf_granulepos
Definition KviOggTheoraDecoder.h:105
th_pixel_fmt px_fmt
Definition KviOggTheoraDecoder.h:91
void addData(KviDataBuffer *stream)
Feeds the decoded with some received data to decode.
Definition KviOggTheoraDecoder.cpp:105
KviDataBuffer * m_pVideoSignal
Definition KviOggTheoraDecoder.h:75
th_comment tc
Definition KviOggTheoraDecoder.h:88
KviOggTheoraDecoder(KviDataBuffer *videoSignal, KviDataBuffer *textSignal)
Constructs the KviOggTheoraDecoder object.
Definition KviOggTheoraDecoder.cpp:52
th_info ti
Definition KviOggTheoraDecoder.h:87
KviOggTheoraGeometry geometry
Definition KviOggTheoraDecoder.h:77
int theora_p
Definition KviOggTheoraDecoder.h:93
int queue_page(ogg_page *page)
Internal function that queues an ogg page to the codec decoders.
Definition KviOggTheoraDecoder.cpp:306
bool thda
Definition KviOggTheoraDecoder.h:112
int lu_B[256]
Definition KviOggTheoraDecoder.h:101
void video_write(void)
Internal function that takes a theora yuv buffer, transforms it and appends to the video stream.
Definition KviOggTheoraDecoder.cpp:315
ogg_packet op
Definition KviOggTheoraDecoder.h:82
int videobuf_ready
Definition KviOggTheoraDecoder.h:104
int pp_level_max
Definition KviOggTheoraDecoder.h:108
ogg_stream_state to
Definition KviOggTheoraDecoder.h:84
int stateflag
Definition KviOggTheoraDecoder.h:95
int lu_GV[256]
Definition KviOggTheoraDecoder.h:100
double videobuf_time
Definition KviOggTheoraDecoder.h:106
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124
Definition KviOggTheoraGeometry.h:40