Commit 9eb8ec43 by wangguotao

更新到v2.1.1

parent 063d74b4
objct name changed "deviceOutputPage3"
objct name changed "deviceOutputPage4"
available device "DeckLink 8K Pro (1)"
available device "DeckLink 8K Pro (2)"
"2024-05-16 14:18:31.039" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
available device "DeckLink 8K Pro (3)"
"2024-05-16 14:18:31.059" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
available device "DeckLink 8K Pro (4)"
"2024-05-16 14:18:31.097" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.117" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.137" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.157" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.177" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.197" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.217" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:31.275" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:18:32.299" decklink input fps 50
"2024-05-16 14:18:33.319" decklink input fps 51
"2024-05-16 14:18:33.385" decklink output fps 51 , qsize 0
"2024-05-16 14:18:34.319" decklink input fps 50
"2024-05-16 14:18:34.405" decklink output fps 51 , qsize 0
"2024-05-16 14:18:35.339" decklink input fps 51
"2024-05-16 14:18:35.405" decklink output fps 50 , qsize 0
"2024-05-16 14:18:36.339" decklink input fps 50
"2024-05-16 14:18:36.404" decklink output fps 50 , qsize 0
...@@ -18,8 +18,8 @@ public: ...@@ -18,8 +18,8 @@ public:
static int32_t RecordStoreDuration ; static int32_t RecordStoreDuration ;
static int32_t RecordFlag; static int32_t RecordFlag;
static int32_t OpenOMP ; static int32_t OpenOMP ;
static int32_t TimeoutFrames ; static int32_t TimeoutFrames ; //mask 贴图的超时时间 针对如果未收到算法给的结束帧情况使用
static int32_t SdiOutWaitNums; static int32_t SecondSdiOutWaitNums; //sdi输出的二次确认功能保留贴图开始的前多少帧
static bool HaveBlackDataFlag; static bool HaveBlackDataFlag;
static int32_t DrawFlag; static int32_t DrawFlag;
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
static uint32_t ReplayForward; static uint32_t ReplayForward;
static uint32_t ReplayDeley; static uint32_t ReplayDeley;
static uint32_t SDIOutputWaitNums; static uint32_t RTSDIOutputWaitNums; //实时输出的缓存帧大小 一般5帧
static int32_t CropFlag; static int32_t CropFlag;
static int32_t CropX; static int32_t CropX;
static int32_t CropY; static int32_t CropY;
......
...@@ -423,7 +423,7 @@ void DeckLinkInputPage::ObjectNameChanged(const QString& newName) ...@@ -423,7 +423,7 @@ void DeckLinkInputPage::ObjectNameChanged(const QString& newName)
//connect(Capture.get(), SIGNAL(PushFrame(std::shared_ptr<videoFrameData>)), NDIOutput.get(), SLOT(AddFrame(std::shared_ptr<videoFrameData>))); //connect(Capture.get(), SIGNAL(PushFrame(std::shared_ptr<videoFrameData>)), NDIOutput.get(), SLOT(AddFrame(std::shared_ptr<videoFrameData>)));
connect(Replay.get(), SIGNAL(PushFrame(std::shared_ptr<videoFrameData>)), NDIOutput.get(), SLOT(AddFrame(std::shared_ptr<videoFrameData>)), Qt::DirectConnection); connect(Replay.get(), SIGNAL(PushFrame(std::shared_ptr<videoFrameData>)), NDIOutput.get(), SLOT(AddFrame(std::shared_ptr<videoFrameData>)), Qt::DirectConnection);
connect(Capture.get(), SIGNAL(PushFrameToReplay(std::shared_ptr<videoFrameData>)), Replay.get(), SLOT(addFrame(std::shared_ptr<videoFrameData>))/*, Qt::DirectConnection*/); connect(Capture.get(), SIGNAL(PushFrameToReplay(std::shared_ptr<videoFrameData>)), Replay.get(), SLOT(addFrame(std::shared_ptr<videoFrameData>)), Qt::DirectConnection);
connect(udpServer.get(), SIGNAL(SendMsg(QByteArray)),this, SLOT(RecvMsg(QByteArray))); connect(udpServer.get(), SIGNAL(SendMsg(QByteArray)),this, SLOT(RecvMsg(QByteArray)));
//NDIOutput->moveToThread(Capture.get()); //NDIOutput->moveToThread(Capture.get());
//connect(SelectedDevice.Get(), SIGNAL(ArrivedFrame(ComPtr<IDeckLinkVideoInputFrame>)), NDIOutput.get(), SLOT(AddFrame(ComPtr<IDeckLinkVideoInputFrame>))); //connect(SelectedDevice.Get(), SIGNAL(ArrivedFrame(ComPtr<IDeckLinkVideoInputFrame>)), NDIOutput.get(), SLOT(AddFrame(ComPtr<IDeckLinkVideoInputFrame>)));
......
...@@ -245,13 +245,13 @@ bool DeckLinkOutputDevice::StartPlayback(BMDDisplayMode displayMode, bool enable ...@@ -245,13 +245,13 @@ bool DeckLinkOutputDevice::StartPlayback(BMDDisplayMode displayMode, bool enable
/*scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesFunc, this); /*scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesFunc, this);
scheduleAudioFramesThread = std::thread(&DeckLinkOutputDevice::scheduleAudioFramesFuncDeley, this);*/ scheduleAudioFramesThread = std::thread(&DeckLinkOutputDevice::scheduleAudioFramesFuncDeley, this);*/
if (Settings::SdiOutWaitNums) if (Settings::SecondSdiOutWaitNums)
{ {
scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesWaitFunc, this); scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesWaitFunc, this);
} }
else else
{ {
if(Settings::SDIOutputWaitNums) scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesRealTimeFunc, this); if(Settings::RTSDIOutputWaitNums) scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesRealTimeFunc, this);
else scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesNoDeleyFunc, this); else scheduleVideoFramesThread = std::thread(&DeckLinkOutputDevice::scheduleVideoFramesNoDeleyFunc, this);
} }
...@@ -503,10 +503,10 @@ bool DeckLinkOutputDevice::getReferenceSignalMode(BMDDisplayMode* mode) ...@@ -503,10 +503,10 @@ bool DeckLinkOutputDevice::getReferenceSignalMode(BMDDisplayMode* mode)
while (true) while (true)
{ {
if (state == PlaybackState::Stopping) break; if (state == PlaybackState::Stopping) break;
std::shared_ptr<VideoFrameWithMask> outputFrame; std::shared_ptr<VideoFrameWithMask> outputFrame = nullptr;
std::vector<std::shared_ptr<VideoFrameWithMask>> frames; std::vector<std::shared_ptr<VideoFrameWithMask>> frames;
if (outputMaskVideoFrameQueue.WaitFor(Settings::SdiOutWaitNums)) if (outputMaskVideoFrameQueue.WaitFor(Settings::SecondSdiOutWaitNums))
{ {
outputMaskVideoFrameQueue.Pop(outputFrame); outputMaskVideoFrameQueue.Pop(outputFrame);
outputMaskVideoFrameDeque.Pop(); outputMaskVideoFrameDeque.Pop();
...@@ -839,7 +839,7 @@ bool DeckLinkOutputDevice::getReferenceSignalMode(BMDDisplayMode* mode) ...@@ -839,7 +839,7 @@ bool DeckLinkOutputDevice::getReferenceSignalMode(BMDDisplayMode* mode)
//bool send_zoom_frame_flag = false; //bool send_zoom_frame_flag = false;
std::shared_ptr<VideoFrameWithMask> wait_zoom_frame = nullptr; std::shared_ptr<VideoFrameWithMask> wait_zoom_frame = nullptr;
HRESULT ret = S_OK; HRESULT ret = S_OK;
int wait_size = Settings::SDIOutputWaitNums; int wait_size = Settings::RTSDIOutputWaitNums;
while (true) while (true)
{ {
...@@ -1544,7 +1544,7 @@ void DeckLinkOutputDevice::AddZoomFrame(std::shared_ptr<VideoFrameWithMask> fram ...@@ -1544,7 +1544,7 @@ void DeckLinkOutputDevice::AddZoomFrame(std::shared_ptr<VideoFrameWithMask> fram
{ {
if (frame && (frame->data_ || (frame->pImage && (frame->pImage->data || frame->pImage->uyvy_data)))) if (frame && (frame->data_ || (frame->pImage && (frame->pImage->data || frame->pImage->uyvy_data))))
{ {
if(Settings::SdiOutWaitNums) if(Settings::SecondSdiOutWaitNums)
{ {
auto start_time = frame->start_tm_; auto start_time = frame->start_tm_;
//std::lock_guard<std::mutex> locker(sdi_clear_mutex); //std::lock_guard<std::mutex> locker(sdi_clear_mutex);
...@@ -1572,7 +1572,7 @@ void DeckLinkOutputDevice::AddZoomFrame(std::shared_ptr<VideoFrameWithMask> fram ...@@ -1572,7 +1572,7 @@ void DeckLinkOutputDevice::AddZoomFrame(std::shared_ptr<VideoFrameWithMask> fram
void DeckLinkOutputDevice::AddVideoFrameMask(std::shared_ptr<VideoFrameWithMask> frame) void DeckLinkOutputDevice::AddVideoFrameMask(std::shared_ptr<VideoFrameWithMask> frame)
{ {
//auto t1 = TimeMilliSecond(); //auto t1 = TimeMilliSecond();
if (outputMaskVideoFrameQueue.Size() > (50 * 3 + Settings::SdiOutWaitNums) || output_video_frame_map.Size() > (50 * 3 + Settings::SdiOutWaitNums)) if (outputMaskVideoFrameQueue.Size() > (50 * 3 + Settings::SecondSdiOutWaitNums) || output_video_frame_map.Size() > (50 * 3 + Settings::SecondSdiOutWaitNums))
{ {
if(outputMaskVideoFrameQueue.Size()) outputMaskVideoFrameQueue.Reset(); if(outputMaskVideoFrameQueue.Size()) outputMaskVideoFrameQueue.Reset();
if (output_video_frame_map.Size()) output_video_frame_map.Clear(); if (output_video_frame_map.Size()) output_video_frame_map.Clear();
...@@ -1586,78 +1586,125 @@ void DeckLinkOutputDevice::AddVideoFrameMask(std::shared_ptr<VideoFrameWithMask> ...@@ -1586,78 +1586,125 @@ void DeckLinkOutputDevice::AddVideoFrameMask(std::shared_ptr<VideoFrameWithMask>
//qDebug() << "AddVideoFrameMask:" << "timestamp:" << frame->sequenceNum_ << GetCurrDateTimeStr() << "\n"; //qDebug() << "AddVideoFrameMask:" << "timestamp:" << frame->sequenceNum_ << GetCurrDateTimeStr() << "\n";
} }
if (Settings::SDIOutputWaitNums)
if (frame->fmt_ == bmdFormat8BitYUV)
{ {
if (frame->fmt_ == bmdFormat8BitYUV) if (Settings::SecondSdiOutWaitNums)
{ {
output_video_frame_map.Insert(frame->timestamp_, frame); outputMaskVideoFrameQueue.Push(frame);
outputMaskVideoFrameDeque.PushBack(frame);
} }
else if (frame->fmt_ == bmdFormat8BitBGRA) else
{ {
if (p_dispatch_queue) if(Settings::RTSDIOutputWaitNums) output_video_frame_map.Insert(frame->timestamp_, frame);
{ else outputMaskVideoFrameQueue.Push(frame);
DispatchQueue* dispath = (DispatchQueue*)p_dispatch_queue;
dispath->dispatch(std::bind(&DeckLinkOutputDevice::BGRAToUYVY, this, std::placeholders::_1), frame);
}
} }
} }
else else if (frame->fmt_ == bmdFormat8BitBGRA)
{ {
if (frame->fmt_ == bmdFormat8BitYUV) if (Settings::SecondSdiOutWaitNums)
{ {
outputMaskVideoFrameQueue.Push(frame); if (frame->flag_ == BS_START)
if (Settings::SdiOutWaitNums) outputMaskVideoFrameDeque.PushBack(frame);
}
else if (frame->fmt_ == bmdFormat8BitBGRA)
{
if (Settings::SdiOutWaitNums)
{ {
if (frame->flag_ == BS_START) if (masked_map.find(frame->timestamp_) != masked_map.end())return;
else
{ {
if (masked_map.find(frame->timestamp_) != masked_map.end())return; auto tmp_map = new std::map<qint64, std::shared_ptr<VideoFrameWithMask>>();
else int size = outputMaskVideoFrameDeque.Size();
int nums = (size > Settings::SecondSdiOutWaitNums ? Settings::SecondSdiOutWaitNums : size);
std::vector<std::shared_ptr<VideoFrameWithMask>> tmp_vec;
outputMaskVideoFrameDeque.Put(nums, tmp_vec);
for (auto data : tmp_vec)
{ {
auto tmp_map = new std::map<qint64, std::shared_ptr<VideoFrameWithMask>>();
/*auto tmp_tm = frame->timestamp_ - SdiOutWaitNums;
tmp_tm = (tmp_tm < 0 ? 0 : tmp_tm);*/
int size = outputMaskVideoFrameDeque.Size();
int nums = (size > Settings::SdiOutWaitNums ? Settings::SdiOutWaitNums : size);
std::vector<std::shared_ptr<VideoFrameWithMask>> tmp_vec;
outputMaskVideoFrameDeque.Put(nums, tmp_vec);
for (auto data : tmp_vec)
{
if (data) if (data)
{ {
data->start_tm_ = frame->timestamp_; data->start_tm_ = frame->timestamp_;
tmp_map->insert({ data->timestamp_,data }); tmp_map->insert({ data->timestamp_,data });
}
} }
masked_map.insert({ frame->timestamp_,tmp_map });
} }
masked_map.insert({ frame->timestamp_,tmp_map });
} }
} }
/*while (masked_map.size() > 2)
{
auto itor = masked_map.begin();
if (itor->second)
{
itor->second->clear();
delete itor->second;
}
masked_map.erase(itor->first);
}*/
if (p_dispatch_queue)
{
DispatchQueue* dispath = (DispatchQueue*)p_dispatch_queue;
dispath->dispatch(std::bind(&DeckLinkOutputDevice::BGRAToUYVY, this, std::placeholders::_1), frame);
}
} }
if (p_dispatch_queue)
{
DispatchQueue* dispath = (DispatchQueue*)p_dispatch_queue;
dispath->dispatch(std::bind(&DeckLinkOutputDevice::BGRAToUYVY, this, std::placeholders::_1), frame);
}
} }
//if (Settings::SDIOutputWaitNums)
//{
// if (frame->fmt_ == bmdFormat8BitYUV)
// {
// output_video_frame_map.Insert(frame->timestamp_, frame);
// }
// else if (frame->fmt_ == bmdFormat8BitBGRA)
// {
// if (p_dispatch_queue)
// {
// DispatchQueue* dispath = (DispatchQueue*)p_dispatch_queue;
// dispath->dispatch(std::bind(&DeckLinkOutputDevice::BGRAToUYVY, this, std::placeholders::_1), frame);
// }
// }
//}
//else
//{
// if (frame->fmt_ == bmdFormat8BitYUV)
// {
// outputMaskVideoFrameQueue.Push(frame);
// if (Settings::SdiOutWaitNums) outputMaskVideoFrameDeque.PushBack(frame);
// }
// else if (frame->fmt_ == bmdFormat8BitBGRA)
// {
// if (Settings::SdiOutWaitNums)
// {
// if (frame->flag_ == BS_START)
// {
// if (masked_map.find(frame->timestamp_) != masked_map.end())return;
// else
// {
// auto tmp_map = new std::map<qint64, std::shared_ptr<VideoFrameWithMask>>();
// /*auto tmp_tm = frame->timestamp_ - SdiOutWaitNums;
// tmp_tm = (tmp_tm < 0 ? 0 : tmp_tm);*/
// int size = outputMaskVideoFrameDeque.Size();
// int nums = (size > Settings::SdiOutWaitNums ? Settings::SdiOutWaitNums : size);
// std::vector<std::shared_ptr<VideoFrameWithMask>> tmp_vec;
// outputMaskVideoFrameDeque.Put(nums, tmp_vec);
// for (auto data : tmp_vec)
// {
// if (data)
// {
// data->start_tm_ = frame->timestamp_;
// tmp_map->insert({ data->timestamp_,data });
// }
// }
// masked_map.insert({ frame->timestamp_,tmp_map });
// }
// }
// }
// /*while (masked_map.size() > 2)
// {
// auto itor = masked_map.begin();
// if (itor->second)
// {
// itor->second->clear();
// delete itor->second;
// }
// masked_map.erase(itor->first);
// }*/
// if (p_dispatch_queue)
// {
// DispatchQueue* dispath = (DispatchQueue*)p_dispatch_queue;
// dispath->dispatch(std::bind(&DeckLinkOutputDevice::BGRAToUYVY, this, std::placeholders::_1), frame);
// }
// }
//}
} }
#else #else
if (frame && (frame->data_ || (frame->pImage && frame->pImage->data))) if (frame && (frame->data_ || (frame->pImage && frame->pImage->data)))
...@@ -1774,7 +1821,7 @@ void DeckLinkOutputDevice::BGRAToUYVY(const std::shared_ptr<VideoFrameWithMask>& ...@@ -1774,7 +1821,7 @@ void DeckLinkOutputDevice::BGRAToUYVY(const std::shared_ptr<VideoFrameWithMask>&
std::make_shared<VideoFrameWithMask>(src_w,src_h,tm,image->sequenceNum_,uyvy,bmdFormat8BitYUV,image->flag_,image->meta_, start_time); std::make_shared<VideoFrameWithMask>(src_w,src_h,tm,image->sequenceNum_,uyvy,bmdFormat8BitYUV,image->flag_,image->meta_, start_time);
//sort_map_.insert({ image->timestamp_ ,video_frame }); //sort_map_.insert({ image->timestamp_ ,video_frame });
if(Settings::SdiOutWaitNums) if(Settings::SecondSdiOutWaitNums)
{ {
std::lock_guard<std::mutex> locker(sdi_clear_mutex); std::lock_guard<std::mutex> locker(sdi_clear_mutex);
auto itor = masked_map.find(start_time); auto itor = masked_map.find(start_time);
...@@ -1786,7 +1833,7 @@ void DeckLinkOutputDevice::BGRAToUYVY(const std::shared_ptr<VideoFrameWithMask>& ...@@ -1786,7 +1833,7 @@ void DeckLinkOutputDevice::BGRAToUYVY(const std::shared_ptr<VideoFrameWithMask>&
} }
else else
{ {
if (Settings::SDIOutputWaitNums) if (Settings::RTSDIOutputWaitNums)
{ {
output_video_frame_map.Insert(video_frame->timestamp_, video_frame); output_video_frame_map.Insert(video_frame->timestamp_, video_frame);
} }
......
...@@ -233,7 +233,7 @@ void NDIOutputThread::run() ...@@ -233,7 +233,7 @@ void NDIOutputThread::run()
} }
else if (timePlusFlag) else if (timePlusFlag)
{ {
if (VideoMaskQueue.WaitFor(Settings::SDIOutputWaitNums)) if (VideoMaskQueue.WaitFor(Settings::RTSDIOutputWaitNums))
{ {
//if (!frame_mask ||(frame_mask->mask_flag && !frame_mask->data_)) continue; //if (!frame_mask ||(frame_mask->mask_flag && !frame_mask->data_)) continue;
VideoMaskQueue.Pop(frame_mask); VideoMaskQueue.Pop(frame_mask);
......
...@@ -117,7 +117,8 @@ void ProcessMaskThread::process() ...@@ -117,7 +117,8 @@ void ProcessMaskThread::process()
std::shared_ptr<videoFrameData> image = nullptr; std::shared_ptr<videoFrameData> image = nullptr;
if (taskImageQueue.WaitFor(min_size - 1) /*&& taskImageQueue.Size() >= min_size*/)//有横屏数据了 if (taskImageQueue.WaitFor(min_size - 1) /*&& taskImageQueue.Size() >= min_size*/)//有横屏数据了
{ {
if (taskImageQueue.Front(image)) /*auto ret = taskImageQueue.Front(image);
if (ret)
{ {
taskImageQueue.Pop(); taskImageQueue.Pop();
if (!image || !image->data) if (!image || !image->data)
...@@ -125,6 +126,10 @@ void ProcessMaskThread::process() ...@@ -125,6 +126,10 @@ void ProcessMaskThread::process()
continue; continue;
} }
} }
else continue;*/
taskImageQueue.Pop(image);
if (!image || !image->data) continue;
timestamp = (image->replaySeq ? image->replaySeq : image->timestamp); timestamp = (image->replaySeq ? image->replaySeq : image->timestamp);
//auto sequence = image->sequenceNum; //auto sequence = image->sequenceNum;
//seqnum = sequence; //seqnum = sequence;
...@@ -446,7 +451,7 @@ void ProcessMaskThread::workMaskModify(const std::shared_ptr<videoFrameData>& pI ...@@ -446,7 +451,7 @@ void ProcessMaskThread::workMaskModify(const std::shared_ptr<videoFrameData>& pI
{ {
status = BS_START; status = BS_START;
start_time = timestamp; start_time = timestamp;
QString msg = "{\"type\":\"MaskMsg\",\"data\":{\"status\":" + QString::number(status) + ",\"timestamp\":" + QString::number(timestamp) + "}}"; QString msg = "{\"signal\":\"MaskMsg\",\"data\":{\"status\":" + QString::number(status) + ",\"timestamp\":" + QString::number(timestamp) + "}}";
UdpSend::GetInstance().SendUdpMsg(msg, Settings::UIIpAddr, QString::number(Settings::UIUdpPort)); UdpSend::GetInstance().SendUdpMsg(msg, Settings::UIIpAddr, QString::number(Settings::UIUdpPort));
//qDebug() << "start copy crop pic.......\n"; //qDebug() << "start copy crop pic.......\n";
} }
...@@ -457,7 +462,7 @@ void ProcessMaskThread::workMaskModify(const std::shared_ptr<videoFrameData>& pI ...@@ -457,7 +462,7 @@ void ProcessMaskThread::workMaskModify(const std::shared_ptr<videoFrameData>& pI
if (status == BS_END) if (status == BS_END)
{ {
//send msg to ui with udp-protocol //send msg to ui with udp-protocol
QString msg = "{\"type\":\"MaskMsg\",\"data\":{\"status\":" + QString::number(status) + ",\"timestamp\":" + QString::number(timestamp) + "}}"; QString msg = "{\"signal\":\"MaskMsg\",\"data\":{\"status\":" + QString::number(status) + ",\"timestamp\":" + QString::number(timestamp) + "}}";
UdpSend::GetInstance().SendUdpMsg(msg, Settings::UIIpAddr, QString::number(Settings::UIUdpPort)); UdpSend::GetInstance().SendUdpMsg(msg, Settings::UIIpAddr, QString::number(Settings::UIUdpPort));
} }
} }
......
...@@ -114,7 +114,7 @@ void ReplayThread::run() ...@@ -114,7 +114,7 @@ void ReplayThread::run()
qint32 errNo = (itor_end == storeVideoMap.end() ? 2 : (itor_begin == storeVideoMap.end() ? 1 : 3)); qint32 errNo = (itor_end == storeVideoMap.end() ? 2 : (itor_begin == storeVideoMap.end() ? 1 : 3));
QString msg = "{\"type\":\"ReplayResp\",\"data\":{\"inTime\":" + QString::number(replay_params.start_time) +",\"outTime\":" + QString::number(replay_params.end_time) + QString msg = "{\"signal\":\"ReplayResp\",\"data\":{\"inTime\":" + QString::number(replay_params.start_time) +",\"outTime\":" + QString::number(replay_params.end_time) +
",\"status\":0,\"errNo\":" + QString::number(errNo) +"}}"; ",\"status\":0,\"errNo\":" + QString::number(errNo) +"}}";
UdpSend::GetInstance().SendUdpMsg(msg, Settings::UIIpAddr, QString::number(Settings::UIUdpPort)); UdpSend::GetInstance().SendUdpMsg(msg, Settings::UIIpAddr, QString::number(Settings::UIUdpPort));
qDebug() << "replay fail,errno:"<<errNo << "\n"; qDebug() << "replay fail,errno:"<<errNo << "\n";
...@@ -165,7 +165,7 @@ void ReplayThread::run() ...@@ -165,7 +165,7 @@ void ReplayThread::run()
std::shared_ptr<videoFrameData> frame = nullptr; std::shared_ptr<videoFrameData> frame = nullptr;
frame = (resend_frame ? (resend_start ? resend_frame : replayVideoVec[replay_position] ) : replayVideoVec[replay_position]); frame = (resend_frame ? (resend_start ? resend_frame : replayVideoVec[replay_position] ) : replayVideoVec[replay_position]);
frame->replaySeq = current_seq; frame->replaySeq = current_seq;
emit PushFrame(frame); if(frame) emit PushFrame(frame);
if ((!resend_start || !resend_frame) && replay_position < (replayVideoVec.size() - 1)) replay_position++; if ((!resend_start || !resend_frame) && replay_position < (replayVideoVec.size() - 1)) replay_position++;
if (resend_frame) if (resend_frame)
......
...@@ -21,7 +21,7 @@ std::map<qint32, qint32> map_scale_mode; ...@@ -21,7 +21,7 @@ std::map<qint32, qint32> map_scale_mode;
int main_ver = 2; int main_ver = 2;
int mid_ver = 1; int mid_ver = 1;
int small_ver = 0; int small_ver = 1;
//int ReplayStoreTime = 10000;//单位ms //int ReplayStoreTime = 10000;//单位ms
//int FrontDeleyTime = 3000;//单位ms //int FrontDeleyTime = 3000;//单位ms
...@@ -778,12 +778,12 @@ void MomentaMedia::ReadSettings() ...@@ -778,12 +778,12 @@ void MomentaMedia::ReadSettings()
Settings::TimeoutFrames = settings.value("TIMEOUTFRAMES").toInt(); Settings::TimeoutFrames = settings.value("TIMEOUTFRAMES").toInt();
if (Settings::TimeoutFrames <= 0) Settings::TimeoutFrames = 50; if (Settings::TimeoutFrames <= 0) Settings::TimeoutFrames = 50;
Settings::SdiOutWaitNums = settings.value("DELEYSDINUMS",100).toInt(); Settings::SecondSdiOutWaitNums = settings.value("SECONDDELEYSDINUMS",100).toInt();
Settings::ReplayForward = settings.value("REPLAY_START_FORWARD", 5).toInt(); Settings::ReplayForward = settings.value("REPLAY_START_FORWARD", 5).toInt();
Settings::ReplayDeley = settings.value("REPLAY_END_DELEY", 5).toInt(); Settings::ReplayDeley = settings.value("REPLAY_END_DELEY", 5).toInt();
Settings::SDIOutputWaitNums = settings.value("SDIOUTPUTWAITNUMS", 5).toInt(); Settings::RTSDIOutputWaitNums = settings.value("RTSDIOUTPUTWAITNUMS", 5).toInt();
Settings::CropFlag = settings.value("CROPRECORD", 0).toInt(); Settings::CropFlag = settings.value("CROPRECORD", 0).toInt();
Settings::CropX = settings.value("CROP_X", 0).toInt(); Settings::CropX = settings.value("CROP_X", 0).toInt();
......
...@@ -15,7 +15,7 @@ int32_t Settings::RecordStoreDuration = 10000; ...@@ -15,7 +15,7 @@ int32_t Settings::RecordStoreDuration = 10000;
int32_t Settings::RecordFlag = 0; int32_t Settings::RecordFlag = 0;
int32_t Settings::OpenOMP = 1; int32_t Settings::OpenOMP = 1;
int32_t Settings::TimeoutFrames = 50; int32_t Settings::TimeoutFrames = 50;
int32_t Settings::SdiOutWaitNums = 100; int32_t Settings::SecondSdiOutWaitNums = 100;
bool Settings::HaveBlackDataFlag = false; bool Settings::HaveBlackDataFlag = false;
int32_t Settings::DrawFlag = 0; int32_t Settings::DrawFlag = 0;
...@@ -37,7 +37,7 @@ uint32_t Settings::ZoomOutWaitCnt = 0; ...@@ -37,7 +37,7 @@ uint32_t Settings::ZoomOutWaitCnt = 0;
uint32_t Settings::ReplayForward = 0; uint32_t Settings::ReplayForward = 0;
uint32_t Settings::ReplayDeley = 0; uint32_t Settings::ReplayDeley = 0;
uint32_t Settings::SDIOutputWaitNums = 0; uint32_t Settings::RTSDIOutputWaitNums = 0;
int32_t Settings::CropFlag = 0; int32_t Settings::CropFlag = 0;
int32_t Settings::CropX = 0; int32_t Settings::CropX = 0;
......
No preview for this file type
No preview for this file type
...@@ -4,13 +4,14 @@ available device "DeckLink 8K Pro (1)" ...@@ -4,13 +4,14 @@ available device "DeckLink 8K Pro (1)"
available device "DeckLink 8K Pro (2)" available device "DeckLink 8K Pro (2)"
available device "DeckLink 8K Pro (3)" available device "DeckLink 8K Pro (3)"
available device "DeckLink 8K Pro (4)" available device "DeckLink 8K Pro (4)"
"2024-05-16 14:30:21.752" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.216" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.811" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.236" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.831" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.256" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.851" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.276" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.871" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.296" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.891" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.316" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.911" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.336" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.931" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:03.394" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------
"2024-05-16 14:30:21.989" index: 0 DeckLinkInputDevice get video frame No input source 80000000 ------------ "2024-05-17 19:02:04.438" decklink input fps 51
"2024-05-16 14:30:23.034" decklink input fps 51 "2024-05-17 19:02:05.439" decklink input fps 50
"2024-05-17 19:02:06.439" decklink input fps 50
...@@ -42,13 +42,13 @@ SDIONEFRAMEDURATION=50 ...@@ -42,13 +42,13 @@ SDIONEFRAMEDURATION=50
RECORDFLAG=1 RECORDFLAG=1
OPENOMP=1 OPENOMP=1
TIMEOUTFRAMES=250 TIMEOUTFRAMES=250
DELEYSDINUMS=0 SECONDDELEYSDINUMS=100
REPLAY_START_FORWARD=50 REPLAY_START_FORWARD=50
REPLAY_END_DELEY=50 REPLAY_END_DELEY=50
SDIOUTPUTWAITNUMS=5 RTSDIOUTPUTWAITNUMS=5
CROPRECORD=0c CROPRECORD=0
CROP_X=400 CROP_X=400
CROP_Y=1800 CROP_Y=1800
CROP_DIRECTION=3 CROP_DIRECTION=3
UI_UDP_PORT=8100 UI_UDP_PORT=8100
UI_IP_ADDR=192.168.31.83 UI_IP_ADDR=127.0.0.1
...@@ -42,10 +42,10 @@ SDIONEFRAMEDURATION=50 ...@@ -42,10 +42,10 @@ SDIONEFRAMEDURATION=50
RECORDFLAG=1 RECORDFLAG=1
OPENOMP=1 OPENOMP=1
TIMEOUTFRAMES=250 TIMEOUTFRAMES=250
DELEYSDINUMS=0 SECONDDELEYSDINUMS=100
REPLAY_START_FORWARD=50 REPLAY_START_FORWARD=50
REPLAY_END_DELEY=50 REPLAY_END_DELEY=50
SDIOUTPUTWAITNUMS=5 RTSDIOUTPUTWAITNUMS=5
CROPRECORD=0 CROPRECORD=0
CROP_X=400 CROP_X=400
CROP_Y=1800 CROP_Y=1800
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment