|
2 | 2 | #include <catch2/catch_test_macros.hpp> |
3 | 3 | #include <iostream> |
4 | 4 |
|
5 | | -#include "depthai/device/Device.hpp" |
6 | 5 | #include "depthai/pipeline/Pipeline.hpp" |
7 | 6 | #include "depthai/pipeline/datatype/EncodedFrame.hpp" |
8 | 7 | #include "depthai/pipeline/datatype/ImgFrame.hpp" |
9 | 8 | #include "depthai/pipeline/node/Camera.hpp" |
10 | 9 | #include "depthai/pipeline/node/VideoEncoder.hpp" |
11 | | -#include "depthai/pipeline/node/internal/XLinkOut.hpp" |
12 | 10 | #include "depthai/properties/VideoEncoderProperties.hpp" |
13 | 11 |
|
14 | | -dai::Pipeline getPipeline(dai::VideoEncoderProperties::Profile profile, unsigned int quality, bool lossless, unsigned int bitrate) { |
15 | | - dai::Pipeline pipeline; |
16 | | - auto camNode = pipeline.create<dai::node::Camera>()->build(); |
17 | | - auto camOut = camNode->requestOutput({640, 480}, dai::ImgFrame::Type::NV12); |
18 | | - auto encNode = pipeline.create<dai::node::VideoEncoder>(); |
19 | | - auto xlinkOut = pipeline.create<dai::node::internal::XLinkOut>(); |
20 | | - camOut->link(encNode->input); |
21 | | - encNode->out.link(xlinkOut->input); |
22 | | - |
23 | | - encNode->setProfile(profile); |
24 | | - encNode->setBitrate(bitrate); |
25 | | - encNode->setQuality(quality); |
26 | | - encNode->setLossless(lossless); |
27 | | - encNode->setKeyframeFrequency(30); |
28 | | - xlinkOut->setStreamName("out"); |
29 | | - |
30 | | - return pipeline; |
31 | | -} |
32 | | - |
33 | 12 | TEST_CASE("OLD_OUTPUT") { |
34 | 13 | dai::Pipeline pipeline; |
35 | 14 | auto camNode = pipeline.create<dai::node::Camera>()->build(); |
|
0 commit comments