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