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

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

Issue 8418017: Miscellaneous header file cleanup for src/media. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/ffmpeg/ffmpeg_common.h" 5 #include "media/ffmpeg/ffmpeg_common.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/audio_decoder_config.h"
9 #include "media/base/video_decoder_config.h"
8 10
9 namespace media { 11 namespace media {
10 12
11 static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond }; 13 static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond };
12 14
13 base::TimeDelta ConvertFromTimeBase(const AVRational& time_base, 15 base::TimeDelta ConvertFromTimeBase(const AVRational& time_base,
14 int64 timestamp) { 16 int64 timestamp) {
15 int64 microseconds = av_rescale_q(timestamp, time_base, kMicrosBase); 17 int64 microseconds = av_rescale_q(timestamp, time_base, kMicrosBase);
16 return base::TimeDelta::FromMicroseconds(microseconds); 18 return base::TimeDelta::FromMicroseconds(microseconds);
17 } 19 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 avcodec_close(stream->codec); 334 avcodec_close(stream->codec);
333 } 335 }
334 } 336 }
335 } 337 }
336 338
337 // Then finally cleanup the format context. 339 // Then finally cleanup the format context.
338 av_close_input_file(format_context); 340 av_close_input_file(format_context);
339 } 341 }
340 342
341 } // namespace media 343 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698