7 #ifndef PACKAGER_MEDIA_CODECS_H26X_BYTE_TO_UNIT_STREAM_CONVERTER_H_
8 #define PACKAGER_MEDIA_CODECS_H26X_BYTE_TO_UNIT_STREAM_CONVERTER_H_
13 #include <packager/macros/classes.h>
14 #include <packager/media/base/video_stream_info.h>
15 #include <packager/media/codecs/nalu_reader.h>
25 static constexpr
size_t kUnitStreamNaluLengthSize = 4;
34 H26xStreamFormat stream_format);
47 size_t input_frame_size,
48 std::vector<uint8_t>* output_frame);
57 std::vector<uint8_t>* decoder_config)
const = 0;
59 H26xStreamFormat stream_format()
const {
return stream_format_; }
62 bool strip_parameter_set_nalus()
const {
63 return stream_format_ ==
64 H26xStreamFormat::kNalUnitStreamWithoutParameterSetNalus;
68 void WarnIfNotMatch(
int nalu_type,
69 const uint8_t* nalu_ptr,
71 const std::vector<uint8_t>& vector);
76 virtual bool ProcessNalu(
const Nalu& nalu) = 0;
78 Nalu::CodecType type_;
79 H26xStreamFormat stream_format_;
All the methods that are virtual are virtual for mocking.