7 #ifndef PACKAGER_MEDIA_FORMATS_MP4_MP4_MUXER_H_
8 #define PACKAGER_MEDIA_FORMATS_MP4_MP4_MUXER_H_
13 #include <packager/macros/classes.h>
14 #include <packager/media/base/muxer.h>
19 class AudioStreamInfo;
22 class VideoStreamInfo;
28 struct ProtectionSchemeInfo;
41 Status InitializeMuxer()
override;
42 Status Finalize()
override;
43 Status AddMediaSample(
size_t stream_id,
const MediaSample& sample)
override;
44 Status FinalizeSegment(
size_t stream_id,
47 Status DelayInitializeMuxer();
48 Status UpdateEditListOffsetFromSample(
const MediaSample& sample);
58 std::optional<Range> GetInitRangeStartAndEnd();
62 std::optional<Range> GetIndexRangeStartAndEnd();
65 void FireOnMediaStartEvent();
66 void FireOnMediaEndEvent();
69 uint64_t IsoTimeNow();
72 bool to_be_initialized_ =
true;
73 std::optional<int64_t> edit_list_offset_;
75 std::unique_ptr<Segmenter> segmenter_;
All the methods that are virtual are virtual for mocking.