WavFile.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_WAVFILE_H
#define SH_WAVFILE_H
#include <vector>
#include "CvrStgFile.h"
class BinaryIO ;
class WavChunkHeader ;
class WavChunkUnused ;
class WavFormatChunk ;
class WavFile : public CvrStgFile {
public:
WavFile (void) ;
WavFile (BinaryIO *io) ;
~WavFile (void) ;
void read (BinaryIO *io) ;
void write (void) ;
std::list<CvrStgFile::Property> getProperties (void) const ;
unsigned long getNumSamples (void) const ;
void replaceSample (const SamplePos pos, const SampleValue* s) ;
SampleValue* getSampleValue (SamplePos pos) const ;
std::vector<SampleValueAdjacencyList*> calcSVAdjacencyLists (const std::vector<SampleValue*>& svs) const ;
std::vector<MatchingAlgorithm*> getMatchingAlgorithms (Graph* g, Matching* m) const ;
unsigned short getBitsPerSample (void) const ;
private:
static const signed short FormatPCM = 1 ;
static const unsigned short SamplesPerVertex = 2 ;
static const UWORD32 Radius_small = 1 ;
static const UWORD32 Radius_large = 20 ;
static const EmbValue EmbValueModulus = 2 ;
WavChunkHeader *riffchhdr ;
char id_wave[4] ;
WavFormatChunk *FormatChunk ;
WavChunkHeader *datachhdr ;
std::vector<unsigned char> data_small ;
std::vector<int> data_large ; // it is assumed that an int can hold 32 bits
std::vector<WavChunkUnused*> UnusedBeforeData ;
std::vector<BYTE> UnusedAfterData ;
void readheaders (void) ;
void readdata (void) ;
void writeheaders (void) ;
void writedata (void) ;
void calcpos (SamplePos n, unsigned long *bytepos, unsigned short *firstbitpos) const ;
unsigned short getFirstBitPosinSample (void) ;
unsigned short getBytesPerSample (void) ;
} ;
#endif // ndef SH_WAVFILE_H
WavFile::writedata
void writedata(void)
Definition: WavFile.cc:267
WavFile::Radius_small
static const UWORD32 Radius_small
Definition: WavFile.h:57
WavFile::calcpos
void calcpos(SamplePos n, unsigned long *bytepos, unsigned short *firstbitpos) const
WavFile::riffchhdr
WavChunkHeader * riffchhdr
Definition: WavFile.h:61
WavFile::FormatChunk
WavFormatChunk * FormatChunk
Definition: WavFile.h:64
WavFile
Definition: WavFile.h:33
Graph
a graph constructed from a cover file and a message to be embedded
Definition: Graph.h:51
WavFile::getSampleValue
SampleValue * getSampleValue(SamplePos pos) const
Definition: WavFile.cc:118
CvrStgFile
a cover-/stego-file
Definition: CvrStgFile.h:46
WavChunkHeader
Definition: WavChunkHeader.h:28
WavFile::read
void read(BinaryIO *io)
Definition: WavFile.cc:56
SamplePos
UWORD32 SamplePos
Definition: common.h:67
SampleValue
the value of a sample in a CvrStgFile
Definition: SampleValue.h:61
WavFile::getFirstBitPosinSample
unsigned short getFirstBitPosinSample(void)
Definition: WavFile.cc:188
WavFile::~WavFile
~WavFile(void)
Definition: WavFile.cc:46
WavFile::Radius_large
static const UWORD32 Radius_large
Definition: WavFile.h:58
WavFile::getBytesPerSample
unsigned short getBytesPerSample(void)
Definition: WavFile.cc:176
WavFile::data_small
std::vector< unsigned char > data_small
this std::vector contains the wav data if BitsPerSample <= 8
Definition: WavFile.h:68
UWORD32
unsigned long UWORD32
Definition: common.h:45
Matching
represent a matching on a graph
Definition: Matching.h:41
WavFile::FormatPCM
static const signed short FormatPCM
Definition: WavFile.h:54
BinaryIO
provides methods for file i/o as needed by the rest of steghide
Definition: BinaryIO.h:33
WavChunkUnused
Definition: WavChunkUnused.h:30
WavFile::replaceSample
void replaceSample(const SamplePos pos, const SampleValue *s)
Definition: WavFile.cc:106
WavFile::getMatchingAlgorithms
std::vector< MatchingAlgorithm * > getMatchingAlgorithms(Graph *g, Matching *m) const
Definition: WavFile.cc:86
CvrStgFile.h
WavFile::SamplesPerVertex
static const unsigned short SamplesPerVertex
Definition: WavFile.h:56
WavFile::readheaders
void readheaders(void)
Definition: WavFile.cc:313
WavFile::WavFile
WavFile(void)
WavFile::datachhdr
WavChunkHeader * datachhdr
Definition: WavFile.h:66
WavFile::writeheaders
void writeheaders(void)
Definition: WavFile.cc:374
WavFile::EmbValueModulus
static const EmbValue EmbValueModulus
Definition: WavFile.h:59
WavFile::calcSVAdjacencyLists
std::vector< SampleValueAdjacencyList * > calcSVAdjacencyLists(const std::vector< SampleValue *> &svs) const
Definition: WavFile.cc:130
WavFile::write
void write(void)
Definition: WavFile.cc:64
WavFile::id_wave
char id_wave[4]
Definition: WavFile.h:62
EmbValue
BYTE EmbValue
Definition: common.h:66
WavFile::getNumSamples
unsigned long getNumSamples(void) const
Definition: WavFile.cc:94
WavFile::getBitsPerSample
unsigned short getBitsPerSample(void) const
Definition: WavFile.cc:171
WavFile::readdata
void readdata(void)
Definition: WavFile.cc:201
WavFile::UnusedBeforeData
std::vector< WavChunkUnused * > UnusedBeforeData
Definition: WavFile.h:72
WavFile::getProperties
std::list< CvrStgFile::Property > getProperties(void) const
Definition: WavFile.cc:72
WavFile::UnusedAfterData
std::vector< BYTE > UnusedAfterData
Definition: WavFile.h:73
WavFile::data_large
std::vector< int > data_large
this std::vector contains the wav data if BitsPerSample >8
Definition: WavFile.h:70
WavFormatChunk
Definition: WavFormatChunk.h:29