Shaka Packager SDK
Loading...
Searching...
No Matches
webvtt_muxer.h
1// Copyright 2020 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_FORMATS_WEBVTT_WEBVTT_MUXER_H_
8#define PACKAGER_MEDIA_FORMATS_WEBVTT_WEBVTT_MUXER_H_
9
10#include <cstdint>
11#include <memory>
12
13#include <packager/media/base/text_muxer.h>
14#include <packager/media/formats/webvtt/webvtt_file_buffer.h>
15
16namespace shaka {
17namespace media {
18namespace webvtt {
19
21class WebVttMuxer : public TextMuxer {
22 public:
24 explicit WebVttMuxer(const MuxerOptions& options);
25 ~WebVttMuxer() override;
26
27 private:
28 // TextMuxer implementation overrides.
29 Status InitializeStream(TextStreamInfo* stream) override;
30 Status AddTextSampleInternal(const TextSample& sample) override;
31 Status WriteToFile(const std::string& filename, uint64_t* size) override;
32
33 std::unique_ptr<WebVttFileBuffer> buffer_;
34};
35
36} // namespace webvtt
37} // namespace media
38} // namespace shaka
39
40#endif // PACKAGER_MEDIA_FORMATS_WEBVTT_WEBVTT_MUXER_H_
Implements WebVtt Muxer.
All the methods that are virtual are virtual for mocking.
This structure contains the list of configuration options for Muxer.