build: When FFmpeg and x264 are not enabled, VideoStack is not compiled
This commit is contained in:
parent
4ec31dbfd7
commit
f0e3cb300d
|
|
@ -1,3 +1,4 @@
|
|||
#if defined(ENABLE_X264) && defined(ENABLE_FFMPEG)
|
||||
#include "VideoStack.h"
|
||||
#include "Codec/Transcode.h"
|
||||
#include "Common/Device.h"
|
||||
|
|
@ -231,7 +232,8 @@ void StackPlayer::rePlay(const std::string& url)
|
|||
_failedCount++;
|
||||
auto delay = MAX(2 * 1000, MIN(_failedCount * 3 * 1000, 60 * 1000)); //步进延迟 重试间隔
|
||||
std::weak_ptr<StackPlayer> weakSelf = shared_from_this();
|
||||
_timer = std::make_shared<toolkit::Timer>(delay / 1000.0f, [weakSelf, url]() {
|
||||
_timer = std::make_shared<toolkit::Timer>(
|
||||
delay / 1000.0f, [weakSelf, url]() {
|
||||
auto self = weakSelf.lock();
|
||||
if (!self) {
|
||||
}
|
||||
|
|
@ -585,3 +587,4 @@ StackPlayer::Ptr VideoStackManager::createPlayer(const std::string& id)
|
|||
|
||||
return player;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#if defined(ENABLE_X264) && defined(ENABLE_FFMPEG)
|
||||
#include "Codec/Transcode.h"
|
||||
#include "Common/Device.h"
|
||||
#include "Player/MediaPlayer.h"
|
||||
|
|
@ -203,3 +204,4 @@ class VideoStackManager {
|
|||
|
||||
std::unordered_map<std::string, RefWrapper<StackPlayer::Ptr>::Ptr> _playerMap;
|
||||
};
|
||||
#endif
|
||||
Loading…
Reference in New Issue