DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
vp9_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_VP9_PARSER_H_
8 #define MEDIA_FILTERS_VP9_PARSER_H_
9 
10 #include <stdint.h>
11 #include <stdlib.h>
12 
13 #include "packager/base/macros.h"
14 #include "packager/media/filters/vpx_parser.h"
15 
16 namespace edash_packager {
17 namespace media {
18 
20 class VP9Parser : public VPxParser {
21  public:
22  VP9Parser();
23  ~VP9Parser() override;
24 
31  bool Parse(const uint8_t* data,
32  size_t data_size,
33  std::vector<VPxFrameInfo>* vpx_frames) override;
34 
40  static bool IsKeyframe(const uint8_t* data, size_t data_size);
41 
42  private:
43  // Keep track of the current width and height. Note that they may change from
44  // frame to frame.
45  uint32_t width_;
46  uint32_t height_;
47 
48  DISALLOW_COPY_AND_ASSIGN(VP9Parser);
49 };
50 
51 } // namespace media
52 } // namespace edash_packager
53 
54 #endif // MEDIA_FILTERS_VP9_PARSER_H_
Class to parse a vp9 bit stream.
Definition: vp9_parser.h:20
static bool IsKeyframe(const uint8_t *data, size_t data_size)
Definition: vp9_parser.cc:534
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
Definition: vp9_parser.cc:417