DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
multi_segment_segmenter.h
1 // Copyright 2014 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 MEDIA_FORMATS_MP4_MULTI_SEGMENT_SEGMENTER_H_
8 #define MEDIA_FORMATS_MP4_MULTI_SEGMENT_SEGMENTER_H_
9 
10 #include "packager/media/formats/mp4/segmenter.h"
11 
12 namespace edash_packager {
13 namespace media {
14 namespace mp4 {
15 
16 struct SegmentType;
17 
32  public:
33  MultiSegmentSegmenter(const MuxerOptions& options,
34  scoped_ptr<FileType> ftyp,
35  scoped_ptr<Movie> moov);
36  ~MultiSegmentSegmenter() override;
37 
40  bool GetInitRange(size_t* offset, size_t* size) override;
41  bool GetIndexRange(size_t* offset, size_t* size) override;
43 
44  private:
45  // Segmenter implementation overrides.
46  Status DoInitialize() override;
47  Status DoFinalize() override;
48  Status DoFinalizeSegment() override;
49 
50  // Write segment to file.
51  Status WriteSegment();
52 
53  scoped_ptr<SegmentType> styp_;
54  uint32_t num_segments_;
55 
56  DISALLOW_COPY_AND_ASSIGN(MultiSegmentSegmenter);
57 };
58 
59 } // namespace mp4
60 } // namespace media
61 } // namespace edash_packager
62 
63 #endif // MEDIA_FORMATS_MP4_MULTI_SEGMENT_SEGMENTER_H_
bool GetIndexRange(size_t *offset, size_t *size) override
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
bool GetInitRange(size_t *offset, size_t *size) override