Shaka Packager SDK
webm_muxer.h
1 // Copyright 2015 Google Inc. 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 "packager/media/base/muxer.h"
11 
12 namespace shaka {
13 namespace media {
14 namespace webm {
15 
16 class Segmenter;
17 
19 class WebMMuxer : public Muxer {
20  public:
22  explicit WebMMuxer(const MuxerOptions& options);
23  ~WebMMuxer() override;
24 
25  private:
26  // Muxer implementation overrides.
27  Status InitializeMuxer() override;
28  Status Finalize() override;
29  Status AddSample(size_t stream_id, const MediaSample& sample) override;
30  Status FinalizeSegment(size_t stream_id,
31  const SegmentInfo& segment_info) override;
32 
33  void FireOnMediaStartEvent();
34  void FireOnMediaEndEvent();
35 
36  std::unique_ptr<Segmenter> segmenter_;
37 
38  DISALLOW_COPY_AND_ASSIGN(WebMMuxer);
39 };
40 
41 } // namespace webm
42 } // namespace media
43 } // namespace shaka
44 
45 #endif // PACKAGER_MEDIA_FORMATS_WEBM_WEBM_MUXER_H_
All the methods that are virtual are virtual for mocking.
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:20
Implements WebM Muxer.
Definition: webm_muxer.h:19
Class to hold a media sample.
Definition: media_sample.h:22
WebMMuxer(const MuxerOptions &options)
Create a WebMMuxer object from MuxerOptions.
Definition: webm_muxer.cc:21