Index: media/filters/chunk_demuxer.cc |
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc |
index 06a8d62923e6fa9d98e90db81d32968681a404b6..db9ef8f93654f5c2d288221bf0ee325861c9dfa2 100644 |
--- a/media/filters/chunk_demuxer.cc |
+++ b/media/filters/chunk_demuxer.cc |
@@ -99,7 +99,7 @@ static bool IsSupported(const std::string& type, |
*has_audio = false; |
*has_video = false; |
- // Search for the SupportedTypeInfo for |type| |
+ // Search for the SupportedTypeInfo for |type|. |
for (size_t i = 0; i < arraysize(kSupportedTypeInfo); ++i) { |
const SupportedTypeInfo& type_info = kSupportedTypeInfo[i]; |
if (type == type_info.type) { |
@@ -759,6 +759,22 @@ void ChunkDemuxer::Abort(const std::string& id) { |
stream_parser_map_[id]->Flush(); |
} |
+void ChunkDemuxer::TimestampOffset(const std::string& id, float offset) { |
+ DVLOG(1) << "TimestampOffset(" << id << ", " << offset << ")"; |
+ DCHECK_GT(stream_parser_map_.count(id), 0u); |
+ |
+ TimeDelta time_offset = TimeDelta::FromMicroseconds( |
+ offset * base::Time::kMicrosecondsPerSecond); |
+ stream_parser_map_[id]->SetTimestampOffset(time_offset); |
+} |
+ |
+void ChunkDemuxer::ClearTimestampOffset(const std::string& id) { |
+ DVLOG(1) << "ClearTimestampOffset(" << id << ")"; |
+ DCHECK_GT(stream_parser_map_.count(id), 0u); |
+ |
+ stream_parser_map_[id]->ClearTimestampOffset(); |
+} |
+ |
bool ChunkDemuxer::EndOfStream(PipelineStatus status) { |
DVLOG(1) << "EndOfStream(" << status << ")"; |
base::AutoLock auto_lock(lock_); |