CMVideoSampling.h 661 B

12345678910111213141516171819
  1. #pragma once
  2. // small helper for getting texture from CMSampleBuffer
  3. typedef struct
  4. CMVideoSampling
  5. {
  6. void* cvTextureCache;
  7. void* cvTextureCacheTexture;
  8. void* cvImageBuffer;
  9. }
  10. CMVideoSampling;
  11. void CMVideoSampling_Initialize(CMVideoSampling* sampling);
  12. void CMVideoSampling_Uninitialize(CMVideoSampling* sampling);
  13. intptr_t CMVideoSampling_ImageBuffer(CMVideoSampling* sampling, CVImageBufferRef buffer, size_t* w, size_t* h);
  14. intptr_t CMVideoSampling_SampleBuffer(CMVideoSampling* sampling, void* buffer, size_t* w, size_t* h); // buffer is CMSampleBufferRef
  15. intptr_t CMVideoSampling_LastSampledTexture(CMVideoSampling* sampling);