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

mxcpc Namespace Reference
[mxcpc_core (Core Module - MxPEG Decoding Infrastructure)]

Namespace holding type definition stuff and general basic methods for the mxcpc library. More...


Typedefs

typedef unsigned char u8
typedef short s16
typedef unsigned int u32

Functions

const char * getVersionString (void)
 Returns the mxcpc library's version string.
void clamp_s16 (s16 *numba, s16 min, s16 max)
 Does the obvious thing.
void clamp_int (int *numba, int min, int max)
 Does the obvious thing.
void convert_endian_u32 (mxcpc::u32 *numba_ptr)
 Endian conversion.
void convert_RGB_to_YUV (mxcpc::u8 r, mxcpc::u8 g, mxcpc::u8 b, mxcpc::u8 *y, mxcpc::u8 *u, mxcpc::u8 *v)
void convert_RGB_to_YCbCr (mxcpc::u8 r, mxcpc::u8 g, mxcpc::u8 b, mxcpc::u8 *y, mxcpc::u8 *Cb, mxcpc::u8 *Cr)
void encode_base64_block (unsigned char in[3], unsigned char out[4], int len)
 Encodes 3-byte block of binary input as 4-byte block of base64 characters.
void encode_base64 (unsigned char *data, int byte_num, unsigned char *target_buffer)
 Encodes the given number of binary input bytes as a base64 character string.
void sendStatusMsg (const char *txt, void *class_ptr=0)
 Used from within the mxcpc library to emit status messages.
void setStatusMessageHandler (mxcpcStatusMessageHandler *handler)
 Registers the specified status message handler with mxcpc's central status messaging facility.
const char * getVersionString (void)
 Returns the mxcpc library's version string.
void sendStatusMsg (const char *txt, void *class_ptr)
 Used from within the mxcpc library to emit status messages.
void setStatusMessageHandler (mxcpcStatusMessageHandler *handler)
 Registers the specified status message handler with mxcpc's central status messaging facility.
void encode_base64_block (unsigned char in[3], unsigned char out[4], int len)
 Encodes 3-byte block of binary input as 4-byte block of base64 characters.
void encode_base64 (unsigned char *data, int byte_num, unsigned char *target_buffer)
 Encodes the given number of binary input bytes as a base64 character string.

Variables

mxcpcStatusMessageHandlerStatusMessageHandler = 0
const char * Base64EncodeTable
 Base64 encode table, see RFC1113.
int FrameRatePresetNum = 12
 Central definition of presets for camera framerate settings.
char * FrameRatePresetNames []
float FrameRatePresets []


Detailed Description

Namespace holding type definition stuff and general basic methods for the mxcpc library.

Function Documentation

void mxcpc::encode_base64 unsigned char *  data,
int  byte_num,
unsigned char *  target_buffer
 

Encodes the given number of binary input bytes as a base64 character string.

The generated base64 string will be 0-terminated.

Note that the target buffer must be of reasonable size, namely of at least (byte_num/3 + 1) * 4 + 1 bytes.

Note:
The base64 encoding code was adapted from some Bob Trower who has released it to the public domain.

Definition at line 112 of file mxcpc_namespace.cpp.

References encode_base64_block().

Referenced by mxcpcAsynchronousCameraLiveMxPEGFastStream::sendGETRequest().

void mxcpc::encode_base64 unsigned char *  data,
int  byte_num,
unsigned char *  target_buffer
 

Encodes the given number of binary input bytes as a base64 character string.

The generated base64 string will be 0-terminated.

Note that the target buffer must be of reasonable size, namely of at least (byte_num/3 + 1) * 4 + 1 bytes.

Note:
The base64 encoding code was adapted from some Bob Trower who has released it to the public domain.

Definition at line 112 of file mxcpc_namespace.cpp.

References encode_base64_block().

Referenced by mxcpcAsynchronousCameraLiveMxPEGFastStream::sendGETRequest().

void mxcpc::sendStatusMsg const char *  txt,
void *  class_ptr = 0
 

Used from within the mxcpc library to emit status messages.

That way, there is a central place that can be tweaked in order to change outputting of status messages.

Definition at line 70 of file mxcpc_namespace.cpp.

References mxcpcStatusMessageHandler::sendStatusMsg(), and StatusMessageHandler.

