mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25: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 <mutex>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "IconsFontAwesome6.h"
|
#include "IconsFontAwesome6.h"
|
||||||
#include "config_center.h"
|
#include "config_center.h"
|
||||||
@@ -269,7 +270,8 @@ class Render {
|
|||||||
std::unique_ptr<Thumbnail> thumbnail_;
|
std::unique_ptr<Thumbnail> thumbnail_;
|
||||||
|
|
||||||
// recent connections
|
// 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_width_ = 160;
|
||||||
int recent_connection_image_height_ = 90;
|
int recent_connection_image_height_ = 90;
|
||||||
uint32_t recent_connection_image_save_time_ = 0;
|
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(
|
int Thumbnail::LoadThumbnail(
|
||||||
SDL_Renderer* renderer,
|
SDL_Renderer* renderer,
|
||||||
std::map<std::string, RecentConnection>& recent_connections, int* width,
|
std::unordered_map<std::string, RecentConnection>& recent_connections,
|
||||||
int* height) {
|
int* width, int* height) {
|
||||||
for (auto& it : recent_connections) {
|
for (auto& it : recent_connections) {
|
||||||
if (it.second.texture != nullptr) {
|
if (it.second.texture != nullptr) {
|
||||||
SDL_DestroyTexture(it.second.texture);
|
SDL_DestroyTexture(it.second.texture);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class Thumbnail {
|
class Thumbnail {
|
||||||
@@ -34,9 +35,10 @@ class Thumbnail {
|
|||||||
const std::string& host_name,
|
const std::string& host_name,
|
||||||
const std::string& password);
|
const std::string& password);
|
||||||
|
|
||||||
int LoadThumbnail(SDL_Renderer* renderer,
|
int LoadThumbnail(
|
||||||
std::map<std::string, RecentConnection>& recent_connections,
|
SDL_Renderer* renderer,
|
||||||
int* width, int* height);
|
std::unordered_map<std::string, RecentConnection>& recent_connections,
|
||||||
|
int* width, int* height);
|
||||||
|
|
||||||
int DeleteThumbnail(const std::string& filename_keyword);
|
int DeleteThumbnail(const std::string& filename_keyword);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user