35 lines
782 B
C++
35 lines
782 B
C++
#pragma once
|
|
|
|
#include "cvmmap_streamer/config/runtime_config.hpp"
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace cvmmap_streamer::encode {
|
|
|
|
enum class EncodedBitstreamFormat {
|
|
AnnexB,
|
|
};
|
|
|
|
struct EncodedStreamInfo {
|
|
CodecType codec{CodecType::H264};
|
|
std::uint32_t width{0};
|
|
std::uint32_t height{0};
|
|
std::uint32_t time_base_num{1};
|
|
std::uint32_t time_base_den{1'000'000'000u};
|
|
std::uint32_t frame_rate_num{30};
|
|
std::uint32_t frame_rate_den{1};
|
|
EncodedBitstreamFormat bitstream_format{EncodedBitstreamFormat::AnnexB};
|
|
std::vector<std::uint8_t> decoder_config{};
|
|
};
|
|
|
|
struct EncodedAccessUnit {
|
|
CodecType codec{CodecType::H264};
|
|
std::uint64_t source_timestamp_ns{0};
|
|
std::uint64_t stream_pts_ns{0};
|
|
bool keyframe{false};
|
|
std::vector<std::uint8_t> annexb_bytes{};
|
|
};
|
|
|
|
}
|