Shaka Packager SDK
Loading...
Searching...
No Matches
vp8_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_VP8_PARSER_H_
8#define PACKAGER_MEDIA_CODECS_VP8_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
16namespace shaka {
17namespace media {
18
21class VP8Parser : public VPxParser {
22 public:
23 VP8Parser();
24 ~VP8Parser() 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(VP8Parser);
50};
51
52} // namespace media
53} // namespace shaka
54
55#endif // PACKAGER_MEDIA_CODECS_VP8_PARSER_H_
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
static bool IsKeyframe(const uint8_t *data, size_t data_size)
All the methods that are virtual are virtual for mocking.