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
13#include <packager/macros/classes.h>
14#include <packager/media/codecs/vp_codec_configuration_record.h>
15
16namespace shaka {
17namespace media {
18
20 size_t frame_size;
21 size_t uncompressed_header_size;
22 bool is_keyframe;
23 uint32_t width;
24 uint32_t height;
25};
26
27class VPxParser {
28 public:
29 VPxParser() {}
30 virtual ~VPxParser() {}
31
38 virtual bool Parse(const uint8_t* data,
39 size_t data_size,
40 std::vector<VPxFrameInfo>* vpx_frames) = 0;
41
45 return codec_config_;
46 }
47
48 protected:
49 VPCodecConfigurationRecord* writable_codec_config() { return &codec_config_; }
50
51 private:
52 VPCodecConfigurationRecord codec_config_;
53
54 DISALLOW_COPY_AND_ASSIGN(VPxParser);
55};
56
57} // namespace media
58} // namespace shaka
59
60#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:44
All the methods that are virtual are virtual for mocking.