diff --git a/include/depthai/pipeline/node/VideoEncoder.hpp b/include/depthai/pipeline/node/VideoEncoder.hpp index 7c0e55394..59c186e52 100644 --- a/include/depthai/pipeline/node/VideoEncoder.hpp +++ b/include/depthai/pipeline/node/VideoEncoder.hpp @@ -25,12 +25,12 @@ class VideoEncoder : public NodeCRTP Input input{*this, "in", Input::Type::SReceiver, true, 4, true, {{DatatypeEnum::ImgFrame, true}}}; /** - * Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data. + * Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with out. */ Output bitstream{*this, "bitstream", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}; /** - * Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data. + * Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with bitstream. */ Output out{*this, "out", Output::Type::MSender, {{DatatypeEnum::EncodedFrame, false}}}; diff --git a/src/pipeline/datatype/EncodedFrame.cpp b/src/pipeline/datatype/EncodedFrame.cpp index ab4cd27e7..0473d7e63 100644 --- a/src/pipeline/datatype/EncodedFrame.cpp +++ b/src/pipeline/datatype/EncodedFrame.cpp @@ -41,35 +41,35 @@ bool EncodedFrame::getLossless() const { } EncodedFrame::FrameType EncodedFrame::getFrameType() const { if(frame.type == FrameType::Unknown) { - SliceType frameType; + utility::SliceType frameType; switch(frame.profile) { case RawEncodedFrame::Profile::JPEG: - frameType = SliceType::I; + frameType = utility::SliceType::I; break; case RawEncodedFrame::Profile::AVC: - frameType = getTypesH264(frame.data, true)[0]; + frameType = utility::getTypesH264(frame.data, true)[0]; break; case RawEncodedFrame::Profile::HEVC: - frameType = getTypesH265(frame.data, true)[0]; + frameType = utility::getTypesH265(frame.data, true)[0]; break; } switch(frameType) { - case SliceType::P: + case utility::SliceType::P: frame.type = FrameType::P; break; - case SliceType::B: + case utility::SliceType::B: frame.type = FrameType::B; break; - case SliceType::I: + case utility::SliceType::I: frame.type = FrameType::I; break; - case SliceType::SP: + case utility::SliceType::SP: frame.type = FrameType::P; break; - case SliceType::SI: + case utility::SliceType::SI: frame.type = FrameType::I; break; - case SliceType::Unknown: + case utility::SliceType::Unknown: frame.type = FrameType::Unknown; break; } diff --git a/src/utility/H26xParsers.cpp b/src/utility/H26xParsers.cpp index 2bbba63e8..62922d204 100644 --- a/src/utility/H26xParsers.cpp +++ b/src/utility/H26xParsers.cpp @@ -4,6 +4,7 @@ #include namespace dai { +namespace utility { template struct H26xParser { @@ -287,4 +288,5 @@ std::vector getTypesH265(buf& bs, bool breakOnFirst) { return H265Parser::getTypes(bs, breakOnFirst); } +} // namespace utility } // namespace dai diff --git a/src/utility/H26xParsers.hpp b/src/utility/H26xParsers.hpp index d2b90c1d9..a8b1e3b6c 100644 --- a/src/utility/H26xParsers.hpp +++ b/src/utility/H26xParsers.hpp @@ -4,6 +4,7 @@ #include namespace dai { +namespace utility { enum class Profile { H264, H265 }; enum class SliceType { P, B, I, SP, SI, Unknown }; @@ -11,4 +12,5 @@ enum class SliceType { P, B, I, SP, SI, Unknown }; std::vector getTypesH264(const std::vector& bs, bool breakOnFirst = false); std::vector getTypesH265(const std::vector& bs, bool breakOnFirst = false); +} // namespace utility } // namespace dai