DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs 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_FILTERS_VPX_PARSER_H_
8 #define MEDIA_FILTERS_VPX_PARSER_H_
9 
10 #include <stdint.h>
11 #include <stdlib.h>
12 
13 #include "packager/base/macros.h"
14 #include "packager/media/filters/vp_codec_configuration.h"
15 
16 namespace edash_packager {
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 
44  const VPCodecConfiguration& codec_config() const { return codec_config_; }
45 
46  protected:
47  VPCodecConfiguration* writable_codec_config() { return &codec_config_; }
48 
49  private:
50  VPCodecConfiguration codec_config_;
51 
52  DISALLOW_COPY_AND_ASSIGN(VPxParser);
53 };
54 
55 } // namespace media
56 } // namespace edash_packager
57 
58 #endif // MEDIA_FILTERS_VPX_PARSER_H_
const VPCodecConfiguration & 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
Class for parsing or writing VP codec configuration data.