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

Unified Diff: media/filters/video_renderer_base.cc

Issue 42635: Lots of files touched for a very simple change. Everywhere we used a const M... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 9 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/video_renderer_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_base.cc
===================================================================
--- media/filters/video_renderer_base.cc (revision 12568)
+++ media/filters/video_renderer_base.cc (working copy)
@@ -45,22 +45,22 @@
// static
bool VideoRendererBase::IsMediaFormatSupported(
- const MediaFormat* media_format) {
+ const MediaFormat& media_format) {
int width;
int height;
return ParseMediaFormat(media_format, &width, &height);
}
// static
-bool VideoRendererBase::ParseMediaFormat(const MediaFormat* media_format,
+bool VideoRendererBase::ParseMediaFormat(const MediaFormat& media_format,
int* width_out,
int* height_out) {
- DCHECK(media_format && width_out && height_out);
+ DCHECK(width_out && height_out);
std::string mime_type;
- return (media_format->GetAsString(MediaFormat::kMimeType, &mime_type) &&
+ return (media_format.GetAsString(MediaFormat::kMimeType, &mime_type) &&
mime_type.compare(mime_type::kUncompressedVideo) == 0 &&
- media_format->GetAsInteger(MediaFormat::kWidth, width_out) &&
- media_format->GetAsInteger(MediaFormat::kHeight, height_out));
+ media_format.GetAsInteger(MediaFormat::kWidth, width_out) &&
+ media_format.GetAsInteger(MediaFormat::kHeight, height_out));
}
void VideoRendererBase::Stop() {
@@ -82,7 +82,7 @@
bool VideoRendererBase::Initialize(VideoDecoder* decoder) {
int width, height;
decoder_ = decoder;
- if (ParseMediaFormat(decoder_->GetMediaFormat(), &width, &height) &&
+ if (ParseMediaFormat(decoder_->media_format(), &width, &height) &&
OnInitialize(width, height)) {
host_->SetVideoSize(width, height);
host_->SetTimeUpdateCallback(
« no previous file with comments | « media/filters/video_renderer_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698