Q解码器 "GStreamer; Unable to start decoding process"
QAudioDecoder "GStreamer; Unable to start decoding process"
我得到以下错误
GStreamer; Unable to start decoding process
当我尝试启动QAudioDecoder
时,在控制台中。
以下代码:
void Media::decode(Memo* memo){
decoder = new QAudioDecoder();
format.setSampleRate(48000);
format.setChannelCount(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setSampleType(QAudioFormat::UnSignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
decoder->setAudioFormat(format);
decoder->setSourceFilename(memo->getPathMedia());
connect(decoder, SIGNAL(bufferReady()), this, SLOT(readBuffer()));
decoder->start();
}
void Media::readBuffer(){
buffer = decoder->read();
}
我希望你能帮助我。
正如@nayana所建议的,我使用GST_DEBUG=3
启用了GStreamer调试日志,结果显示源文件名设置不正确:
filesrc gstfilesrc.c:632:gst_file_src_uri_set_uri:<source> Invalid URI 'file:file:///home/rom1/Music/track01.mp3'
只要去掉file:
前缀就可以了。
// In my source file ...
QString source = qvariant_cast<QString>(audioPlayer->property("source"));
source.remove(0, 7);
qDebug() << "Loading media" << source;
decoder.setSourceFilename(source);
decoder.start();
相关文章:
- 在Google Kick start中提交时出错
- "Unable to start debugging. No process is associated with this object." - 在Visual Studio Code中使用GDB
- C++生成文件错误"implicit entry/start for main executable"
- Valgrind 在 QThread::start() 上报告内存泄漏
- 为什么我不能调用 QMetaObject::invokeMethod(&threadObj, &QThread::start, Qt::QueuedConnection)?
- 如何将IEnumerable与Process.Start的输出事件处理程序一起使用?
- QThread start() return value
- 在Qt中获取输出:'QProcess::start()'和'QProcess:readAllStandardOutPut()'
- Android CMake "致命错误: 'bits/libc-header-start.h' 文件未找到"
- 仅在一台计算机上出现"0xc000007b Application Unable to Start Correctly"错误
- QCamera::start给出神秘的"failed to start"日志消息
- 如何设置Visual Studio来调试DLL ("Unable to start program error")
- 一个粒子太多:GL_INVALID_VALUE生成错误。<start> 不满足着色器存储缓冲区的最低对齐要求
- 解析器名称定义为默认值:%start 后"parse"警告野牛
- 将类方法作为 pthread start 函数传递
- 等待多个线程启动,start() 未捕获
- 为什么"Start Debugging"比VC2010中的"attach to process"慢得多?
- 给定 myvector.start() 和 myvector.end(),我想在不复制数据的情况下创建 myvector
- C# DLL 导入失败:"The application has failed to start because its side-by-side configuration is incorrect
- Q解码器 "GStreamer; Unable to start decoding process"