source.h 730 B

123456789101112131415161718192021222324252627
  1. #include <stdlib.h>
  2. #include <stdint.h> // uintptr_t
  3. #include <vips/vips.h>
  4. #include <vips/connection.h>
  5. #ifndef VIPS_IMGPROXY_SOURCE_H
  6. #define VIPS_IMGPROXY_SOURCE_H
  7. // vips async source
  8. typedef struct _VipsImgproxySource {
  9. VipsSource source; // class designator
  10. uintptr_t readerHandle; // async reader handler
  11. } VipsImgproxySource;
  12. // glib class for vips async source
  13. typedef struct _VipsImgproxySourceClass {
  14. VipsSourceClass parent_class;
  15. } VipsImgproxySourceClass;
  16. // creates new vips async source from a reader handle
  17. VipsImgproxySource *vips_new_imgproxy_source(uintptr_t readerHandle);
  18. // unreferences the source, which leads to reader close
  19. void unref_imgproxy_source(VipsImgproxySource *source);
  20. #endif