7 #include "packager/media/formats/webm/mkv_writer.h"
9 namespace edash_packager {
12 MkvWriter::MkvWriter() : position_(0) {}
14 MkvWriter::~MkvWriter() {}
20 return Status(error::FILE_FAILURE,
"Unable to open file for writing.");
24 seekable_ = file_->Seek(0);
32 const char* data =
reinterpret_cast<const char*
>(buf);
33 int64_t total_bytes_written = 0;
34 while (total_bytes_written < len) {
35 const int64_t written =
36 file_->Write(data + total_bytes_written, len - total_bytes_written);
40 total_bytes_written += written;
43 DCHECK_EQ(total_bytes_written, len);
49 return WriteFromFile(source, kWholeFile);
55 const int64_t size =
File::CopyFile(source, file_.get(), max_copy);
70 if (file_->Seek(position)) {
83 mkvmuxer::int64 position) {}