Shaka Packager SDK
Loading...
Searching...
No Matches
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#include <vector>
13
14#include <packager/macros/classes.h>
15#include <packager/media/codecs/vpx_parser.h>
16
17namespace shaka {
18namespace media {
19
21class VP9Parser : public VPxParser {
22 public:
23 VP9Parser();
24 ~VP9Parser() override;
25
32 bool Parse(const uint8_t* data,
33 size_t data_size,
34 std::vector<VPxFrameInfo>* vpx_frames) override;
35
41 static bool IsKeyframe(const uint8_t* data, size_t data_size);
42
43 private:
44 // Keep track of the current width and height. Note that they may change from
45 // frame to frame.
46 uint32_t width_;
47 uint32_t height_;
48
49 DISALLOW_COPY_AND_ASSIGN(VP9Parser);
50};
51
52} // namespace media
53} // namespace shaka
54
55#endif // PACKAGER_MEDIA_CODECS_VP9_PARSER_H_
Class to parse a vp9 bit stream.
Definition vp9_parser.h:21
static bool IsKeyframe(const uint8_t *data, size_t data_size)
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
All the methods that are virtual are virtual for mocking.