~ubuntu-branches/ubuntu/vivid/rawstudio/vivid

« back to all changes in this revision

Viewing changes to plugins/load-rawspeed/rawspeed/ByteStream.h

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2011-07-28 17:36:32 UTC
  • mfrom: (2.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110728173632-5czluz9ye3c83zc5
Tags: 2.0-1
* [3750b2cf] Merge commit 'upstream/2.0'
* [63637468] Removing Patch, not necessary anymore.
* [2fb580dc] Add new build-dependencies.
* [c57d953b] Run dh_autoreconf due to patches in configure.in
* [13febe39] Add patch to remove the libssl requirement.
* [5ae773fe] Replace libjpeg62-dev by libjpeg8-dev :)
* [1969d755] Don't build static libraries.
* [7cfe0a2e] Add a patch to fix the plugin directory path.
  As plugins are shared libraries, they need to go into /usr/lib,
  not into /usr/share.
  Thanks to Andrew McMillan
* [c1d0d9dd] Don't install .la files for all plugins and libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
    RawSpeed - RAW file decoder.
 
3
 
 
4
    Copyright (C) 2009 Klaus Post
 
5
 
 
6
    This library is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU Lesser General Public
 
8
    License as published by the Free Software Foundation; either
 
9
    version 2 of the License, or (at your option) any later version.
 
10
 
 
11
    This library is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
    Lesser General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU Lesser General Public
 
17
    License along with this library; if not, write to the Free Software
 
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
19
 
 
20
    http://www.klauspost.com
 
21
*/
 
22
#ifndef BYTE_STREAM_H
 
23
#define BYTE_STREAM_H
 
24
 
 
25
#include "IOException.h"
 
26
 
 
27
namespace RawSpeed {
 
28
 
 
29
class ByteStream
 
30
{
 
31
public:
 
32
  ByteStream(const uchar8* _buffer, uint32 _size);
 
33
  ByteStream(const ByteStream* b);
 
34
  ~ByteStream(void);
 
35
  uint32 peekByte();
 
36
  uint32 getOffset() {return off;}
 
37
  void skipBytes(uint32 nbytes);
 
38
  uchar8 getByte();
 
39
  void setAbsoluteOffset(uint32 offset);
 
40
  void skipToMarker();
 
41
  uint32 getRemainSize() { return size-off;}
 
42
  const uchar8* getData() {return &buffer[off];}
 
43
  virtual ushort16 getShort();
 
44
  virtual int getInt();
 
45
protected:
 
46
  const uchar8* buffer;
 
47
  const uint32 size;            // This if the end of buffer.
 
48
  uint32 off;                  // Offset in bytes (this is next byte to deliver)
 
49
 
 
50
};
 
51
 
 
52
} // namespace RawSpeed
 
53
 
 
54
#endif