Shaka Packager SDK
two_pass_single_segment_segmenter.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_TWO_PASS_SINGLE_SEGMENT_SEGMENTER_H_
8 #define PACKAGER_MEDIA_FORMATS_WEBM_TWO_PASS_SINGLE_SEGMENT_SEGMENTER_H_
9 
10 #include <memory>
11 #include <string>
12 
13 #include <packager/macros/classes.h>
14 #include <packager/media/formats/webm/mkv_writer.h>
15 #include <packager/media/formats/webm/single_segment_segmenter.h>
16 #include <packager/status.h>
17 
18 namespace shaka {
19 namespace media {
20 
21 struct MuxerOptions;
22 
23 namespace webm {
24 
28  public:
29  explicit TwoPassSingleSegmentSegmenter(const MuxerOptions& options);
31 
32  // Segmenter implementation overrides.
33  Status DoInitialize() override;
34  Status DoFinalize() override;
35 
36  private:
41  bool CopyFileWithClusterRewrite(File* source,
42  MkvWriter* dest,
43  uint64_t last_size);
44 
45  std::string temp_file_name_;
46 
47  DISALLOW_COPY_AND_ASSIGN(TwoPassSingleSegmentSegmenter);
48 };
49 
50 } // namespace webm
51 } // namespace media
52 } // namespace shaka
53 
54 #endif // PACKAGER_MEDIA_FORMATS_WEBM_TWO_PASS_SINGLE_SEGMENT_SEGMENTER_H_
An implementation of IMkvWriter using our File type.
Definition: mkv_writer.h:23
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