From f06c4487ed506e1639a1afe0ce5303efff58b0ae Mon Sep 17 00:00:00 2001 From: uncor3 Date: Sat, 4 Apr 2026 10:41:27 +0000 Subject: [PATCH] use afc2 or hause_arrest in mediapreviewdialog --- src/mediapreviewdialog.cpp | 8 ++++---- src/mediapreviewdialog.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mediapreviewdialog.cpp b/src/mediapreviewdialog.cpp index 27150ab..3cab160 100644 --- a/src/mediapreviewdialog.cpp +++ b/src/mediapreviewdialog.cpp @@ -26,11 +26,11 @@ MediaPreviewDialog::MediaPreviewDialog( const std::shared_ptr device, const QString &filePath, - std::optional> hause_arrest, + std::optional> hause_arrest, bool useAfc2, QWidget *parent) : QDialog(parent), m_device(device), m_filePath(filePath), m_isVideo(iDescriptor::Utils::isVideoFile(filePath)), - m_hause_arrest(hause_arrest) + m_hause_arrest(hause_arrest), m_useAfc2(useAfc2) { setWindowTitle(QFileInfo(filePath).fileName() + " - iDescriptor"); #ifdef WIN32 @@ -178,7 +178,7 @@ void MediaPreviewDialog::loadImage() // 99999 is so that it gets the highest priority in the queue unsigned int priority = 99999; ImageLoader::sharedInstance().requestImageWithCallback( - m_device, m_filePath, priority, callback, m_hause_arrest); + m_device, m_filePath, priority, callback, m_hause_arrest, m_useAfc2); } void MediaPreviewDialog::loadVideo() @@ -187,7 +187,7 @@ void MediaPreviewDialog::loadVideo() // Get streamer URL from the singleton manager QUrl streamUrl = MediaStreamerManager::sharedInstance()->getStreamUrl( - m_device, m_hause_arrest, m_filePath); + m_device, m_hause_arrest, m_useAfc2, m_filePath); qDebug() << "Streaming video from URL:" << streamUrl; if (streamUrl.isEmpty()) { // TODO: connect to retry signal to attempt restarting the stream diff --git a/src/mediapreviewdialog.h b/src/mediapreviewdialog.h index 6d1bf35..72ccc38 100644 --- a/src/mediapreviewdialog.h +++ b/src/mediapreviewdialog.h @@ -57,6 +57,7 @@ public: const QString &filePath, std::optional> hause_arrest = std::nullopt, + bool useAfc2 = false, QWidget *parent = nullptr); ~MediaPreviewDialog(); @@ -104,6 +105,7 @@ private: // Core data std::shared_ptr m_device; std::optional> m_hause_arrest; + bool m_useAfc2; QString m_filePath; bool m_isVideo;