mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
pictureviewer: add support for g_settings.lcd4l_logodir to GetLogoName() function
Origin commit data
------------------
Commit: f9cd35290a
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-12-18 (Tue, 18 Dec 2018)
Origin message was:
------------------
- pictureviewer: add support for g_settings.lcd4l_logodir to GetLogoName() function
This commit is contained in:
@@ -529,10 +529,11 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &ChannelName, std::string &name, int *width, int *height)
|
bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &ChannelName, std::string &name, int *width, int *height, bool lcd4l_mode)
|
||||||
{
|
{
|
||||||
std::string fileType[] = { ".png", ".jpg", ".gif" };
|
std::string fileType[] = { ".png", ".jpg", ".gif" };
|
||||||
std::vector<std::string> v_path;
|
std::vector<std::string> v_path;
|
||||||
|
std::vector<std::string> v_file;
|
||||||
|
|
||||||
// create eventname for eventlogos; Note: We don't process channellogos if any eventlogo was found.
|
// create eventname for eventlogos; Note: We don't process channellogos if any eventlogo was found.
|
||||||
std::string EventName = "";
|
std::string EventName = "";
|
||||||
@@ -560,6 +561,8 @@ bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &C
|
|||||||
//printf("GetLogoName(): EventName \"%s\"\n", EventName.c_str());
|
//printf("GetLogoName(): EventName \"%s\"\n", EventName.c_str());
|
||||||
|
|
||||||
v_path.clear();
|
v_path.clear();
|
||||||
|
if (lcd4l_mode)
|
||||||
|
v_path.push_back(g_settings.lcd4l_logodir);
|
||||||
v_path.push_back(g_settings.logo_hdd_dir);
|
v_path.push_back(g_settings.logo_hdd_dir);
|
||||||
if (g_settings.logo_hdd_dir != LOGODIR_VAR)
|
if (g_settings.logo_hdd_dir != LOGODIR_VAR)
|
||||||
v_path.push_back(LOGODIR_VAR);
|
v_path.push_back(LOGODIR_VAR);
|
||||||
@@ -635,6 +638,21 @@ bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &C
|
|||||||
v_path.clear();
|
v_path.clear();
|
||||||
std::string id_tmp_path;
|
std::string id_tmp_path;
|
||||||
|
|
||||||
|
if (lcd4l_mode)
|
||||||
|
{
|
||||||
|
v_file.clear();
|
||||||
|
v_file.push_back(ChannelName);
|
||||||
|
v_file.push_back(SpecialChannelName);
|
||||||
|
v_file.push_back(strChnId);
|
||||||
|
if (e2filename1[0] != '\0')
|
||||||
|
v_file.push_back(std::string(e2filename1));
|
||||||
|
if (e2filename2[0] != '\0')
|
||||||
|
v_file.push_back(std::string(e2filename2));
|
||||||
|
|
||||||
|
for (size_t f = 0; f < v_file.size(); f++)
|
||||||
|
v_path.push_back(g_settings.lcd4l_logodir + "/" + v_file[f] + fileType[i]);
|
||||||
|
}
|
||||||
|
|
||||||
//create filename with channel name (logo_hdd_dir)
|
//create filename with channel name (logo_hdd_dir)
|
||||||
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
||||||
id_tmp_path += ChannelName + fileType[i];
|
id_tmp_path += ChannelName + fileType[i];
|
||||||
|
@@ -67,7 +67,7 @@ class CPictureViewer
|
|||||||
static double m_aspect_ratio_correction;
|
static double m_aspect_ratio_correction;
|
||||||
bool DisplayImage (const std::string & name, int posx, int posy, int width, int height, int transp=0 /*CFrameBuffer::TM_EMPTY*/);
|
bool DisplayImage (const std::string & name, int posx, int posy, int width, int height, int transp=0 /*CFrameBuffer::TM_EMPTY*/);
|
||||||
// bool DisplayLogo (uint64_t channel_id, int posx, int posy, int width, int height);
|
// bool DisplayLogo (uint64_t channel_id, int posx, int posy, int width, int height);
|
||||||
bool GetLogoName(const uint64_t &ChannelID, const std::string &ChannelName, std::string &name, int *width = NULL, int *height = NULL);
|
bool GetLogoName(const uint64_t &ChannelID, const std::string &ChannelName, std::string &name, int *width = NULL, int *height = NULL, bool lcd4l_mode = false);
|
||||||
fb_pixel_t * getImage (const std::string & name, int width, int height);
|
fb_pixel_t * getImage (const std::string & name, int width, int height);
|
||||||
fb_pixel_t * getIcon (const std::string & name, int *width, int *height);
|
fb_pixel_t * getIcon (const std::string & name, int *width, int *height);
|
||||||
void getSize(const char *name, int* width, int *height);
|
void getSize(const char *name, int* width, int *height);
|
||||||
|
Reference in New Issue
Block a user