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

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

Issue 465044: Refactor FFmpegVideoDecoder to try and generalize code common to all video decoders. (Closed)
Patch Set: Fix SCOPED_TRACE since VS faults on %zd. Created 11 years 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_util.h ('k') | media/filters/decoder_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file.
4
5 #include "media/ffmpeg/ffmpeg_util.h"
6
7 #include "media/filters/ffmpeg_common.h"
8
9 namespace media {
10
11 static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond };
12
13 base::TimeDelta ConvertTimestamp(const AVRational& time_base, int64 timestamp) {
14 int64 microseconds = av_rescale_q(timestamp, time_base, kMicrosBase);
15 return base::TimeDelta::FromMicroseconds(microseconds);
16 }
17
18 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_util.h ('k') | media/filters/decoder_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698