OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
MediaPlayCtrl.cpp File Reference
#include "MediaPlayCtrl.h"
#include "PrinterNetworkTypes.hpp"
#include "WebMediaController.hpp"
#include "IPrinterAgent.hpp"
#include "Widgets/Button.hpp"
#include "Widgets/CheckBox.hpp"
#include "Widgets/Label.hpp"
#include "GUI_App.hpp"
#include "GUI.hpp"
#include "DeviceManager.hpp"
#include "DeviceCore/DevConfigUtil.h"
#include "libslic3r_version.h"
#include "slic3r/Utils/NetworkAgent.hpp"
#include "slic3r/Utils/NetworkAgentFactory.hpp"
#include "libslic3r/AppConfig.hpp"
#include "I18N.hpp"
#include "MsgDialog.hpp"
#include "DownloadProgressDialog.hpp"
#include "slic3r/Utils/BBLNetworkPlugin.hpp"
#include <algorithm>
#include <boost/chrono/duration.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/filesystem/file_status.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/cstdio.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/nowide/utf8_codecvt.hpp>
#include <map>
#include "libslic3r/Utils.hpp"
#include "libslic3r/Thread.hpp"
#include <cstring>
#include <boost/thread/lock_types.hpp>
#include <memory>
#include <cstddef>
#include <cstdlib>
#include <cstdio>
#include <exception>
#include <string>
#include "slic3r/GUI/wxMediaCtrl3.h"
#include <wx/gdicmn.h>
#include <wx/event.h>
#include <wx/colour.h>
#include <wx/dataobj.h>
#include <wx/image.h>
#include <wx/datetime.h>
#include <vector>
#include <utility>
#include "slic3r/GUI/Jobs/UpgradeNetworkJob.hpp"
#include <wx/mediactrl.h>
#include <wx/panel.h>
#include <wx/utils.h>
#include <wx/uri.h>
#include <slic3r/Utils/BoostProcessCompat.hpp>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <wx/clipbrd.h>
#include "wx/evtloop.h"
#include <boost/nowide/convert.hpp>

Go to the source code of this file.

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/
namespace  Slic3r::GUI

Functions

wxString Slic3r::GUI::hide_id_middle_string (wxString const &str, size_t offset=0, size_t length=-1)
wxString Slic3r::GUI::hide_passwd (wxString url, std::vector< wxString > const &passwords)
void Slic3r::GUI::refresh_agora_url (char const *device, char const *dev_ver, char const *channel, void *context, void(*callback)(void *context, char const *url))
void Slic3r::GUI::start_ping_test ()
void wxMediaCtrl_OnSize (wxWindow *ctrl, wxSize const &videoSize, int width, int height)

Variables

static std::map< int, std::string > error_messages

Function Documentation

◆ wxMediaCtrl_OnSize()

void wxMediaCtrl_OnSize ( wxWindow * ctrl,
wxSize const & videoSize,
int width,
int height )
1116{
1117 wxSize size = videoSize;
1118 if (!size.IsFullySpecified()) size = {16, 9};
1119 int maxHeight = (width * size.GetHeight() + size.GetHeight() - 1) / size.GetWidth();
1120 if (maxHeight != ctrl->GetMaxHeight()) {
1121 // BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl_OnSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight;
1122 ctrl->SetMaxSize({-1, maxHeight});
1123 ctrl->CallAfter([ctrl] {
1124 if (auto p = ctrl->GetParent()) {
1125 p->Layout();
1126 p->Refresh();
1127 }
1128 });
1129 }
1130}
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184

Referenced by wxMediaCtrl3::DoSetSize().

Here is the caller graph for this function:

Variable Documentation

◆ error_messages

std::map<int, std::string> error_messages
static
Initial value:
= {
{1, L("The device cannot handle more conversations. Please retry later.")},
{2, L("Player is malfunctioning. Please reinstall the system player.")},
{100, L("The player is not loaded; please click the \"play\" button to retry.")},
{101, L("The player is not loaded; please click the \"play\" button to retry.")},
{102, L("The player is not loaded; please click the \"play\" button to retry.")},
{103, L("The player is not loaded; please click the \"play\" button to retry.")},
{104, L("The player is not loaded because the GStreamer GTK video sink is missing or failed to initialize.")}
}
#define L(s)
Definition ExtrusionEntity.cpp:25
74 {
75 {1, L("The device cannot handle more conversations. Please retry later.")},
76 {2, L("Player is malfunctioning. Please reinstall the system player.")},
77 {100, L("The player is not loaded; please click the \"play\" button to retry.")},
78 {101, L("The player is not loaded; please click the \"play\" button to retry.")},
79 {102, L("The player is not loaded; please click the \"play\" button to retry.")},
80 {103, L("The player is not loaded; please click the \"play\" button to retry.")},
81 {104, L("The player is not loaded because the GStreamer GTK video sink is missing or failed to initialize.")}
82};

Referenced by PrinterFileSystem::FetchModel(), and PrinterFileSystem::SendChangedEvent().