DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
vp_codec_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_VP_CODEC_CONFIGURATION_H_
8 #define MEDIA_FILTERS_VP_CODEC_CONFIGURATION_H_
9 
10 #include <stdint.h>
11 #include <string>
12 #include <vector>
13 
14 #include "packager/base/macros.h"
15 #include "packager/media/base/video_stream_info.h"
16 
17 namespace edash_packager {
18 namespace media {
19 
22  public:
24  VPCodecConfiguration(uint8_t profile,
25  uint8_t level,
26  uint8_t bit_depth,
27  uint8_t color_space,
28  uint8_t chroma_subsampling,
29  uint8_t transfer_function,
30  bool video_full_range_flag,
31  const std::vector<uint8_t>& codec_initialization_data);
33 
36  bool Parse(const std::vector<uint8_t>& data);
37 
40  void Write(std::vector<uint8_t>* data) const;
41 
43  std::string GetCodecString(VideoCodec codec) const;
44 
45  uint8_t profile() const { return profile_; }
46  uint8_t level() const { return level_; }
47  uint8_t bit_depth() const { return bit_depth_; }
48  uint8_t color_space() const { return color_space_; }
49  uint8_t chroma_subsampling() const { return chroma_subsampling_; }
50  uint8_t transfer_function() const { return transfer_function_; }
51  bool video_full_range_flag() const { return video_full_range_flag_; }
52 
53  private:
54  uint8_t profile_;
55  uint8_t level_;
56  uint8_t bit_depth_;
57  uint8_t color_space_;
58  uint8_t chroma_subsampling_;
59  uint8_t transfer_function_;
60  bool video_full_range_flag_;
61  std::vector<uint8_t> codec_initialization_data_;
62 
63  DISALLOW_COPY_AND_ASSIGN(VPCodecConfiguration);
64 };
65 
66 } // namespace media
67 } // namespace edash_packager
68 
69 #endif // MEDIA_FILTERS_VP_CODEC_CONFIGURATION_H_
void Write(std::vector< uint8_t > *data) const
std::string GetCodecString(VideoCodec codec) const
bool Parse(const std::vector< uint8_t > &data)
Class for parsing or writing VP codec configuration data.