7 #ifndef MEDIA_FORMATS_MP4_FRAGMENTER_H_
8 #define MEDIA_FORMATS_MP4_FRAGMENTER_H_
13 #include "packager/base/logging.h"
14 #include "packager/media/base/status.h"
25 struct SegmentReference;
55 void ClearFragmentFinalized() { fragment_finalized_ =
false; }
57 uint64_t fragment_duration()
const {
return fragment_duration_; }
58 uint64_t first_sap_time()
const {
return first_sap_time_; }
59 uint64_t earliest_presentation_time()
const {
60 return earliest_presentation_time_;
62 bool fragment_initialized()
const {
return fragment_initialized_; }
63 bool fragment_finalized()
const {
return fragment_finalized_; }
71 bool use_decoding_timestamp_in_timeline) {
72 use_decoding_timestamp_in_timeline_ = use_decoding_timestamp_in_timeline;
85 Status FinalizeFragmentForEncryption();
89 std::shared_ptr<StreamInfo> stream_info_;
90 bool use_decoding_timestamp_in_timeline_;
92 uint64_t seek_preroll_;
93 bool fragment_initialized_;
94 bool fragment_finalized_;
95 uint64_t fragment_duration_;
96 int64_t earliest_presentation_time_;
97 int64_t first_sap_time_;
98 std::unique_ptr<BufferWriter> data_;
103 template <
typename T>
107 DCHECK(default_value);
108 DCHECK(!entries->empty());
110 typename std::vector<T>::const_iterator it = entries->begin();
112 for (; it < entries->end(); ++it)
118 *default_value = value;
126 #endif // MEDIA_FORMATS_MP4_FRAGMENTER_H_