Shaka Packager SDK
Loading...
Searching...
No Matches
av1_codec_configuration_record.h
1// Copyright 2018 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_AV1_CODEC_CONFIGURATION_RECORD_H_
8#define PACKAGER_MEDIA_CODECS_AV1_CODEC_CONFIGURATION_RECORD_H_
9
10#include <cstdint>
11#include <string>
12#include <vector>
13
14namespace shaka {
15namespace media {
16
19 public:
22
25 bool Parse(const std::vector<uint8_t>& data) {
26 return Parse(data.data(), data.size());
27 }
28
31 bool Parse(const uint8_t* data, size_t data_size);
32
34 std::string GetCodecString() const;
35
36 std::string GetCodecString(uint16_t color_primaries,
37 uint16_t transfer_characteristics,
38 uint16_t matrix_coefficients,
39 uint8_t video_full_range_flag) const;
40
41 private:
42 int profile_ = 0;
43 int level_ = 0;
44 int tier_ = 0;
45 int bit_depth_ = 0;
46 int mono_chrome_ = 0;
47 int chroma_subsampling_x_ = 0;
48 int chroma_subsampling_y_ = 0;
49 int chroma_sample_position_ = 0;
50
51 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
52 // generated copy constructor and assignment operator. Since the internal data
53 // is small, the performance impact is minimal.
54};
55
56} // namespace media
57} // namespace shaka
58
59#endif // PACKAGER_MEDIA_CODECS_AV1_CODEC_CONFIGURATION_RECORD_H_
Class for parsing AV1 codec configuration record.
bool Parse(const std::vector< uint8_t > &data)
All the methods that are virtual are virtual for mocking.