Changes between Version 80 and Version 81 of rfc24_progressive_data_support
- Timestamp:
- Mar 14, 2010, 2:46:36 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rfc24_progressive_data_support
v80 v81 11 11 == Interfaces == 12 12 13 === GDALAsyncR asterIO===13 === GDALAsyncReader === 14 14 15 15 This new class is intended to represent an active asynchronous raster imagery request. The request includes information on a source window on the dataset, a target buffer size (implies level of decimation or replication), the buffer type, buffer interleaving, data buffer and bands being requested. Essentially the same sort of information that is passed in a GDALDataset::!RasterIO() request. … … 19 19 While an implementation of the simple accessors is provided as part of the class, it is intended that the class be subclassed as part of implementation of a particular driver, and custom implementations of !GetNextUpdatedRegion(), !LockBuffer() and !UnlockBuffer() provided. 20 20 21 {{{ 22 class CPL_DLL GDALAsyncR asterIO21 {{{ 22 class CPL_DLL GDALAsyncReader 23 23 { 24 24 protected: … … 40 40 41 41 public: 42 GDALAsyncR asterIO(GDALDataset* poDS = NULL);43 virtual ~GDALAsyncR asterIO();42 GDALAsyncReader(GDALDataset* poDS = NULL); 43 virtual ~GDALAsyncReader(); 44 44 45 45 GDALDataset* GetGDALDataset() {return poDS;} … … 58 58 int GetBandSpace() {return nBandSpace;} 59 59 60 virtual GDALAsyncStatusType GetNextUpdatedRegion( int nTimeout,60 virtual GDALAsyncStatusType GetNextUpdatedRegion(double dfTimeout, 61 61 int* pnBufXOff, 62 62 int* pnBufYOff, … … 64 64 int* pnBufXSize) = 0; 65 65 66 virtual void LockBuffer() = 0;67 virtual void UnlockBuffer() = 0;66 virtual int LockBuffer( double dfTimeout ); 67 virtual void UnlockBuffer(); 68 68 69 69 friend class GDALDataset; … … 75 75 {{{ 76 76 GDALAsyncStatusType 77 GDALAsyncRasterio::GetNextUpdatedRegion(int nTimeout,77 GDALAsyncRasterio::GetNextUpdatedRegion(int dfTimeout, 78 78 int* pnBufXOff, int* pnBufYOff, 79 79 int* pnBufXSize, int* pnBufXSize); 80 80 81 int nTimeout;82 The amount of time to wait for results measured in milliseconds. If this is81 int dfTimeout; 82 The amount of time to wait for results measured in seconds. If this is 83 83 zero available work may be processed but no waiting for the arrival of more 84 imagery should be done. Processing available imagery may still take an 84 imagery should be done. A value of -1.0 means wait an infinite amount of 85 time for new data. Processing available imagery may still take an 85 86 arbitrary amount of time. 86 87 … … 116 117 117 118 {{{ 118 virtual GDALAsyncR asterIO*119 BeginAsyncR asterIO(int nXOff, int nYOff, int nXSize, int nYSize,119 virtual GDALAsyncReader* 120 BeginAsyncReader(int nXOff, int nYOff, int nXSize, int nYSize, 120 121 void *pBuf, int nBufXSize, int nBufYSize, 121 122 GDALDataType eBufType, … … 123 124 int nPixelSpace, int nLineSpace, int nBandSpace, 124 125 char **papszOptions); 125 virtual void EndAsyncR asterIO(GDALAsyncRasterIO*);126 virtual void EndAsyncReader(GDALAsyncReader *); 126 127 }}} 127 128 128 It is expected that as part of gdal/gcore a default !GDALAsyncR asterIOimplementation will be provided that just uses GDALDataset::!RasterIO() to perform the request as a single blocking request. However, this default implementation will ensure that applications can use the asynchronous interface without worrying whether a particular format will actually operate asynchronously.129 It is expected that as part of gdal/gcore a default !GDALAsyncReader implementation will be provided that just uses GDALDataset::!RasterIO() to perform the request as a single blocking request. However, this default implementation will ensure that applications can use the asynchronous interface without worrying whether a particular format will actually operate asynchronously. 129 130 130 131 === GDALDriver === … … 144 145 === C API === 145 146 146 The following C API wrappers for the C++ classes and methods will be added. Note that at this time there is no intention to provide C wrappers for all the GDALAsyncR asterIOaccessors since the provided information is already available in the application from the call launching the async io.147 The following C API wrappers for the C++ classes and methods will be added. Note that at this time there is no intention to provide C wrappers for all the GDALAsyncReader accessors since the provided information is already available in the application from the call launching the async io. 147 148 148 149 {{{ 149 typedef void *GDALAsyncR asterIOH;150 typedef void *GDALAsyncReaderH; 150 151 151 152 GDALAsyncStatusType CPL_DLL CPL_STDCALL 152 GDALGetNextUpdatedRegion(GDALAsyncR asterIOH hARIO, int nTimeout,153 GDALGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout, 153 154 int* pnXBufOff, int* pnYBufOff, 154 155 int* pnXBufSize, int* pnYBufSize ); 155 void CPL_DLL CPL_STDCALL GDALLockBuffer(GDALAsyncR asterIOH hARIO);156 void CPL_DLL CPL_STDCALL GDALUnlockBuffer(GDALAsyncR asterIOH hARIO);156 void CPL_DLL CPL_STDCALL GDALLockBuffer(GDALAsyncReaderH hARIO); 157 void CPL_DLL CPL_STDCALL GDALUnlockBuffer(GDALAsyncReaderH hARIO); 157 158 158 GDALAsyncR asterIOH CPL_DLL CPL_STDCALL159 GDALBeginAsyncR asterIO(GDALDatasetH hDS, int nXOff, int nYOff,159 GDALAsyncReaderH CPL_DLL CPL_STDCALL 160 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff, 160 161 int nXSize, int nYSize, 161 162 void *pBuf, int nBufXSize, int nBufYSize, … … 165 166 char **papszOptions); 166 167 void CPL_DLL CPL_STDCALL 167 GDALEndAsyncR asterIO(GDALDatasetH hDS, GDALAsyncRasterIOH hAsynchRasterIOH);168 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchRasterIOH); 168 169 }}} 169 170