Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Unified Diff: media/filters/chunk_demuxer.cc

Issue 10823300: Make ChunkDemuxer::SetTimestampOffset take a TimeDelta instead of double (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 90b0bb71bc136a1bd3ee1ab0ae4659c4178a07c9..c22d0c2f8687cac3fa73eb645bd4dfbc30ed65d2 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -836,16 +836,14 @@ void ChunkDemuxer::Abort(const std::string& id) {
stream_parser_map_[id]->Flush();
}
-bool ChunkDemuxer::SetTimestampOffset(const std::string& id, double offset) {
- DVLOG(1) << "SetTimestampOffset(" << id << ", " << offset << ")";
+bool ChunkDemuxer::SetTimestampOffset(const std::string& id, TimeDelta offset) {
+ DVLOG(1) << "SetTimestampOffset(" << id << ", " << offset.InSecondsF() << ")";
CHECK(IsValidId(id));
if (!source_info_map_[id].can_update_offset)
return false;
- TimeDelta time_offset = TimeDelta::FromMicroseconds(
- offset * base::Time::kMicrosecondsPerSecond);
- source_info_map_[id].timestamp_offset = time_offset;
+ source_info_map_[id].timestamp_offset = offset;
return true;
}
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698