CMVideoSampling.h 548 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. // buffer is CMSampleBufferRef
  14. intptr_t CMVideoSampling_SampleBuffer(CMVideoSampling* sampling, void* buffer, size_t* w, size_t* h);
  15. intptr_t CMVideoSampling_LastSampledTexture(CMVideoSampling* sampling);