Shaka Packager SDK
Loading...
Searching...
No Matches
hevc_decoder_configuration_record.h
1// Copyright 2015 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_HEVC_DECODER_CONFIGURATION_RECORD_H_
8#define PACKAGER_MEDIA_CODECS_HEVC_DECODER_CONFIGURATION_RECORD_H_
9
10#include <cstdint>
11#include <string>
12#include <vector>
13
14#include <packager/macros/classes.h>
15#include <packager/media/base/fourccs.h>
16#include <packager/media/base/video_stream_info.h>
17#include <packager/media/codecs/decoder_configuration_record.h>
18#include <packager/media/codecs/h265_parser.h>
19
20namespace shaka {
21namespace media {
22
25 public:
28
29 // Can specify an existing parser to use for referencing to previously parsed
30 // parameter sets.
31 void SetParser(H265Parser* parser) {
32 parser_ = parser;
33 internal_parser_used_ = false;
34 }
35 bool ParseLHEVCConfig(const std::vector<uint8_t>& data);
36
38 std::string GetCodecString(FourCC codec_fourcc) const;
39
40 private:
41 bool ParseInternal() override;
42
43 // If this is set true, then L-HEVC configuration record is also parsed.
44 bool layered_ = false;
45 bool internal_parser_used_ = true;
46 H265Parser* parser_ = nullptr;
47 H265Parser internal_parser_;
48
49 uint8_t version_ = 0;
50 uint8_t general_profile_space_ = 0;
51 bool general_tier_flag_ = false;
52 uint8_t general_profile_idc_ = 0;
53 uint32_t general_profile_compatibility_flags_ = 0;
54 std::vector<uint8_t> general_constraint_indicator_flags_;
55 uint8_t general_level_idc_ = 0;
56
57 DISALLOW_COPY_AND_ASSIGN(HEVCDecoderConfigurationRecord);
58};
59
60} // namespace media
61} // namespace shaka
62
63#endif // PACKAGER_MEDIA_CODECS_HEVC_DECODER_CONFIGURATION_RECORD_H_
Class for parsing HEVC decoder configuration record.
All the methods that are virtual are virtual for mocking.