-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request xbmc#25360 from thexai/queue-settings
[VideoPlayer] Add GUI settings for audio/video playback queues
- Loading branch information
Showing
14 changed files
with
188 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (C) 2024 Team Kodi | ||
* This file is part of Kodi - https://kodi.tv | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-or-later | ||
* See LICENSES/README.md for more information. | ||
*/ | ||
|
||
#include "PlayerSettings.h" | ||
|
||
#include "guilib/LocalizeStrings.h" | ||
#include "utils/StringUtils.h" | ||
|
||
void CPlayerSettings::SettingOptionsQueueTimeSizesFiller(const SettingConstPtr& setting, | ||
std::vector<IntegerSettingOption>& list, | ||
int& current, | ||
void* data) | ||
{ | ||
const auto& secFloat = g_localizeStrings.Get(13553); | ||
const auto& seconds = g_localizeStrings.Get(37129); | ||
const auto& second = g_localizeStrings.Get(37128); | ||
|
||
list.emplace_back(StringUtils::Format(secFloat, 0.5), 5); | ||
list.emplace_back(StringUtils::Format(second, 1), 10); | ||
list.emplace_back(StringUtils::Format(seconds, 2), 20); | ||
list.emplace_back(StringUtils::Format(seconds, 4), 40); | ||
list.emplace_back(StringUtils::Format(seconds, 8), 80); | ||
list.emplace_back(StringUtils::Format(seconds, 16), 160); | ||
} | ||
|
||
void CPlayerSettings::SettingOptionsQueueDataSizesFiller(const SettingConstPtr& setting, | ||
std::vector<IntegerSettingOption>& list, | ||
int& current, | ||
void* data) | ||
{ | ||
const auto& mb = g_localizeStrings.Get(37122); | ||
const auto& gb = g_localizeStrings.Get(37123); | ||
|
||
list.emplace_back(StringUtils::Format(mb, 16), 16); | ||
list.emplace_back(StringUtils::Format(mb, 32), 32); | ||
list.emplace_back(StringUtils::Format(mb, 64), 64); | ||
list.emplace_back(StringUtils::Format(mb, 128), 128); | ||
list.emplace_back(StringUtils::Format(mb, 256), 256); | ||
list.emplace_back(StringUtils::Format(mb, 512), 512); | ||
list.emplace_back(StringUtils::Format(gb, 1), 1024); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2024 Team Kodi | ||
* This file is part of Kodi - https://kodi.tv | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-or-later | ||
* See LICENSES/README.md for more information. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "settings/ISubSettings.h" | ||
#include "settings/lib/Setting.h" | ||
|
||
#include <vector> | ||
|
||
class CPlayerSettings : public ISubSettings | ||
{ | ||
public: | ||
static void SettingOptionsQueueTimeSizesFiller(const SettingConstPtr& setting, | ||
std::vector<IntegerSettingOption>& list, | ||
int& current, | ||
void* data); | ||
static void SettingOptionsQueueDataSizesFiller(const SettingConstPtr& setting, | ||
std::vector<IntegerSettingOption>& list, | ||
int& current, | ||
void* data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters