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#include <vector>
13
14#include <packager/macros/classes.h>
15#include <packager/media/codecs/vpx_parser.h>
16
17namespace shaka {
18namespace media {
19
22class VP8Parser : public VPxParser {
23 public:
24 VP8Parser();
25 ~VP8Parser() override;
26
33 bool Parse(const uint8_t* data,
34 size_t data_size,
35 std::vector<VPxFrameInfo>* vpx_frames) override;
36
42 static bool IsKeyframe(const uint8_t* data, size_t data_size);
43
44 private:
45 // Keep track of the current width and height. Note that they may change from
46 // frame to frame.
47 uint32_t width_;
48 uint32_t height_;
49
50 DISALLOW_COPY_AND_ASSIGN(VP8Parser);
51};
52
53} // namespace media
54} // namespace shaka
55
56#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.