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 #include "packager/media/filters/decoder_configuration.h"
16 
17 namespace edash_packager {
18 namespace media {
19 
22  public:
24  ~AVCDecoderConfiguration() override;
25 
27  std::string GetCodecString() const;
28 
29  uint8_t version() const { return version_; }
30  uint8_t profile_indication() const { return profile_indication_; }
31  uint8_t profile_compatibility() const { return profile_compatibility_; }
32  uint8_t avc_level() const { return avc_level_; }
33  uint32_t coded_width() const { return coded_width_; }
34  uint32_t coded_height() const { return coded_height_; }
35  uint32_t pixel_width() const { return pixel_width_; }
36  uint32_t pixel_height() const { return pixel_height_; }
37 
40  static std::string GetCodecString(uint8_t profile_indication,
41  uint8_t profile_compatibility,
42  uint8_t avc_level);
43 
44  private:
45  bool ParseInternal() override;
46 
47  uint8_t version_;
48  uint8_t profile_indication_;
49  uint8_t profile_compatibility_;
50  uint8_t avc_level_;
51 
52  // Extracted from SPS.
53  uint32_t coded_width_;
54  uint32_t coded_height_;
55  uint32_t pixel_width_;
56  uint32_t pixel_height_;
57 
58  DISALLOW_COPY_AND_ASSIGN(AVCDecoderConfiguration);
59 };
60 
61 } // namespace media
62 } // namespace edash_packager
63 
64 #endif // MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_H_
Class for parsing AVC decoder configuration.