Last active
September 5, 2017 17:31
-
-
Save unktomi/434cb971da6db1b4e0b5f7ad89c73fe2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "CoreMinimal.h" | |
#include "MediaTexture.h" | |
#include "AVFoundation/AVFoundation.h" | |
#include "CoreMedia/CoreMedia.h" | |
#include <Metal/Metal.h> | |
@class FSampleBufferDelegate; | |
class FIOSCamera | |
{ | |
private: | |
CVMetalTextureCacheRef TextureCache; | |
AVCaptureSession* AVSession; | |
AVCaptureDevice* VideoDevice; | |
dispatch_queue_t DispatchQueue; | |
FSampleBufferDelegate* SampleBufferDelegate; | |
UMediaTexture* VideoSink; | |
public: | |
void HandleSampleBuffer(CMSampleBufferRef sampleBuffer); | |
public: | |
FIOSCamera(UMediaTexture* InSink); | |
virtual ~FIOSCamera(); | |
float GetFieldOfView(); | |
FVector2D GetVideoSize(); | |
void SetupCamera(); | |
void TeardownCamera(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment