Shaka Packager SDK
h265_byte_to_unit_stream_converter.h
1 // Copyright 2016 Google LLC. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file or at
5 // https://developers.google.com/open-source/licenses/bsd
6 
7 #ifndef PACKAGER_MEDIA_CODECS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_
8 #define PACKAGER_MEDIA_CODECS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_
9 
10 #include <cstddef>
11 #include <cstdint>
12 #include <vector>
13 
14 #include <packager/macros/classes.h>
15 #include <packager/media/codecs/h26x_byte_to_unit_stream_converter.h>
16 
17 namespace shaka {
18 namespace media {
19 
23  public:
27 
30  explicit H265ByteToUnitStreamConverter(H26xStreamFormat stream_format);
31 
33 
37  std::vector<uint8_t>* decoder_config) const override;
39 
40  private:
41  bool ProcessNalu(const Nalu& nalu) override;
42 
43  std::vector<uint8_t> last_sps_;
44  std::vector<uint8_t> last_pps_;
45  std::vector<uint8_t> last_vps_;
46 
47  DISALLOW_COPY_AND_ASSIGN(H265ByteToUnitStreamConverter);
48 };
49 
50 } // namespace media
51 } // namespace shaka
52 
53 #endif // PACKAGER_MEDIA_CODECS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_
bool GetDecoderConfigurationRecord(std::vector< uint8_t > *decoder_config) const override
A base class that is used to convert H.26x byte streams to NAL unit streams.
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66