mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
修复编译问题
This commit is contained in:
@@ -59,7 +59,7 @@ static bool is_local_ip(const string &ip){
|
||||
return false;
|
||||
}
|
||||
|
||||
void FFmpegSource::setupRecord(bool enable_hls, bool enable_mp4){
|
||||
void FFmpegSource::setupRecordFlag(bool enable_hls, bool enable_mp4){
|
||||
_enable_hls = enable_hls;
|
||||
_enable_mp4 = enable_mp4;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void FFmpegSource::findAsync(int maxWaitMS, const function<void(const MediaSourc
|
||||
NoticeCenter::Instance().delListener(listener_tag,Broadcast::kBroadcastMediaChanged);
|
||||
|
||||
//切换到自己的线程再回复
|
||||
strongSelf->_poller->async([listener_tag,weakSelf,cb](){
|
||||
strongSelf->_poller->async([weakSelf,cb](){
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if(!strongSelf) {
|
||||
return;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
* @param enable_hls 是否开启hls直播或录制
|
||||
* @param enable_mp4 是否录制mp4
|
||||
*/
|
||||
void setupRecord(bool enable_hls, bool enable_mp4);
|
||||
void setupRecordFlag(bool enable_hls, bool enable_mp4);
|
||||
|
||||
private:
|
||||
void findAsync(int maxWaitMS ,const function<void(const MediaSource::Ptr &src)> &cb);
|
||||
|
||||
@@ -51,11 +51,6 @@ string System::execute(const string &cmd) {
|
||||
}
|
||||
|
||||
#if !defined(ANDROID) && !defined(_WIN32)
|
||||
static string addr2line(const string &address) {
|
||||
string cmd = StrPrinter << "addr2line -C -f -e " << exePath() << " " << address;
|
||||
return System::execute(cmd);
|
||||
}
|
||||
|
||||
static void sig_crash(int sig) {
|
||||
signal(sig, SIG_DFL);
|
||||
void *array[MAX_STACK_FRAMES];
|
||||
@@ -68,6 +63,10 @@ static void sig_crash(int sig) {
|
||||
std::string symbol(strings[i]);
|
||||
ref.emplace_back(symbol);
|
||||
#if defined(__linux) || defined(__linux__)
|
||||
static auto addr2line = [](const string &address) {
|
||||
string cmd = StrPrinter << "addr2line -C -f -e " << exePath() << " " << address;
|
||||
return System::execute(cmd);
|
||||
};
|
||||
size_t pos1 = symbol.find_first_of("[");
|
||||
size_t pos2 = symbol.find_last_of("]");
|
||||
std::string address = symbol.substr(pos1 + 1, pos2 - pos1 - 1);
|
||||
|
||||
@@ -683,7 +683,7 @@ void installWebApi() {
|
||||
lock_guard<decltype(s_ffmpegMapMtx)> lck(s_ffmpegMapMtx);
|
||||
s_ffmpegMap.erase(key);
|
||||
});
|
||||
ffmpeg->setupRecord(enable_hls, enable_mp4);
|
||||
ffmpeg->setupRecordFlag(enable_hls, enable_mp4);
|
||||
ffmpeg->play(src_url, dst_url, timeout_ms, [cb, key](const SockException &ex) {
|
||||
if (ex) {
|
||||
lock_guard<decltype(s_ffmpegMapMtx)> lck(s_ffmpegMapMtx);
|
||||
|
||||
Reference in New Issue
Block a user