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 <cstddef>
11#include <cstdint>
12#include <string>
13#include <vector>
14
15namespace shaka {
16namespace media {
17
20 public:
23
26 bool Parse(const std::vector<uint8_t>& data) {
27 return Parse(data.data(), data.size());
28 }
29
32 bool Parse(const uint8_t* data, size_t data_size);
33
35 std::string GetCodecString() const;
36
37 std::string GetCodecString(uint16_t color_primaries,
38 uint16_t transfer_characteristics,
39 uint16_t matrix_coefficients,
40 uint8_t video_full_range_flag) const;
41
42 private:
43 int profile_ = 0;
44 int level_ = 0;
45 int tier_ = 0;
46 int bit_depth_ = 0;
47 int mono_chrome_ = 0;
48 int chroma_subsampling_x_ = 0;
49 int chroma_subsampling_y_ = 0;
50 int chroma_sample_position_ = 0;
51
52 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
53 // generated copy constructor and assignment operator. Since the internal data
54 // is small, the performance impact is minimal.
55};
56
57} // namespace media
58} // namespace shaka
59
60#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.