tightvnc/rfb-sconn/JpegCompressor.cpp
//
// Our implementation of destination manager.
//
Our implementation of destination manager.
Our implementation of destination manager .
void
StandardJpegCompressor::initDestination()
{
  if (!m_outputBuffer) {
    size_t newSize = ALLOC_CHUNK_SIZE;
    m_outputBuffer = (unsigned char *)malloc(newSize);
    m_numBytesAllocated = newSize;
  }
  m_numBytesReady = 0;
  m_jpeg.cinfo.dest->next_output_byte = m_outputBuffer;
  m_jpeg.cinfo.dest->free_in_buffer =  m_numBytesAllocated;
}
void StandardJpegCompressor :: initDestination ( ) { if ( ! m_outputBuffer ) { size_t newSize = ALLOC_CHUNK_SIZE ; m_outputBuffer = ( unsigned char * ) malloc ( newSize ) ; m_numBytesAllocated = newSize ; } m_numBytesReady = 0 ; m_jpeg . cinfo . dest -> next_output_byte = m_outputBuffer ; m_jpeg . cinfo . dest -> free_in_buffer = m_numBytesAllocated ; }
Our implementation of destination manager.
Our implementation of destination manager .