Guard libdatachannel. Remove unused code

This commit is contained in:
Lam Wei Lun
2026-09-15 16:33:12 +08:00
parent e48f9f47d2
commit 79c20a1fad
4 changed files with 10 additions and 26 deletions

9
deps/CMakeLists.txt vendored
View File

@@ -389,7 +389,12 @@ if(NOT OPENSSL_FOUND)
set(OPENSSL_PKG dep_OpenSSL)
endif()
include(DataChannel/DataChannel.cmake)
find_package(LibDataChannel QUIET)
set(DATACHANNEL_PKG "")
if (NOT LibDataChannel_FOUND)
include(DataChannel/DataChannel.cmake)
set(DATACHANNEL_PKG dep_DataChannel)
endif()
# we don't want to load a "wrong" openssl when loading curl
# so, just don't even bother
@@ -463,7 +468,7 @@ set(_dep_list
dep_wxInspector
dep_FFMPEG
dep_Assimp
dep_DataChannel
${DATACHANNEL_PKG}
)
if (MSVC)

View File

@@ -81,7 +81,7 @@ CameraPopup::CameraPopup(wxWindow *parent)
top_sizer->Add(m_text_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, FromDIP(5));
top_sizer->Add(m_switch_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, FromDIP(5));
m_switch_liveview_retry->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) {
m_switch_liveview_retry->Bind(wxEVT_TOGGLEBUTTON, [](wxCommandEvent &e) {
wxGetApp().app_config->set("liveview", "auto_retry", e.IsChecked());
e.Skip();
});

View File

@@ -68,19 +68,4 @@ void WebMediaController::Stop()
m_webview->Stop();
}
// wxMediaState WebMediaController::GetState()
// {
// return wxMediaState{};
// }
// int WebMediaController::GetLastError() const
// {
// return 0;
// }
// wxSize WebMediaController::GetVideoSize() const
// {
// return wxSize{};
// }
}} // namespace Slic3r::GUI

View File

@@ -11,7 +11,7 @@ namespace Slic3r { namespace GUI {
class WebMediaController : public IMediaController
{
public:
explicit WebMediaController(wxWebView *webview);
explicit WebMediaController(wxWebView* webview);
void Load(wxURI url) override;
@@ -21,14 +21,8 @@ public:
void Stop() override;
// wxMediaState GetState() override;
// int GetLastError() const override;
// wxSize GetVideoSize() const override;
private:
wxWebView * m_webview;
wxWebView* m_webview;
std::string m_url;
CameraStreamMode m_stream_mode = CameraStreamMode::http;
};