Logo Search packages:      
Sourcecode: djvulibre version File versions

bool DjVuFile::resume_decode ( const bool  sync = false  ) 

Start the decode iff not already decoded. If sync is true, wait wait for decode to complete. Returns true of start_decode is called.

Definition at line 1372 of file DjVuFile.cpp.

References is_decode_failed(), is_decode_ok(), is_decoding(), start_decode(), and wait_for_finish().

{
  bool retval=false;
  {
    GMonitorLock lock(&flags);
    if( !is_decoding() && !is_decode_ok() && !is_decode_failed() )
    {
      start_decode();
      retval=true;
    }
  }
  if(sync)
  {
    wait_for_finish();
  }
  return retval;
}


Generated by  Doxygen 1.6.0   Back to index