Shaka Packager SDK
Loading...
Searching...
No Matches
vpx_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_VPX_PARSER_H_
8#define PACKAGER_MEDIA_CODECS_VPX_PARSER_H_
9
10#include <cstdint>
11#include <cstdlib>
12#include <vector>
13
14#include <packager/macros/classes.h>
15#include <packager/media/codecs/vp_codec_configuration_record.h>
16
17namespace shaka {
18namespace media {
19
21 size_t frame_size;
22 size_t uncompressed_header_size;
23 bool is_keyframe;
24 uint32_t width;
25 uint32_t height;
26};
27
28class VPxParser {
29 public:
30 VPxParser() {}
31 virtual ~VPxParser() {}
32
39 virtual bool Parse(const uint8_t* data,
40 size_t data_size,
41 std::vector<VPxFrameInfo>* vpx_frames) = 0;
42
46 return codec_config_;
47 }
48
49 protected:
50 VPCodecConfigurationRecord* writable_codec_config() { return &codec_config_; }
51
52 private:
53 VPCodecConfigurationRecord codec_config_;
54
55 DISALLOW_COPY_AND_ASSIGN(VPxParser);
56};
57
58} // namespace media
59} // namespace shaka
60
61#endif // PACKAGER_MEDIA_CODECS_VPX_PARSER_H_
Class for parsing or writing VP codec configuration record.
virtual bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames)=0
const VPCodecConfigurationRecord & codec_config() const
Definition vpx_parser.h:45
All the methods that are virtual are virtual for mocking.