Skip to main content

H264Depacketize.h File

H264Depacketize Node — extracts H.264 NAL units from RTP packets. More...

Included Headers

#include "builder/Node.h" #include "builder/OutputSpec.h" #include <memory> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

classH264Depacketize

Depayloads RTP-encapsulated H.264 into a raw H.264 byte stream. More...

Description

H264Depacketize Node — extracts H.264 NAL units from RTP packets.

Wraps rtph264depay. Insert between an RTP source (e.g. RTSPInput or a udpsrc) and an H.264 decoder. Optional caps enforcement injects framerate / geometry into the depayloaded stream when the upstream source is ambiguous.

File Listing

The file content with the documentation metadata removed is:

1
10#pragma once
11#include "builder/Node.h"
12#include "builder/OutputSpec.h"
13#include <memory>
14#include <vector>
15
16namespace simaai::neat {
17
27class H264Depacketize final : public Node, public OutputSpecProvider {
28public:
32 int h264_fps = -1, int h264_width = -1, int h264_height = -1,
33 bool enforce_h264_caps = true);
35 std::string kind() const override {
36 return "H264Depacketize";
37 }
39 NodeCapsBehavior caps_behavior() const override {
40 if (enforce_h264_caps_ && (h264_fps_ > 0 || h264_width_ > 0 || h264_height_ > 0)) {
41 return NodeCapsBehavior::Static;
42 }
43 return NodeCapsBehavior::Dynamic;
44 }
46 std::string backend_fragment(int node_index) const override;
48 std::vector<std::string> element_names(int node_index) const override;
50 OutputSpec output_spec(const OutputSpec& input) const override;
51
53 int payload_type() const {
54 return payload_type_;
55 }
58 return h264_parse_config_interval_;
59 }
61 int h264_fps() const {
62 return h264_fps_;
63 }
65 int h264_width() const {
66 return h264_width_;
67 }
69 int h264_height() const {
70 return h264_height_;
71 }
73 bool enforce_h264_caps() const {
74 return enforce_h264_caps_;
75 }
76
77private:
78 int payload_type_ = 96;
79 int h264_parse_config_interval_ = -1;
80 int h264_fps_ = -1;
81 int h264_width_ = -1;
82 int h264_height_ = -1;
83 bool enforce_h264_caps_ = true;
84};
85
86} // namespace simaai::neat
87
88namespace simaai::neat::nodes {
90std::shared_ptr<simaai::neat::Node>
91H264Depacketize(int payload_type = 96, int h264_parse_config_interval = -1, int h264_fps = -1,
92 int h264_width = -1, int h264_height = -1, bool enforce_h264_caps = true);
93} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.