Referenced by mxcpcAsynchronousCameraLiveMxPEGFastStream::constructCommonStuff(), mxcpcFramewiseMxPEGScanDecoderSoftwareOnly::consumeScanBit(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::consumeScanBit(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::copyAccuToGlobalHuffBuffer(), mxcpcFramewiseMxPEGDecoder::decode(), mxcpcFramewiseMxPEGDecoder::doScan(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::encodeSubMCUTiles(), mxcpcFramewiseMxPEGDecoder::feedBytes(), mxcpcDefaultMxPEGDecoderBackEnd::frameComplete(), mxcpcFramewiseMxPEGDecoder::mxcpcFramewiseMxPEGDecoder(), mxcpcFramewiseMxPEGScanDecoderSoftwareOnly::mxcpcFramewiseMxPEGScanDecoderSoftwareOnly(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly(), mxcpcFramewiseMxPEGScanDecoderSoftwareOnly::performScanSweep(), mxcpcFramewiseMxPEGScanToJPEGConverterIPP::performScanSweep(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::performScanSweep(), mxcpcAsynchronousCameraLiveMxPEGFastStream::processIncomingBytes(), mxcpcSimpleMxPEGViewer::processMeasuredFramerate(), mxcpcSimpleMxPEGViewer::processWatchdog(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::shutDownHuffAccu(), mxcpcBufferedMxPEGDecoderBackEnd::videoResolutionChanged(), mxcpcDefaultMxPEGDecoderBackEnd::videoResolutionChanged(), mxcpcMxPEGRawFrameDumper::videoResolutionChanged(), and mxcpcAsynchronousCameraLiveMxPEGFastStream::~mxcpcAsynchronousCameraLiveMxPEGFastStream().

void mxcpc::sendStatusMsg const char *  txt,
void *  class_ptr = 0
 

Used from within the mxcpc library to emit status messages.

That way, there is a central place that can be tweaked in order to change outputting of status messages.

Definition at line 70 of file mxcpc_namespace.cpp.

References mxcpcStatusMessageHandler::sendStatusMsg(), and StatusMessageHandler.

Referenced by mxcpcAsynchronousCameraLiveMxPEGFastStream::constructCommonStuff(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::consumeScanBit(), mxcpcFramewiseMxPEGScanDecoderSoftwareOnly::consumeScanBit(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::copyAccuToGlobalHuffBuffer(), mxcpcFramewiseMxPEGDecoder::decode(), mxcpcFramewiseMxPEGDecoder::doScan(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::encodeSubMCUTiles(), mxcpcFramewiseMxPEGDecoder::feedBytes(), mxcpcDefaultMxPEGDecoderBackEnd::frameComplete(), mxcpcFramewiseMxPEGDecoder::mxcpcFramewiseMxPEGDecoder(), mxcpcFramewiseMxPEGScanDecoderSoftwareOnly::mxcpcFramewiseMxPEGScanDecoderSoftwareOnly(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::performScanSweep(), mxcpcFramewiseMxPEGScanToJPEGConverterIPP::performScanSweep(), mxcpcFramewiseMxPEGScanDecoderSoftwareOnly::performScanSweep(), mxcpcAsynchronousCameraLiveMxPEGFastStream::processIncomingBytes(), mxcpcSimpleMxPEGViewer::processMeasuredFramerate(), mxcpcSimpleMxPEGViewer::processWatchdog(), mxcpcFramewiseMxPEGScanToJPEGConverterSoftwareOnly::shutDownHuffAccu(), mxcpcMxPEGRawFrameDumper::videoResolutionChanged(), mxcpcDefaultMxPEGDecoderBackEnd::videoResolutionChanged(), mxcpcBufferedMxPEGDecoderBackEnd::videoResolutionChanged(), and mxcpcAsynchronousCameraLiveMxPEGFastStream::~mxcpcAsynchronousCameraLiveMxPEGFastStream().

void mxcpc::setStatusMessageHandler mxcpcStatusMessageHandler handler  ) 
 

Registers the specified status message handler with mxcpc's central status messaging facility.

The mxcpc library assumes ownership over the specified handler object. Any potential previously installed message handler is discarded properly.

Passing 0 to the method will properly discard a previously installed custom status message handler and revert to default status notification - which is sending all messages to stdout. Note that when shutting down, an mxcpc application should do exactly this to properly free the registered status message handler and the associated resources - if it had one installed in the first place.

Note that when using mxcpc functionality from different threads, any potentially installed custom status message handler must arrange for proper synchronization.

Definition at line 79 of file mxcpc_namespace.cpp.

References StatusMessageHandler.

Referenced by main().

void mxcpc::setStatusMessageHandler mxcpcStatusMessageHandler handler  ) 
 

Registers the specified status message handler with mxcpc's central status messaging facility.

The mxcpc library assumes ownership over the specified handler object. Any potential previously installed message handler is discarded properly.

Passing 0 to the method will properly discard a previously installed custom status message handler and revert to default status notification - which is sending all messages to stdout. Note that when shutting down, an mxcpc application should do exactly this to properly free the registered status message handler and the associated resources - if it had one installed in the first place.

Note that when using mxcpc functionality from different threads, any potentially installed custom status message handler must arrange for proper synchronization.

Definition at line 79 of file mxcpc_namespace.cpp.

References StatusMessageHandler.

Referenced by main().


Variable Documentation

const char * mxcpc::Base64EncodeTable
 

Initial value:

 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                       "abcdefghijklmnopqrstuvwxyz"
                                       "0123456789"
                                       "+/"
Base64 encode table, see RFC1113.

Definition at line 27 of file mxcpc_namespace.cpp.

Referenced by encode_base64_block().

char * mxcpc::FrameRatePresetNames
 

Initial value:

 { "Maximum",
                                        "25 fps",
                                        "12 fps",
                                        " 6 fps",
                                        " 4 fps",
                                        " 3 fps",
                                        " 2 fps",
                                        " 1 fps",
                                        "1/2 fps", 
                                        "1/3 fps",
                                        "1/4 fps",
                                        "1/5 fps"      
                                      }

Definition at line 33 of file mxcpc_namespace.cpp.

Referenced by mxcpcFastStreamParametersSelector::mxcpcFastStreamParametersSelector().

float mxcpc::FrameRatePresets
 

Initial value:

 {  0.0f,
                                    25.0f,
                                    12.0f,
                                     6.0f,
                                     4.0f,
                                     3.0f,
                                     2.0f,
                                     1.0f,
                                      .5f,
                                      .33f,
                                      .25f,
                                      .2f
                                  }

Definition at line 46 of file mxcpc_namespace.cpp.

Referenced by mxcpcFastStreamParametersSelector::getFrameRate(), and mxcpcFastStreamParametersSelector::mxcpcFastStreamParametersSelector().


Generated on Fri Jan 20 13:33:36 2006 for mxcpc by  doxygen 1.4.4