Shaka Packager SDK
Loading...
Searching...
No Matches
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 <cstdint>
11#include <vector>
12
13#include <packager/macros/classes.h>
14#include <packager/media/base/video_stream_info.h>
15#include <packager/media/codecs/h26x_byte_to_unit_stream_converter.h>
16#include <packager/media/codecs/nalu_reader.h>
17
18namespace shaka {
19namespace media {
20
24 public:
28
31 explicit H265ByteToUnitStreamConverter(H26xStreamFormat stream_format);
32
34
38 std::vector<uint8_t>* decoder_config) const override;
40
41 private:
42 bool ProcessNalu(const Nalu& nalu) override;
43
44 std::vector<uint8_t> last_sps_;
45 std::vector<uint8_t> last_pps_;
46 std::vector<uint8_t> last_vps_;
47
48 DISALLOW_COPY_AND_ASSIGN(H265ByteToUnitStreamConverter);
49};
50
51} // namespace media
52} // namespace shaka
53
54#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.