DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs
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  virtual ~MultiSegmentSegmenter();
37 
40  virtual bool GetInitRange(size_t* offset, size_t* size) OVERRIDE;
41  virtual bool GetIndexRange(size_t* offset, size_t* size) OVERRIDE;
43 
44  private:
45  // Segmenter implementation overrides.
46  virtual Status DoInitialize() OVERRIDE;
47  virtual Status DoFinalize() OVERRIDE;
48  virtual 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_
virtual bool GetInitRange(size_t *offset, size_t *size) OVERRIDE
virtual bool GetIndexRange(size_t *offset, size_t *size) OVERRIDE
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18