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

[Windows] MediaRecorder is not functional for local file output locations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.3.0 Alpha, 6.2
    • 6.2.1
    • Multimedia
    • None
    • Windows 10, MSVC 2019
    • 1cf6905c15c6a6b3e45219d39933f6abff1a2a51 (qt/qtmultimedia/dev) d8c680bdbebd532a8ccd91d7ffb9b524c8fbd0e0 (qt/qtmultimedia/6.2)

    Description

      MediaRecorder is not functional on Windows if local file path is used as output location.

      e.g. (slightly modified example from official docs)

       QMediaCaptureSession session;
       QAudioInput audioInput;
       session.setAudioInput(&input);
       QMediaRecorder recorder;
       session.setMediaRecorder(&recorder);
       recorder.setQuality(QMediaRecorder::HighQuality);
       recorder.setOutputLocation(QUrl::fromLocalFile("c:\\test.mp3"));
       recorder.record();
      

      Take a look on QWindowsMediaEncoder::record() implementation:

      as result the path becomes invalid (for example above - "/c:/test.mp3") and it fails further in QWindowsMediaDeviceReader::startRecording() with error

      hr = HRESULT_FROM_WIN32(ERROR_INVALID_NAME) : The filename, directory name, or volume label syntax is incorrect.
      

      Attachments

        For Gerrit Dashboard: QTBUG-97832
        # Subject Branch Project Status CR V

        Activity

          People

            piotr Piotr Srebrny (Inactive)
            studiosus Vladimir Belyavsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes