Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members

mxcpcFramewiseMxPEGDecoder Class Reference
[mxcpc (MOBOTIX Cross Platform Client Library)]

Decoder implementation using the classic Mx approach. More...

#include <mxcpcFramewiseMxPEGDecoder.h>

Inheritance diagram for mxcpcFramewiseMxPEGDecoder:

Inheritance graph
[legend]
Collaboration diagram for mxcpcFramewiseMxPEGDecoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 mxcpcFramewiseMxPEGDecoder (mxcpcStreamSource *source, mxcpcMxPEGDecoderBackEnd *backend, mxcpcFramewiseMxPEGScanDecoder *scan_decoder)
 The decoder assumes ownership over all three subcomponents.
int decode (int num)
 Reimplemented.

Private Types

enum  DecoderState {
  AwaitSOI, AwaitAPP0, APP0, Determine_FingerPrint_Or_FrameHeader,
  Determine_FingerPrint_Or_FrameHeader2, FingerPrint, AwaitFrameHeader, AwaitFrameHeader2,
  FrameHeader, BitMask_Or_Tables, QuantizationTable1, AwaitQuantizationTable2,
  QuantizationTable2, Huffman_Or_SOF, SOF, HuffmanTable,
  Huffman_Or_Scan, Scan, Scan2, BitMask,
  Tables_Or_Scan, Audio_Or_SOI, Audio, No_Good_State
}

Private Member Functions

void feedBytes (unsigned char *buffer, int num)
 Internally used to pump raw MxPEG stream data into the decoder's state machine.
bool awaitMarker (unsigned char *marker_type)
 Private helper method.
bool readMarkerPayload (void)
 Private helper method.
bool doScan (void)
 Private helper method.

Private Attributes

DecoderState State
unsigned char * CurrentBytePtr
int BytesLeft
int AwaitMarkerStage
int ReadMarkerStage
unsigned char ReadMarkerFirstLenByte
int MarkerBytesNeeded
int ScanStage
unsigned char * MarkerPayload
UndecodedFrameDescriptor FrameDescriptor
int Width
int Height
mxcpcFramewiseMxPEGScanDecoderScanDecoder
unsigned char * PrefetchBuffer
int PrefetchBuffSize
int PrefetchedBytes

Classes

class  UndecodedFrameDescriptor

Detailed Description

Decoder implementation using the classic Mx approach.

Note:
MXCPC_FRAMEWISEMXPEGDECODER_MAXTILENUM possibly needs to be adapted

Definition at line 49 of file mxcpcFramewiseMxPEGDecoder.h.


Member Function Documentation

bool mxcpcFramewiseMxPEGDecoder::awaitMarker unsigned char *  marker_type  )  [private]
 

Private helper method.

Eats BytesLeft==0

Result:

  • false : no marker yet, all bytes consumed
  • true : marker found, BytesLeft and CurrentBytePtr modified accordingly (bytes may be consumed), AwaitMarkerStage == 0

Definition at line 376 of file mxcpcFramewiseMxPEGDecoder.cpp.

Referenced by feedBytes().

bool mxcpcFramewiseMxPEGDecoder::doScan void   )  [private]
 

Private helper method.

Analogous behavior as waitMarker().

Definition at line 485 of file mxcpcFramewiseMxPEGDecoder.cpp.

References mxcpc::sendStatusMsg().

Referenced by feedBytes().

void mxcpcFramewiseMxPEGDecoder::feedBytes unsigned char *  buffer,
int  num
[private]
 

Internally used to pump raw MxPEG stream data into the decoder's state machine.

Definition at line 126 of file mxcpcFramewiseMxPEGDecoder.cpp.

References awaitMarker(), doScan(), mxcpcMxPEGDecoderBackEnd::frameComplete(), mxcpcFramewiseMxPEGScanDecoder::performScanSweep(), readMarkerPayload(), mxcpc::sendStatusMsg(), mxcpcFramewiseMxPEGScanDecoder::setUVQuantizationTable(), mxcpcFramewiseMxPEGScanDecoder::setYQuantizationTable(), and mxcpcMxPEGDecoderBackEnd::videoResolutionChanged().

Referenced by decode().

bool mxcpcFramewiseMxPEGDecoder::readMarkerPayload void   )  [private]
 

Private helper method.

If method returns true, the payload is recognized to be completely present and the MarkerPayload pointer is set accordingly.

Analogous behavior as waitMarker().

Definition at line 423 of file mxcpcFramewiseMxPEGDecoder.cpp.

Referenced by feedBytes().


The documentation for this class was generated from the following files:
Generated on Mon Aug 15 03:39:46 2005 for mxcpc by  doxygen 1.4.2-20050421