forked from Green-Sky/tomato
toxav incomming audio src and fix sdl audio output sink
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "./stream_manager_ui.hpp"
|
||||
|
||||
#include "./content/sdl_video_frame_stream2.hpp"
|
||||
#include "./content/audio_stream.hpp"
|
||||
|
||||
#include <solanaceae/object_store/object_store.hpp>
|
||||
|
||||
@ -58,6 +59,31 @@ void StreamManagerUI::render(void) {
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("connect audio", ss.frame_type_name == entt::type_name<AudioFrame>::value())) {
|
||||
for (const auto& [oc_src, s_src] : _os.registry().view<Components::StreamSource>().each()) {
|
||||
if (s_src.frame_type_name != ss.frame_type_name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ImGui::PushID(entt::to_integral(oc_src));
|
||||
|
||||
std::string source_label {"src "};
|
||||
source_label += std::to_string(entt::to_integral(entt::to_entity(oc_src)));
|
||||
source_label += " (";
|
||||
source_label += s_src.name;
|
||||
source_label += ")[";
|
||||
source_label += s_src.frame_type_name;
|
||||
source_label += "]";
|
||||
if (ImGui::MenuItem(source_label.c_str())) {
|
||||
_sm.connect<AudioFrame>(oc_src, oc);
|
||||
}
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
ImGui::PopID();
|
||||
|
Reference in New Issue
Block a user