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 <memory>
9#include <vector>
10
11#include <packager/macros/classes.h>
12#include <packager/media/formats/webm/webm_content_encodings.h>
13#include <packager/media/formats/webm/webm_parser.h>
14
15namespace shaka {
16namespace media {
17
18typedef std::vector<std::unique_ptr<ContentEncoding>> ContentEncodings;
19
22 public:
25
26 const ContentEncodings& content_encodings() const;
27
29 WebMParserClient* OnListStart(int id) override;
30 bool OnListEnd(int id) override;
31 bool OnUInt(int id, int64_t val) override;
32 bool OnBinary(int id, const uint8_t* data, int size) override;
33
34 private:
35 std::unique_ptr<ContentEncoding> cur_content_encoding_;
36 bool content_encryption_encountered_;
37 ContentEncodings content_encodings_;
38
39 // |content_encodings_| is ready. For debugging purpose.
40 bool content_encodings_ready_;
41
42 DISALLOW_COPY_AND_ASSIGN(WebMContentEncodingsClient);
43};
44
45} // namespace media
46} // namespace shaka
47
48#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.