]> git.sesse.net Git - nageru/blobdiff - nageru/glwidget.cpp
Move texture uploading out of a lambda.
[nageru] / nageru / glwidget.cpp
index d3e1d560d015016a0242c44b234b816e1c79774c..62aeebc9cc14a0a7de7ca47a2be03076d1d79537 100644 (file)
@@ -174,7 +174,7 @@ void GLWidget::show_context_menu(const QPoint &pos)
                show_live_context_menu(pos);
        }
        if (output >= Mixer::OUTPUT_INPUT0) {
-               int signal_num = global_mixer->get_channel_signal(output);
+               int signal_num = global_mixer->map_channel_to_signal(output);
                if (signal_num != -1) {
                        show_preview_context_menu(signal_num, pos);
                }
@@ -228,10 +228,10 @@ void GLWidget::show_preview_context_menu(unsigned signal_num, const QPoint &pos)
        QActionGroup mode_group(&mode_submenu);
 
        unsigned num_cards = global_mixer->get_num_cards();
-       unsigned current_card = global_mixer->map_signal(signal_num);
+       unsigned current_card = global_mixer->map_signal_to_card(signal_num);
        bool is_ffmpeg = global_mixer->card_is_ffmpeg(current_card);
 
-       if (!is_ffmpeg) {  // FFmpeg inputs are not connected to any card; they're locked to a given input and have a given Y'CbCr interpretatio and have a given Y'CbCr interpretationn.
+       if (!is_ffmpeg) {  // FFmpeg inputs are not connected to any card; they're locked to a given input and have a given Y'CbCr interpretatio and have a given Y'CbCr interpretation.
                for (unsigned card_index = 0; card_index < num_cards; ++card_index) {
                        QString description(QString::fromStdString(global_mixer->get_card_description(card_index)));
                        QAction *action = new QAction(description, &card_group);
@@ -292,10 +292,8 @@ void GLWidget::show_preview_context_menu(unsigned signal_num, const QPoint &pos)
        if (is_ffmpeg) {
                // Add a menu to change the source URL if we're an FFmpeg card.
                // (The theme can still override.)
-               if (global_mixer->card_is_ffmpeg(current_card)) {
-                       change_url_action = new QAction("Change source filename/URL…", &menu);
-                       menu.addAction(change_url_action);
-               }
+               change_url_action = new QAction("Change source filename/URL…", &menu);
+               menu.addAction(change_url_action);
        } else {
                // Add a submenu for selecting video input, with an action for each input.
                std::map<uint32_t, string> video_inputs = global_mixer->get_available_video_inputs(current_card);