Shaka Packager SDK
Loading...
Searching...
No Matches
webm_content_encodings_client.h
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PACKAGER_MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_CLIENT_H_
6#define PACKAGER_MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_CLIENT_H_
7
8#include <cstdint>
9#include <memory>
10#include <vector>
11
12#include <packager/macros/classes.h>
13#include <packager/media/formats/webm/webm_content_encodings.h>
14#include <packager/media/formats/webm/webm_parser.h>
15
16namespace shaka {
17namespace media {
18
19typedef std::vector<std::unique_ptr<ContentEncoding>> ContentEncodings;
20
23 public:
26
27 const ContentEncodings& content_encodings() const;
28
30 WebMParserClient* OnListStart(int id) override;
31 bool OnListEnd(int id) override;
32 bool OnUInt(int id, int64_t val) override;
33 bool OnBinary(int id, const uint8_t* data, int size) override;
34
35 private:
36 std::unique_ptr<ContentEncoding> cur_content_encoding_;
37 bool content_encryption_encountered_;
38 ContentEncodings content_encodings_;
39
40 // |content_encodings_| is ready. For debugging purpose.
41 bool content_encodings_ready_;
42
43 DISALLOW_COPY_AND_ASSIGN(WebMContentEncodingsClient);
44};
45
46} // namespace media
47} // namespace shaka
48
49#endif // PACKAGER_MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_CLIENT_H_
Parser for WebM ContentEncodings element.
WebMParserClient * OnListStart(int id) override
WebMParserClient methods.
All the methods that are virtual are virtual for mocking.