Open 287662354 opened 11 months ago
i dont know y there is Memory leak,at start i limited decode times, but always ` connect(main_videoSink, &QVideoSink::videoFrameChanged, [this](const QVideoFrame &frame){
if(QR_image_flag) { QR_image = frame.toImage(); QZXing decoder ; //必要设置 // decoder.setDecoder(QZXing::DecoderFormat_QR_CODE | QZXing::DecoderFormat_EAN_13 ); decoder.setDecoder(QZXing::DecoderFormat_QR_CODE ); //可选设置 //decoder.setSourceFilterType(QZXing::SourceFilter_ImageNormal | QZXing::SourceFilter_ImageInverted); decoder.setSourceFilterType(QZXing::SourceFilter_ImageNormal); decoder.setTryHarderBehaviour(QZXing::TryHarderBehaviour_ThoroughScanning | QZXing::TryHarderBehaviour_Rotate); // QR_image = QR_image.convertToFormat(QImage::Format_Indexed8); //解码 QString result; result = decoder.decodeImage(frame.toImage()); // qDebug()<<"解码内容是"<<result; // scene->addPixmap(QPixmap::fromImage(frame.toImage().scaled(QSize(90, 130)))); // g_tmp->setScene(scene); // QR_image_flag=0; if(!result.isEmpty()) {
// player->setAudioOutput(audioOutput ); // audioOutput->setVolume(0.5); //调节音频音量 // player->setSource(QUrl("qrc:/image/qrcode.mp3")); // player->play(); qDebug()<<"播放";
// emit QR_scan_end(); // return; } }`
i dont know y there is Memory leak,at start i limited decode times, but always ` connect(main_videoSink, &QVideoSink::videoFrameChanged, [this](const QVideoFrame &frame){
// player->setAudioOutput(audioOutput ); // audioOutput->setVolume(0.5); //调节音频音量 // player->setSource(QUrl("qrc:/image/qrcode.mp3")); // player->play(); qDebug()<<"播放";