7 #include <packager/media/base/text_sample.h>
12 #include <absl/log/log.h>
17 bool TextFragment::is_empty()
const {
18 return std::all_of(sub_fragments.begin(), sub_fragments.end(),
19 std::mem_fn(&TextFragment::is_empty)) &&
20 body.empty() &&
image.empty();
23 TextSample::TextSample(
const std::string&
id,
26 const TextSettings& settings,
27 const TextFragment& body)
29 start_time_(start_time),
30 duration_(end_time - start_time),
34 int64_t TextSample::EndTime()
const {
35 return start_time_ + duration_;
All the methods that are virtual are virtual for mocking.
std::vector< uint8_t > image
PNG image data.