#include "main.h"
#include "support.h"
LT_USE_NAMESPACE(LizardTech);
{
public:
MyInterrupt(int n) :
m_cnt(0),
m_max(n)
{
return;
}
{
printf("interrupt called %d times\n", m_cnt);
if (m_cnt == 10) return 999;
++m_cnt;
}
public:
int m_cnt;
private:
const int m_max;
};
{
MyInterrupt interrupt(10);
const LTFileSpec fileSpec(INPUT_PATH(
"meg_cr20.sid"));
TEST_BOOL(reader != nullptr);
const LTIScene scene(0, 0, 640, 480, 1.0);
scene.getNumCols(), scene.getNumRows(),
nullptr);
sts = reader->
read(scene, bufData);
TEST_BOOL(sts == 999);
TEST_BOOL(interrupt.m_cnt == 10);
reader = nullptr;
}
lt_uint32 LT_STATUS
An integral status code.
#define LT_STS_Uninit
status code indicating unintialized variable
#define LT_STS_Success
status code indicating success
Represents a file or directory path.
interrupt delegate (callback) base class
virtual LT_STATUS getInterruptStatus(void)=0
check for interrupt
void setInterruptDelegate(LTIInterruptDelegate *delegate)
set interrupt delegate
const LTIPixel & getPixelProps() const
get the pixel properties of the image
LT_STATUS read(const LTIScene &scene, LTISceneBuffer &buffer)
read (decode) a scene from the image
virtual void release(void) const
decrement the reference counter and delete the object when the counter is zero
representation of a scene
class to hold data passed between image stages
reader for MrSID images (MG2, MG3 and MG4)
static MrSIDImageReader * create(void)
LT_STATUS initialize(const LTFileSpec &fileSpec, bool useWorldFile=false, MrSIDMemoryUsage memoryUsage=MRSID_MEMORY_USAGE_DEFAULT, MrSIDStreamUsage streamUsage=MRSID_STREAM_USAGE_DEFAULT)
initializer