DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
vpx_parser.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_CODECS_VPX_PARSER_H_
8 #define MEDIA_CODECS_VPX_PARSER_H_
9 
10 #include <stdint.h>
11 #include <stdlib.h>
12 
13 #include "packager/base/macros.h"
14 #include "packager/media/codecs/vp_codec_configuration_record.h"
15 
16 namespace shaka {
17 namespace media {
18 
19 struct VPxFrameInfo {
20  size_t frame_size;
21  size_t uncompressed_header_size;
22  bool is_keyframe;
23  uint32_t width;
24  uint32_t height;
25 };
26 
27 class VPxParser {
28  public:
29  VPxParser() {}
30  virtual ~VPxParser() {}
31 
38  virtual bool Parse(const uint8_t* data,
39  size_t data_size,
40  std::vector<VPxFrameInfo>* vpx_frames) = 0;
41 
45  return codec_config_;
46  }
47 
48  protected:
49  VPCodecConfigurationRecord* writable_codec_config() { return &codec_config_; }
50 
51  private:
52  VPCodecConfigurationRecord codec_config_;
53 
54  DISALLOW_COPY_AND_ASSIGN(VPxParser);
55 };
56 
57 } // namespace media
58 } // namespace shaka
59 
60 #endif // MEDIA_CODECS_VPX_PARSER_H_
Class for parsing or writing VP codec configuration record.
const VPCodecConfigurationRecord & codec_config() const
Definition: vpx_parser.h:44
virtual bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames)=0