Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106885

On Ubuntu 22.04 the microphone device is captured before recording starts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.2.4
    • Multimedia
    • None
    • Linux/Wayland

    Description

      On Ubuntu 22.04 the microphone device is captured before recording starts

       

      There is a simple widget based project created in Qt Creator.

      Here is the mainwindow.cpp code:

       #include "mainwindow.h"
      #include "./ui_mainwindow.h"
      
      #include <QMediaCaptureSession>
      #include <QAudioInput>
      
      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
          , ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
      
          auto captureSesstion = new QMediaCaptureSession;
      
          // After this line, a microphone usage indicator will appear
          captureSesstion->setAudioInput(new QAudioInput(this));
      }
      
      MainWindow::~MainWindow()
      {
          delete ui;
      }
      
      

      On the specified system, the microphone use icon appears in the taskbar after executing the line:

      captureSesstion->setAudioInput(new QAudioInput(this)); 

      Although the recording was not started.

      I am attaching a video showing this behavior.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              piotr Piotr Srebrny (Inactive)
              rumgot rumgot
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes