mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
use afc2 or hause_arrest in mediapreviewdialog
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user