use afc2 or hause_arrest in mediapreviewdialog

This commit is contained in:
uncor3
2026-04-04 10:41:27 +00:00
parent cc1d6be3e5
commit f06c4487ed
2 changed files with 6 additions and 4 deletions
+4 -4
View File
@@ -26,11 +26,11 @@
MediaPreviewDialog::MediaPreviewDialog(
const std::shared_ptr<iDescriptorDevice> device, const QString &filePath,
std::optional<std::shared_ptr<CXX::HauseArrest>> hause_arrest,
std::optional<std::shared_ptr<CXX::HauseArrest>> 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
+2
View File
@@ -57,6 +57,7 @@ public:
const QString &filePath,
std::optional<std::shared_ptr<CXX::HauseArrest>>
hause_arrest = std::nullopt,
bool useAfc2 = false,
QWidget *parent = nullptr);
~MediaPreviewDialog();
@@ -104,6 +105,7 @@ private:
// Core data
std::shared_ptr<iDescriptorDevice> m_device;
std::optional<std::shared_ptr<CXX::HauseArrest>> m_hause_arrest;
bool m_useAfc2;
QString m_filePath;
bool m_isVideo;