mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
fix(media): add option to use Afc2 backend for stream URL requests
This commit is contained in:
@@ -31,12 +31,15 @@ MediaStreamerManager *MediaStreamerManager::sharedInstance()
|
||||
|
||||
QUrl MediaStreamerManager::getStreamUrl(
|
||||
const std::shared_ptr<iDescriptorDevice> device,
|
||||
std::optional<std::shared_ptr<CXX::HauseArrest>> hause_arrest,
|
||||
std::optional<std::shared_ptr<CXX::HauseArrest>> hause_arrest, bool useAfc2,
|
||||
const QString &filePath)
|
||||
{
|
||||
QString rustUrl;
|
||||
|
||||
if (hause_arrest.has_value() && hause_arrest.value()) {
|
||||
if (useAfc2) {
|
||||
qDebug() << "Requesting stream URL using Afc2Backend for:" << filePath;
|
||||
rustUrl = device->afc2_backend->start_video_stream(filePath);
|
||||
} else if (hause_arrest.has_value() && hause_arrest.value()) {
|
||||
qDebug() << "Requesting stream URL using HauseArrest for:" << filePath;
|
||||
rustUrl = hause_arrest.value()->start_video_stream(filePath);
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
QUrl
|
||||
getStreamUrl(const std::shared_ptr<iDescriptorDevice> device,
|
||||
std::optional<std::shared_ptr<CXX::HauseArrest>> hause_arrest,
|
||||
const QString &filePath);
|
||||
bool useAfc2, const QString &filePath);
|
||||
|
||||
void releaseStreamer(const QString &filePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user