Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QT6.5.1 Memory leak with function #245

Open
287662354 opened this issue Oct 20, 2023 · 0 comments
Open

QT6.5.1 Memory leak with function #245

287662354 opened this issue Oct 20, 2023 · 0 comments

Comments

@287662354
Copy link

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;
        }
  }`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant