mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-10-23 22:29:13 +02:00
convert network sink to new stream system
This commit is contained in:
@@ -17,6 +17,8 @@ namespace streamsmenu {
|
||||
std::map<std::string, int> selectedSinkTypeId;
|
||||
std::map<std::string, int> addSinkTypeId;
|
||||
|
||||
int addType = 0;
|
||||
|
||||
void updateSinkTypeList(const std::string& removed = "") {
|
||||
std::lock_guard<std::recursive_mutex> lck1(sinkTypesMtx);
|
||||
auto lck2 = sigpath::streamManager.getSinkTypesLock();
|
||||
@@ -32,6 +34,9 @@ namespace streamsmenu {
|
||||
// Update the list
|
||||
updateSinkTypeList();
|
||||
|
||||
// Update the ID of the Add dropdown
|
||||
// TODO
|
||||
|
||||
// Update the selected ID of each drop down
|
||||
// TODO
|
||||
}
|
||||
@@ -40,6 +45,9 @@ namespace streamsmenu {
|
||||
// Update the list
|
||||
updateSinkTypeList(type);
|
||||
|
||||
// Update the ID of the Add dropdown
|
||||
// TODO
|
||||
|
||||
// Update the selected ID of each drop down
|
||||
// TODO
|
||||
}
|
||||
@@ -137,18 +145,16 @@ namespace streamsmenu {
|
||||
float tableWidth = ImGui::GetContentRegionAvail().x;
|
||||
|
||||
ImGui::Spacing();
|
||||
int ssds = 0;
|
||||
int startCur = ImGui::GetCursorPosX();
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lck(sinkTypesMtx);
|
||||
ImGui::Combo(CONCAT("##sdrpp_streams_add_type_", name), &ssds, sinkTypes.txt);
|
||||
ImGui::Combo(CONCAT("##sdrpp_streams_add_type_", name), &addType, sinkTypes.txt);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(CONCAT("Add##sdrpp_streams_add_btn_", name), ImVec2(tableWidth - (ImGui::GetCursorPosX() - startCur), 0))) {
|
||||
stream->addSink(sinkTypes.value(addType));
|
||||
}
|
||||
ImGui::Spacing();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(CONCAT("Add##sdrpp_streams_add_btn_", name), ImVec2(tableWidth - (ImGui::GetCursorPosX() - startCur), 0))) {
|
||||
stream->addSink("Audio");
|
||||
}
|
||||
ImGui::Spacing();
|
||||
|
||||
ImGui::EndTable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user