Skip to main content

H264Packetize.h File

H264Packetize Node — wraps encoded H.264 into RTP packets for network streaming. More...

Included Headers

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

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

classH264Packetize

RTP H.264 payloader Node — wraps encoded H.264 into RTP packets. More...

structPayloadType

RTP dynamic payload type (default 96, the conventional value for H.264 over RTP). More...

structConfigInterval

SPS/PPS re-injection interval in seconds (default 1). More...

Description

H264Packetize Node — wraps encoded H.264 into RTP packets for network streaming.

Wraps GStreamer's rtph264pay element. Place after H264EncodeSima (or any H.264 encoder) when streaming over RTP/RTSP — it splits NAL units into RTP payloads and periodically re-injects SPS/PPS so late-joining receivers can decode.

File Listing

The file content with the documentation metadata removed is:

1
10#pragma once
11
12#include "builder/Node.h"
13#include "builder/OutputSpec.h"
14
15#include <memory>
16#include <vector>
17
18namespace simaai::neat {
19
25class H264Packetize final : public Node, public OutputSpecProvider {
26public:
28 struct PayloadType {
29 int value;
31 constexpr PayloadType(int v = 96) : value(v) {}
32 };
33
36 int value;
38 constexpr ConfigInterval(int v = 1) : value(v) {}
39 };
40
42 H264Packetize(PayloadType pt = PayloadType{}, ConfigInterval config_interval = ConfigInterval{});
44 std::string kind() const override {
45 return "H264Packetize";
46 }
48 NodeCapsBehavior caps_behavior() const override {
49 return NodeCapsBehavior::Dynamic;
50 }
51
53 std::string backend_fragment(int node_index) const override;
55 std::vector<std::string> element_names(int node_index) const override;
57 OutputSpec output_spec(const OutputSpec& input) const override;
58
60 int pt() const {
61 return pt_;
62 }
64 int config_interval() const {
65 return config_interval_;
66 }
67
68private:
69 int pt_ = 96;
70 int config_interval_ = 1;
71};
72
73} // namespace simaai::neat
74
75namespace simaai::neat::nodes {
77std::shared_ptr<simaai::neat::Node>
80} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.