Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.1
-
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 |
379569,2 | Generete correct local file name from input QUrl | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
379743,2 | Generete correct local file name from input QUrl | 6.2 | qt/qtmultimedia | Status: MERGED | +2 | 0 |