Compare commits

..

No commits in common. "bef8baba5f42da6d33d4a25ba9ac2c4588edd0b4" and "a7aa2fa59826bf154ea977d331014afaaafdc8cd" have entirely different histories.

7 changed files with 8 additions and 59 deletions

BIN
3rdparty/opus/lib/opus.lib (Stored with Git LFS) vendored

Binary file not shown.

BIN
3rdparty/speex/lib/libspeex.lib (Stored with Git LFS) vendored

Binary file not shown.

BIN
3rdparty/speex/lib/libspeexdsp.lib (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -51,7 +51,6 @@ 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);
}
@ -177,9 +176,4 @@ void Obs::renderFrameToMesh(PackedByteArray frame, Ref<StandardMaterial3D> mat)
#endif
}
size_t Obs::getScreenCount() const
{
return microtaur::ScreenEnumerator().count();
}
}

View File

@ -31,8 +31,6 @@ public:
PackedByteArray getEncodedScreenFrame(size_t id);
void renderFrameToMesh(PackedByteArray frame, Ref<StandardMaterial3D> mat);
size_t getScreenCount() const;
private:
bool m_initialized{false};
bool m_decInitialized{false};

View File

@ -18,18 +18,8 @@
using namespace godot;
namespace microtaur {
namespace {
BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData)
namespace microtaur
{
auto* count = reinterpret_cast<size_t*>(dwData);
(*count)++;
return TRUE;
}
}
class AcceleratedWindowCapturer
{
@ -74,7 +64,7 @@ public:
dxgiDevice->Release();
IDXGIOutput* dxgiOutput = nullptr;
hr = dxgiAdapter->EnumOutputs(m_currentScreen, &dxgiOutput);
hr = dxgiAdapter->EnumOutputs(1, &dxgiOutput); // TODO: screen choose
if (FAILED(hr)) {
reset();
return;
@ -387,17 +377,6 @@ public:
init();
}
void setCurrentScreen(size_t target)
{
m_currentScreen = target;
reset();
}
size_t getCurrentScreen() const
{
return m_currentScreen;
}
private:
Microsoft::WRL::ComPtr<ID3D11Device> m_device;
Microsoft::WRL::ComPtr<ID3D11DeviceContext> m_context;
@ -411,8 +390,6 @@ private:
size_t m_width{};
size_t m_height{};
size_t m_currentScreen{};
};
@ -427,21 +404,7 @@ WindowCapturer::~WindowCapturer()
Frame WindowCapturer::capture(size_t id, size_t width, size_t height)
{
if (id != m_impl->getCurrentScreen()) {
m_impl->setCurrentScreen(id);
}
return m_impl->nextFrame(width, height);
}
size_t ScreenEnumerator::count()
{
size_t c = 0;
if (EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (LPARAM)&c)) {
return c;
}
return -1;
}
}

View File

@ -27,10 +27,4 @@ private:
};
class ScreenEnumerator
{
public:
static size_t count();
};
}