DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
avc_decoder_configuration.h
1 // Copyright 2015 Google Inc. 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 MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_H_
8 #define MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_H_
9 
10 #include <stdint.h>
11 #include <string>
12 #include <vector>
13 
14 #include "packager/base/macros.h"
15 
16 namespace edash_packager {
17 namespace media {
18 
21  public:
24 
27  bool Parse(const std::vector<uint8_t>& data);
28 
30  std::string GetCodecString() const;
31 
32  uint8_t version() const { return version_; }
33  uint8_t profile_indication() const { return profile_indication_; }
34  uint8_t profile_compatibility() const { return profile_compatibility_; }
35  uint8_t avc_level() const { return avc_level_; }
36  uint8_t length_size() const { return length_size_; }
37  uint32_t coded_width() const { return coded_width_; }
38  uint32_t coded_height() const { return coded_height_; }
39  uint32_t pixel_width() const { return pixel_width_; }
40  uint32_t pixel_height() const { return pixel_height_; }
41 
44  static std::string GetCodecString(uint8_t profile_indication,
45  uint8_t profile_compatibility,
46  uint8_t avc_level);
47 
48  private:
49  uint8_t version_;
50  uint8_t profile_indication_;
51  uint8_t profile_compatibility_;
52  uint8_t avc_level_;
53  uint8_t length_size_;
54 
55  // Extracted from SPS.
56  uint32_t coded_width_;
57  uint32_t coded_height_;
58  uint32_t pixel_width_;
59  uint32_t pixel_height_;
60 
61  DISALLOW_COPY_AND_ASSIGN(AVCDecoderConfiguration);
62 };
63 
64 } // namespace media
65 } // namespace edash_packager
66 
67 #endif // MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_H_
bool Parse(const std::vector< uint8_t > &data)
Class for parsing AVC decoder configuration.