Changes between Version 80 and Version 81 of rfc24_progressive_data_support


Ignore:
Timestamp:
Mar 14, 2010, 2:46:36 PM (14 years ago)
Author:
warmerdam
Comment:

update a RasterIO to Reader, and timeout details.

Legend:

Unmodified
Added
Removed
Modified
  • rfc24_progressive_data_support

    v80 v81  
    1111== Interfaces ==
    1212
    13 === GDALAsyncRasterIO ===
     13=== GDALAsyncReader ===
    1414
    1515This 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. 
     
    1919While 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.
    2020
    21 {{{
    22 class CPL_DLL GDALAsyncRasterIO
     21{{{ 
     22class CPL_DLL GDALAsyncReader
    2323{
    2424  protected:
     
    4040
    4141  public:
    42     GDALAsyncRasterIO(GDALDataset* poDS = NULL);
    43     virtual ~GDALAsyncRasterIO();
     42    GDALAsyncReader(GDALDataset* poDS = NULL);
     43    virtual ~GDALAsyncReader();
    4444
    4545    GDALDataset* GetGDALDataset() {return poDS;}
     
    5858    int GetBandSpace() {return nBandSpace;}
    5959
    60     virtual GDALAsyncStatusType GetNextUpdatedRegion(int nTimeout,
     60    virtual GDALAsyncStatusType GetNextUpdatedRegion(double dfTimeout,
    6161                                                     int* pnBufXOff,
    6262                                                     int* pnBufYOff,
     
    6464                                                     int* pnBufXSize) = 0;
    6565
    66     virtual void LockBuffer() = 0;
    67     virtual void UnlockBuffer() = 0;
     66    virtual int LockBuffer( double dfTimeout );
     67    virtual void UnlockBuffer();
    6868
    6969    friend class GDALDataset;
     
    7575{{{
    7676GDALAsyncStatusType
    77 GDALAsyncRasterio::GetNextUpdatedRegion(int nTimeout,
     77GDALAsyncRasterio::GetNextUpdatedRegion(int dfTimeout,
    7878                                        int* pnBufXOff, int* pnBufYOff,
    7979                                        int* pnBufXSize, int* pnBufXSize);
    8080
    81 int nTimeout;
    82   The amount of time to wait for results measured in milliseconds.  If this is
     81int dfTimeout;
     82  The amount of time to wait for results measured  in seconds.  If this is
    8383  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
    8586  arbitrary amount of time.
    8687
     
    116117
    117118{{{
    118     virtual GDALAsyncRasterIO*
    119         BeginAsyncRasterIO(int nXOff, int nYOff, int nXSize, int nYSize,
     119    virtual GDALAsyncReader*
     120        BeginAsyncReader(int nXOff, int nYOff, int nXSize, int nYSize,
    120121                           void *pBuf, int nBufXSize, int nBufYSize,
    121122                           GDALDataType eBufType,
     
    123124                           int nPixelSpace, int nLineSpace, int nBandSpace,
    124125                           char **papszOptions);
    125     virtual void EndAsyncRasterIO(GDALAsyncRasterIO *);
     126    virtual void EndAsyncReader(GDALAsyncReader *);
    126127}}}
    127128
    128 It is expected that as part of gdal/gcore a default !GDALAsyncRasterIO 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.
     129It 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.
    129130
    130131=== GDALDriver ===
     
    144145=== C API ===
    145146
    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 GDALAsyncRasterIO accessors since the provided information is already available in the application from the call launching the async io.
     147The 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.
    147148
    148149{{{
    149 typedef void *GDALAsyncRasterIOH;
     150typedef void *GDALAsyncReaderH;
    150151
    151152GDALAsyncStatusType CPL_DLL CPL_STDCALL
    152 GDALGetNextUpdatedRegion(GDALAsyncRasterIOH hARIO, int nTimeout,
     153GDALGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
    153154                         int* pnXBufOff, int* pnYBufOff,
    154155                         int* pnXBufSize, int* pnYBufSize );
    155 void CPL_DLL CPL_STDCALL GDALLockBuffer(GDALAsyncRasterIOH hARIO);
    156 void CPL_DLL CPL_STDCALL GDALUnlockBuffer(GDALAsyncRasterIOH hARIO);
     156void CPL_DLL CPL_STDCALL GDALLockBuffer(GDALAsyncReaderH hARIO);
     157void CPL_DLL CPL_STDCALL GDALUnlockBuffer(GDALAsyncReaderH hARIO);
    157158
    158 GDALAsyncRasterIOH CPL_DLL CPL_STDCALL
    159 GDALBeginAsyncRasterIO(GDALDatasetH hDS, int nXOff, int nYOff,
     159GDALAsyncReaderH CPL_DLL CPL_STDCALL
     160GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
    160161                       int nXSize, int nYSize,
    161162                       void *pBuf, int nBufXSize, int nBufYSize,
     
    165166                       char **papszOptions);
    166167void  CPL_DLL CPL_STDCALL
    167 GDALEndAsyncRasterIO(GDALDatasetH hDS, GDALAsyncRasterIOH hAsynchRasterIOH);
     168GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchRasterIOH);
    168169}}}
    169170