7 #ifndef PACKAGER_MEDIA_FORMATS_PACKED_AUDIO_PACKED_AUDIO_WRITER_H_
8 #define PACKAGER_MEDIA_FORMATS_PACKED_AUDIO_PACKED_AUDIO_WRITER_H_
10 #include <packager/file/file_closer.h>
11 #include <packager/media/base/muxer.h>
17 class PackedAudioSegmenter;
30 friend class PackedAudioWriterTest;
36 Status InitializeMuxer()
override;
37 Status Finalize()
override;
38 Status AddMediaSample(
size_t stream_id,
const MediaSample& sample)
override;
39 Status FinalizeSegment(
size_t stream_id,
const SegmentInfo& sample)
override;
41 Status WriteSegment(
const std::string& segment_path,
44 Status CloseFile(std::unique_ptr<File, FileCloser> file);
46 const int32_t transport_stream_timestamp_offset_ = 0;
47 std::unique_ptr<PackedAudioSegmenter> segmenter_;
50 std::unique_ptr<File, FileCloser> output_file_;
53 int64_t total_duration_ = 0;
56 uint64_t segment_number_ = 0;
All the methods that are virtual are virtual for mocking.