Commit 0b43216cc6b40df0f6cf3d35722dfee8a0bf8542
1 parent
7319ea36
添加重要注释
Showing
2 changed files
with
4 additions
and
1 deletions
src/FFNvDecoder.h
@@ -20,7 +20,7 @@ using namespace std; | @@ -20,7 +20,7 @@ using namespace std; | ||
20 | * 接口:DXDECODER_CALLBACK | 20 | * 接口:DXDECODER_CALLBACK |
21 | * 功能:解码数据回调接口 | 21 | * 功能:解码数据回调接口 |
22 | * 参数:const dx_void * userPtr 用户自定义数据 | 22 | * 参数:const dx_void * userPtr 用户自定义数据 |
23 | -* AVFrame * gpuFrame 解码结果帧数据 | 23 | +* AVFrame * gpuFrame 解码结果帧数据,在设置的对应的gpu上,要十分注意这一点,尤其是多线程情况 |
24 | * 返回:无 | 24 | * 返回:无 |
25 | * 备注:当解码库数据源为实时流时(RTSP/GB28181),本接 | 25 | * 备注:当解码库数据源为实时流时(RTSP/GB28181),本接 |
26 | * 口内不可进行阻塞/耗时操作。当解码库数据源为 | 26 | * 口内不可进行阻塞/耗时操作。当解码库数据源为 |
src/main.cpp
@@ -7,6 +7,9 @@ | @@ -7,6 +7,9 @@ | ||
7 | 7 | ||
8 | unsigned char *pHwRgb = nullptr; | 8 | unsigned char *pHwRgb = nullptr; |
9 | 9 | ||
10 | +/** | ||
11 | + * 注意: gpuFrame 在解码器设置的显卡上,后续操作要十分注意这一点,尤其是多线程情况 | ||
12 | + * */ | ||
10 | void postDecoded(const void * userPtr, AVFrame * gpuFrame){ | 13 | void postDecoded(const void * userPtr, AVFrame * gpuFrame){ |
11 | FFNvDecoder* decoder = (FFNvDecoder*)userPtr; | 14 | FFNvDecoder* decoder = (FFNvDecoder*)userPtr; |
12 | if (decoder!= nullptr) | 15 | if (decoder!= nullptr) |