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

Side by Side Diff: media/ffmpeg/ffmpeg_util.cc

Issue 555087: Refactor some code that depends on FFmpeg (Closed)
Patch Set: 2010 Created 10 years, 11 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 unified diff | Download patch
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/ffmpeg/file_protocol.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // source code is governed by a BSD-style license that can be found in the 2 // Use of this source code is governed by a BSD-style license that can be
3 // LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/ffmpeg/ffmpeg_util.h" 5 #include "media/ffmpeg/ffmpeg_util.h"
6 6
7 #include "media/filters/ffmpeg_common.h" 7 #include "media/ffmpeg/ffmpeg_common.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond }; 11 static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond };
12 12
13 base::TimeDelta ConvertTimestamp(const AVRational& time_base, int64 timestamp) { 13 base::TimeDelta ConvertTimestamp(const AVRational& time_base, int64 timestamp) {
14 int64 microseconds = av_rescale_q(timestamp, time_base, kMicrosBase); 14 int64 microseconds = av_rescale_q(timestamp, time_base, kMicrosBase);
15 return base::TimeDelta::FromMicroseconds(microseconds); 15 return base::TimeDelta::FromMicroseconds(microseconds);
16 } 16 }
17 17
18 } // namespace media 18 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/ffmpeg/file_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698