Shaka Packager SDK
Loading...
Searching...
No Matches
webm_muxer.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_FORMATS_WEBM_WEBM_MUXER_H_
8#define PACKAGER_MEDIA_FORMATS_WEBM_WEBM_MUXER_H_
9
10#include <cstddef>
11#include <memory>
12
13#include <packager/macros/classes.h>
14#include <packager/media/base/media_handler.h>
15#include <packager/media/base/muxer.h>
16#include <packager/media/base/muxer_options.h>
17#include <packager/status.h>
18
19namespace shaka {
20namespace media {
21namespace webm {
22
23class Segmenter;
24
26class WebMMuxer : public Muxer {
27 public:
29 explicit WebMMuxer(const MuxerOptions& options);
30 ~WebMMuxer() override;
31
32 private:
33 // Muxer implementation overrides.
34 Status InitializeMuxer() override;
35 Status Finalize() override;
36 Status AddMediaSample(size_t stream_id, const MediaSample& sample) override;
37 Status FinalizeSegment(size_t stream_id,
38 const SegmentInfo& segment_info) override;
39
40 void FireOnMediaStartEvent();
41 void FireOnMediaEndEvent();
42
43 std::unique_ptr<Segmenter> segmenter_;
44
45 DISALLOW_COPY_AND_ASSIGN(WebMMuxer);
46};
47
48} // namespace webm
49} // namespace media
50} // namespace shaka
51
52#endif // PACKAGER_MEDIA_FORMATS_WEBM_WEBM_MUXER_H_
Class to hold a media sample.
Implements WebM Muxer.
Definition webm_muxer.h:26
All the methods that are virtual are virtual for mocking.
This structure contains the list of configuration options for Muxer.