Commit c6a23486 by 王国涛-悦动

解决ndi八通道崩溃问题

parent 8efe7ff5
...@@ -12,3 +12,4 @@ available device "DeckLink Quad (7)" ...@@ -12,3 +12,4 @@ available device "DeckLink Quad (7)"
available device "DeckLink Quad (8)" available device "DeckLink Quad (8)"
start scheduleVideoFramesFunc function........ start scheduleVideoFramesFunc function........
ProcessThread::run::fps:: 0 0 ProcessThread::run::fps:: 0 0
ProcessThread::run::fps:: 0 50
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2023-12-06T08:29:38.3200425Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-12-12T08:48:22.8450458Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2023-12-06T08:29:38.5180428Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-12-12T08:48:23.1050443Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
...@@ -32,7 +32,7 @@ bool HaveBlackDataFlag = true; ...@@ -32,7 +32,7 @@ bool HaveBlackDataFlag = true;
int main_ver = 2; int main_ver = 2;
int mid_ver = 0; int mid_ver = 0;
int small_ver = 2; int small_ver = 4;
bool scale_enable = true; bool scale_enable = true;
std::atomic_bool bk_flag = false; std::atomic_bool bk_flag = false;
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
#include "NDI/NDIOutputThread.h" #include "NDI/NDIOutputThread.h"
extern qint64 StartTimeStamp; extern qint64 StartTimeStamp;
extern int AudioChannel;
extern int FrameRate;
#define SAMPLE 2400
#define SAMPLERATE 48000
NDIOutputThread::NDIOutputThread(const QString& Name, int w, int h, qint32 deleyTime) : NDISenderName(Name), width(w), height(h), deleyTime_(deleyTime), isSending(false), Instance(nullptr), cropFlag(false), AudioCvtPtr(nullptr) NDIOutputThread::NDIOutputThread(const QString& Name, int w, int h, qint32 deleyTime) : NDISenderName(Name), width(w), height(h), deleyTime_(deleyTime), isSending(false), Instance(nullptr), cropFlag(false), AudioCvtPtr(nullptr)
{ {
...@@ -81,17 +86,17 @@ bool NDIOutputThread::Init() ...@@ -81,17 +86,17 @@ bool NDIOutputThread::Init()
Frame.FourCC = NDIlib_FourCC_type_BGRA; Frame.FourCC = NDIlib_FourCC_type_BGRA;
Frame.p_data = (uint8_t*)malloc(Frame.xres * Frame.yres * 4); Frame.p_data = (uint8_t*)malloc(Frame.xres * Frame.yres * 4);
Frame.line_stride_in_bytes = Frame.xres * 4; Frame.line_stride_in_bytes = Frame.xres * 4;
Frame.frame_rate_D = 1000; Frame.frame_rate_D = 1;
Frame.frame_rate_N = 50000; Frame.frame_rate_N = FrameRate;
Frame.frame_format_type = NDIlib_frame_format_type_progressive; Frame.frame_format_type = NDIlib_frame_format_type_progressive;
Frame.picture_aspect_ratio = 16.0 / 9; Frame.picture_aspect_ratio = 16.0 / 9;
if(cropFlag) if(cropFlag)
{ {
AudioFrame.FourCC = NDIlib_FourCC_audio_type_FLTP; AudioFrame.FourCC = NDIlib_FourCC_audio_type_FLTP;
AudioFrame.no_channels = 2; AudioFrame.no_channels = AudioChannel;
AudioFrame.sample_rate = 48000; AudioFrame.sample_rate = SAMPLERATE;
AudioFrame.p_data = (uint8_t*)malloc(MAXCHANNEL * 1600 * sizeof(float)); AudioFrame.p_data = (uint8_t*)malloc(AudioChannel * SAMPLE * sizeof(float));
AudioCvtPtr = std::make_shared<AudioConvert>(AudioFrame.no_channels, bmdAudioSampleType32bitInteger); AudioCvtPtr = std::make_shared<AudioConvert>(AudioFrame.no_channels, bmdAudioSampleType32bitInteger);
} }
......
...@@ -4,7 +4,7 @@ FRAME_RATE=50 ...@@ -4,7 +4,7 @@ FRAME_RATE=50
PRVW_FLAG=0 PRVW_FLAG=0
OUTPUT_PLAY_MODE=0 OUTPUT_PLAY_MODE=0
BLACK_BOTTOM_HEIGHT=0 BLACK_BOTTOM_HEIGHT=0
AUDIO_CHANNEL=2 AUDIO_CHANNEL=8
ASPEC_DEN=9 ASPEC_DEN=9
ASPEC_NUM=16 ASPEC_NUM=16
SCALE_MODE=0 SCALE_MODE=0
...@@ -13,14 +13,14 @@ SCALE_MODE_2=0 ...@@ -13,14 +13,14 @@ SCALE_MODE_2=0
SCALE_MODE_3=0 SCALE_MODE_3=0
SCALE_MODE_4=0 SCALE_MODE_4=0
DELEY_TIME=2000 DELEY_TIME=2000
SDI_DELEY_TIME_1=4000 SDI_DELEY_TIME_1=5000
SDI_DELEY_TIME_2=4000 SDI_DELEY_TIME_2=5000
SDI_DELEY_TIME_3=5000 SDI_DELEY_TIME_3=5000
SDI_DELEY_TIME_4=6000 SDI_DELEY_TIME_4=5000
NDI_DELEY_TIME_1=2000 NDI_DELEY_TIME_1=5000
NDI_DELEY_TIME_2=4000 NDI_DELEY_TIME_2=5000
NDI_DELEY_TIME_3=5000 NDI_DELEY_TIME_3=5000
NDI_DELEY_TIME_4=6000 NDI_DELEY_TIME_4=5000
BLACK_BOTTOM_HEIGHT_1=300 BLACK_BOTTOM_HEIGHT_1=300
BLACK_BOTTOM_HEIGHT_2=10 BLACK_BOTTOM_HEIGHT_2=10
BLACK_BOTTOM_HEIGHT_3=500 BLACK_BOTTOM_HEIGHT_3=500
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
available device "DeckLink 8K Pro (1)"
available device "DeckLink 8K Pro (2)"
available device "DeckLink 8K Pro (3)"
available device "DeckLink 8K Pro (4)"
available device "DeckLink Quad (1)"
available device "DeckLink Quad (2)"
available device "DeckLink Quad (3)"
available device "DeckLink Quad (4)"
available device "DeckLink Quad (5)"
available device "DeckLink Quad (6)"
available device "DeckLink Quad (7)"
available device "DeckLink Quad (8)"
[DELEYTIME]
FRONT_DELEY_TIME=3
FRAME_RATE=50
PRVW_FLAG=0
OUTPUT_PLAY_MODE=0
BLACK_BOTTOM_HEIGHT=0
AUDIO_CHANNEL=8
ASPEC_DEN=9
ASPEC_NUM=16
SCALE_MODE=0
SCALE_MODE_1=3
SCALE_MODE_2=0
SCALE_MODE_3=0
SCALE_MODE_4=0
DELEY_TIME=2000
SDI_DELEY_TIME_1=5000
SDI_DELEY_TIME_2=5000
SDI_DELEY_TIME_3=5000
SDI_DELEY_TIME_4=5000
NDI_DELEY_TIME_1=5000
NDI_DELEY_TIME_2=5000
NDI_DELEY_TIME_3=5000
NDI_DELEY_TIME_4=5000
BLACK_BOTTOM_HEIGHT_1=300
BLACK_BOTTOM_HEIGHT_2=10
BLACK_BOTTOM_HEIGHT_3=500
BLACK_BOTTOM_HEIGHT_4=300
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