Expose screen capturer init mechanism in GodotObs
This commit is contained in:
parent
aa664fbd6b
commit
c5e4c2989b
|
@ -52,6 +52,7 @@ void Obs::_bind_methods()
|
|||
ClassDB::bind_method(D_METHOD("get_screen_frame"), &Obs::getEncodedScreenFrame);
|
||||
ClassDB::bind_method(D_METHOD("render_frame"), &Obs::renderFrameToMesh);
|
||||
ClassDB::bind_method(D_METHOD("get_screen_count"), &Obs::getScreenCount);
|
||||
ClassDB::bind_method(D_METHOD("start_capture"), &Obs::startCapture);
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,6 +93,12 @@ Obs::~Obs()
|
|||
}
|
||||
|
||||
|
||||
bool Obs::startCapture()
|
||||
{
|
||||
return m_capturer.init();
|
||||
}
|
||||
|
||||
|
||||
PackedByteArray Obs::getEncodedScreenFrame(size_t id)
|
||||
{
|
||||
#ifdef PROFILER_ENABLED
|
||||
|
|
|
@ -28,9 +28,10 @@ public:
|
|||
Obs();
|
||||
~Obs();
|
||||
|
||||
bool startCapture();
|
||||
|
||||
PackedByteArray getEncodedScreenFrame(size_t id);
|
||||
void renderFrameToMesh(PackedByteArray frame, Ref<StandardMaterial3D> mat);
|
||||
|
||||
size_t getScreenCount() const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue