mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
Merge branch 'multi-stream' of https://github.com/kunkundi/crossdesk into multi-stream
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "config_center.h"
|
||||
@@ -269,7 +270,8 @@ class Render {
|
||||
std::unique_ptr<Thumbnail> thumbnail_;
|
||||
|
||||
// recent connections
|
||||
std::map<std::string, Thumbnail::RecentConnection> recent_connections_;
|
||||
std::unordered_map<std::string, Thumbnail::RecentConnection>
|
||||
recent_connections_;
|
||||
int recent_connection_image_width_ = 160;
|
||||
int recent_connection_image_height_ = 90;
|
||||
uint32_t recent_connection_image_save_time_ = 0;
|
||||
|
||||
@@ -186,8 +186,8 @@ int Thumbnail::SaveToThumbnail(const char* yuv420p, int width, int height,
|
||||
|
||||
int Thumbnail::LoadThumbnail(
|
||||
SDL_Renderer* renderer,
|
||||
std::map<std::string, RecentConnection>& recent_connections, int* width,
|
||||
int* height) {
|
||||
std::unordered_map<std::string, RecentConnection>& recent_connections,
|
||||
int* width, int* height) {
|
||||
for (auto& it : recent_connections) {
|
||||
if (it.second.texture != nullptr) {
|
||||
SDL_DestroyTexture(it.second.texture);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <filesystem>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
class Thumbnail {
|
||||
@@ -34,8 +35,9 @@ class Thumbnail {
|
||||
const std::string& host_name,
|
||||
const std::string& password);
|
||||
|
||||
int LoadThumbnail(SDL_Renderer* renderer,
|
||||
std::map<std::string, RecentConnection>& recent_connections,
|
||||
int LoadThumbnail(
|
||||
SDL_Renderer* renderer,
|
||||
std::unordered_map<std::string, RecentConnection>& recent_connections,
|
||||
int* width, int* height);
|
||||
|
||||
int DeleteThumbnail(const std::string& filename_keyword);
|
||||
|
||||
Reference in New Issue
Block a user