Shaka Packager SDK
vp9_parser.h
1 // Copyright 2015 Google LLC. 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 PACKAGER_MEDIA_CODECS_VP9_PARSER_H_
8 #define PACKAGER_MEDIA_CODECS_VP9_PARSER_H_
9 
10 #include <cstdint>
11 #include <cstdlib>
12 
13 #include <packager/macros/classes.h>
14 #include <packager/media/codecs/vpx_parser.h>
15 
16 namespace shaka {
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 shaka
53 
54 #endif // PACKAGER_MEDIA_CODECS_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:576
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
Definition: vp9_parser.cc:459
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66