~ubuntu-branches/debian/lenny/italc/lenny

« back to all changes in this revision

Viewing changes to ica/win32/src/vncEncodeCoRRE.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-06-17 13:46:54 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080617134654-cl0gi4u524cv1ici
Tags: 1:1.0.9~rc3-1
* Package new upstream version
  - upstream ported the code to qt4.4 (Closes: #481974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
 
2
//
 
3
//  This file is part of the VNC system.
 
4
//
 
5
//  The VNC system is free software; you can redistribute it and/or modify
 
6
//  it under the terms of the GNU General Public License as published by
 
7
//  the Free Software Foundation; either version 2 of the License, or
 
8
//  (at your option) any later version.
 
9
//
 
10
//  This program is distributed in the hope that it will be useful,
 
11
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
//  GNU General Public License for more details.
 
14
//
 
15
//  You should have received a copy of the GNU General Public License
 
16
//  along with this program; if not, write to the Free Software
 
17
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 
18
//  USA.
 
19
//
 
20
// TightVNC distribution homepage on the Web: http://www.tightvnc.com/
 
21
//
 
22
// If the source code for the VNC system is not available from the place 
 
23
// whence you received this file, check http://www.uk.research.att.com/vnc or contact
 
24
// the authors on vnc@uk.research.att.com for information on obtaining it.
 
25
 
 
26
 
 
27
// vncEncodeCoRRE object
 
28
 
 
29
// The vncEncodeCoRRE object uses a compression encoding to send rectangles
 
30
// to a client
 
31
 
 
32
class vncEncodeCoRRE;
 
33
 
 
34
#if !defined(_WINVNC_ENCODECORRRE)
 
35
#define _WINVNC_ENCODECORRE
 
36
#pragma once
 
37
 
 
38
#include "vncEncoder.h"
 
39
 
 
40
// Class definition
 
41
 
 
42
class vncEncodeCoRRE : public vncEncoder
 
43
{
 
44
// Fields
 
45
public:
 
46
 
 
47
// Methods
 
48
public:
 
49
        // Create/Destroy methods
 
50
        vncEncodeCoRRE();
 
51
        ~vncEncodeCoRRE();
 
52
 
 
53
        virtual void Init();
 
54
        virtual const char* GetEncodingName() { return "CoRRE"; }
 
55
 
 
56
        virtual UINT RequiredBuffSize(UINT width, UINT height);
 
57
        virtual UINT NumCodedRects(RECT &rect);
 
58
 
 
59
        virtual UINT EncodeRect(BYTE *source, BYTE *dest, const RECT &rect, int offx, int offy);
 
60
        virtual void SetCoRREMax(BYTE width, BYTE height);
 
61
protected:
 
62
        virtual UINT InternalEncodeRect(BYTE *source, BYTE *dest, const RECT &rect);
 
63
        virtual UINT EncodeSmallRect(BYTE *source, BYTE *dest, const RECT &rect);
 
64
 
 
65
// Implementation
 
66
protected:
 
67
        BYTE            *m_buffer;
 
68
        size_t          m_bufflen;
 
69
 
 
70
        // Maximum height & width for CoRRE
 
71
        int                     m_maxwidth;
 
72
        int                     m_maxheight;
 
73
 
 
74
        // Last-update stats for CoRRE
 
75
        UINT            m_encodedbytes, m_rectbytes;
 
76
        UINT            m_lastencodedbytes, m_lastrectbytes;
 
77
        int                     m_maxadjust;
 
78
        int                     m_threshold;
 
79
        BOOL            m_statsready;
 
80
        int                     offsetx;
 
81
        int                     offsety;
 
82
};
 
83
 
 
84
#endif // _WINVNC_ENCODECORRE
 
85