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/codecs/decoder_configuration_record.h>
17#include <packager/media/codecs/h265_parser.h>
18
19namespace shaka {
20namespace media {
21
24 public:
27
28 // Can specify an existing parser to use for referencing to previously parsed
29 // parameter sets.
30 void SetParser(H265Parser* parser) {
31 parser_ = parser;
32 internal_parser_used_ = false;
33 }
34 bool ParseLHEVCConfig(const std::vector<uint8_t>& data);
35
37 std::string GetCodecString(FourCC codec_fourcc) const;
38
39 private:
40 bool ParseInternal() override;
41
42 // If this is set true, then L-HEVC configuration record is also parsed.
43 bool layered_ = false;
44 bool internal_parser_used_ = true;
45 H265Parser* parser_ = nullptr;
46 H265Parser internal_parser_;
47
48 uint8_t version_ = 0;
49 uint8_t general_profile_space_ = 0;
50 bool general_tier_flag_ = false;
51 uint8_t general_profile_idc_ = 0;
52 uint32_t general_profile_compatibility_flags_ = 0;
53 std::vector<uint8_t> general_constraint_indicator_flags_;
54 uint8_t general_level_idc_ = 0;
55
56 DISALLOW_COPY_AND_ASSIGN(HEVCDecoderConfigurationRecord);
57};
58
59} // namespace media
60} // namespace shaka
61
62#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.