diff --git a/streamer/CMakeLists.txt b/streamer/CMakeLists.txt index c5c7c2bd8..b2f04650b 100644 --- a/streamer/CMakeLists.txt +++ b/streamer/CMakeLists.txt @@ -40,8 +40,6 @@ if(ENABLE_DEEPSTREAM) link_directories(/opt/nvidia/deepstream/deepstream/lib/) list(APPEND ALL_STREAMER_SRCS ${DEEPSTREAM_SRCS}) list(APPEND DEPEND_LIBS nvdsgst_meta nvds_meta) -else() - message(FATAL_ERROR "Currently, DeepStream is required, we will make it optional later.") endif() # Link the yaml-cpp in system path, because deepstream also depends on yaml-cpp, diff --git a/streamer/README_CN.md b/streamer/README_CN.md index 2c76d03c1..884ae1e80 100644 --- a/streamer/README_CN.md +++ b/streamer/README_CN.md @@ -30,6 +30,9 @@ FastDeploy Streamer(FDStreamer)是一个AI多媒体流处理框架,以Pipe docker pull nvcr.io/nvidia/deepstream:6.1.1-devel ``` +### CPU +- GSTreamer 1.14+ + ## 编译和运行 1. [编译FastDeploy](../docs/cn/build_and_install), 或直接下载[FastDeploy预编译库](../docs/cn/build_and_install/download_prebuilt_libraries.md) @@ -46,9 +49,12 @@ cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/fastdeploy-linux-x64-x.x.x make -j ``` +编译选项: +- ENABLE_DEEPSTREAM,是否使用NVIDIA DeepStream,非NVIDIA GPU的环境需关闭此选项,默认ON + 3. 编译和运行Example | Example | 简介 | |:--|:--| | [PP-YOLOE](./examples/ppyoloe) | 多路视频接入,PP-YOLOE目标检测,NVTracker跟踪,硬编解码,写入mp4文件 | -| [Video Decoder](./examples/video_decoder) | 视频硬解码 | +| [Video Decoder](./examples/video_decoder) | 视频硬解码和软解码 | diff --git a/streamer/README_EN.md b/streamer/README_EN.md index 84e1a9443..c03223783 100644 --- a/streamer/README_EN.md +++ b/streamer/README_EN.md @@ -29,6 +29,9 @@ Install DeepStream 6.1.1 and dependencies manually,or use below docker: docker pull nvcr.io/nvidia/deepstream:6.1.1-devel ``` +### CPU +- GSTreamer 1.14+ + ## Build 1. [Build FastDeploy](../docs/en/build_and_install), or download [FastDeploy prebuilt libraries](../docs/en/build_and_install/download_prebuilt_libraries.md) @@ -45,9 +48,12 @@ cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/fastdeploy-linux-x64-x.x.x make -j ``` +CMake Options: +- ENABLE_DEEPSTREAM, whether to enable NVIDIA DeepStream, ON by default. + 3. Build and Run Example | Example | Brief | |:--|:--| | [PP-YOLOE](./examples/ppyoloe) | Multiple input videos, PP-YOLOE object detection, NvTracker, Hardware codec, writing to mp4 file | -| [Video Decoder](./examples/video_decoder) | Video decoding using hardward | +| [Video Decoder](./examples/video_decoder) | Video decoding using GPU or CPU | diff --git a/streamer/examples/ppyoloe/cpp/README_CN.md b/streamer/examples/ppyoloe/cpp/README_CN.md index 0d4ce4809..ec3ebf29b 100644 --- a/streamer/examples/ppyoloe/cpp/README_CN.md +++ b/streamer/examples/ppyoloe/cpp/README_CN.md @@ -4,7 +4,7 @@ ## 编译和运行 -1. 需要先FastDeploy Streamer, 请参考[README](../../../README_CN.md) +1. 该示例依赖DeepStream,需要准备DeepStream环境,并编译FastDeploy Streamer,请参考[README](../../../README_CN.md) 2. 编译Example ``` diff --git a/streamer/examples/ppyoloe/cpp/README_EN.md b/streamer/examples/ppyoloe/cpp/README_EN.md index 192bab502..564ba4a2a 100644 --- a/streamer/examples/ppyoloe/cpp/README_EN.md +++ b/streamer/examples/ppyoloe/cpp/README_EN.md @@ -4,7 +4,7 @@ English | [简体中文](README_CN.md) ## Build and Run -1. Build FastDeploy Streamer first, [README](../../../README.md) +1. This example requires DeepStream, please prepare DeepStream environment and build FastDeploy Streamer, refer to [README](../../../README.md) 2. Build Example ``` diff --git a/streamer/examples/video_decoder/cpp/README_CN.md b/streamer/examples/video_decoder/cpp/README_CN.md index 129268365..6cb62d67b 100644 --- a/streamer/examples/video_decoder/cpp/README_CN.md +++ b/streamer/examples/video_decoder/cpp/README_CN.md @@ -15,6 +15,7 @@ make -j 3. 运行 ``` -cp ../streamer_cfg.yml . +# GPU解码(gpu.yml)或CPU解码(cpu.yml) +cp ../gpu.yml streamer_cfg.yml ./video_decoder ``` diff --git a/streamer/examples/video_decoder/cpp/README_EN.md b/streamer/examples/video_decoder/cpp/README_EN.md index d7a0437b7..285493fe5 100644 --- a/streamer/examples/video_decoder/cpp/README_EN.md +++ b/streamer/examples/video_decoder/cpp/README_EN.md @@ -15,6 +15,7 @@ make -j 3. Run ``` -cp ../streamer_cfg.yml . +# GPU decoding(gpu.yml) or CPU decoding(cpu.yml) +cp ../gpu.yml streamer_cfg.yml ./video_decoder ``` diff --git a/streamer/examples/video_decoder/cpp/cpu.yml b/streamer/examples/video_decoder/cpp/cpu.yml new file mode 100644 index 000000000..542b701cb --- /dev/null +++ b/streamer/examples/video_decoder/cpp/cpu.yml @@ -0,0 +1,17 @@ +app: + type: video_decoder + enable-perf-measurement: true + perf-measurement-interval-sec: 5 + +uridecodebin: + uri: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_ride_bike.mov + +videoconvert: + +capsfilter: + caps: video/x-raw,format=(string)BGR + +appsink: + sync: true + max-buffers: 60 + drop: false diff --git a/streamer/examples/video_decoder/cpp/streamer_cfg.yml b/streamer/examples/video_decoder/cpp/gpu.yml similarity index 100% rename from streamer/examples/video_decoder/cpp/streamer_cfg.yml rename to streamer/examples/video_decoder/cpp/gpu.yml diff --git a/streamer/src/gstreamer/types.h b/streamer/src/gstreamer/types.h index 6f6ff68d1..bb3ba6fbb 100644 --- a/streamer/src/gstreamer/types.h +++ b/streamer/src/gstreamer/types.h @@ -14,6 +14,7 @@ #pragma once #include "fastdeploy/core/fd_type.h" +#include "fastdeploy/runtime/enum_variables.h" #include "fastdeploy/utils/perf.h" #include