Shaka Packager SDK
dovi_decoder_configuration_record.h
1 // Copyright 2019 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_DOVI_DECODER_CONFIGURATION_RECORD_H_
8 #define PACKAGER_MEDIA_CODECS_DOVI_DECODER_CONFIGURATION_RECORD_H_
9 
10 #include <cstdint>
11 #include <string>
12 #include <vector>
13 
14 #include <packager/media/base/fourccs.h>
15 
16 namespace shaka {
17 namespace media {
18 
20 // Implemented according to Dolby Vision Streams Within the ISO Base Media File
21 // Format Version 2.0:
22 // https://www.dolby.com/us/en/technologies/dolby-vision/dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2.0.pdf
23 // and Dolby Vision Streams within the HTTP Live Streaming format Version 2.0:
24 // https://www.dolby.com/us/en/technologies/dolby-vision/dolby-vision-streams-within-the-http-live-streaming-format-v2.0.pdf
26  public:
28  ~DOVIDecoderConfigurationRecord() = default;
29 
32  bool Parse(const std::vector<uint8_t>& data);
33 
36  std::string GetCodecString(FourCC codec_fourcc) const;
37 
40  FourCC GetDoViCompatibleBrand(const uint8_t transfer_characteristics) const;
41 
42  private:
44  delete;
46  const DOVIDecoderConfigurationRecord&) = delete;
47 
48  uint8_t profile_ = 0;
49  uint8_t bl_signal_compatibility_id_ = 0;
50  uint8_t level_ = 0;
51 };
52 
53 } // namespace media
54 } // namespace shaka
55 
56 #endif // PACKAGER_MEDIA_CODECS_DOVI_DECODER_CONFIGURATION_RECORD_H_
Class for parsing Dolby Vision decoder configuration record.
FourCC GetDoViCompatibleBrand(const uint8_t transfer_characteristics) const
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66