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

Side by Side Diff: media/tools/shader_bench/shader_bench.cc

Issue 10832087: Remove VideoDecoderConfig.frame_rate_xxx() & VideoFrame:Get/SetDuration() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more CR comments. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdio.h> 5 #include <stdio.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <deque> 7 #include <deque>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 exit(1); 48 exit(1);
49 } 49 }
50 50
51 long frame_size = CalculateYUVFrameSize(file_handle, num_frames); 51 long frame_size = CalculateYUVFrameSize(file_handle, num_frames);
52 52
53 for (int i = 0; i < num_frames; i++) { 53 for (int i = 0; i < num_frames; i++) {
54 scoped_refptr<media::VideoFrame> video_frame = 54 scoped_refptr<media::VideoFrame> video_frame =
55 media::VideoFrame::CreateFrame(media::VideoFrame::YV12, 55 media::VideoFrame::CreateFrame(media::VideoFrame::YV12,
56 width, 56 width,
57 height, 57 height,
58 base::TimeDelta(),
59 base::TimeDelta()); 58 base::TimeDelta());
60 long bytes_read = 59 long bytes_read =
61 fread(video_frame->data(0), 1, frame_size, file_handle); 60 fread(video_frame->data(0), 1, frame_size, file_handle);
62 61
63 if (bytes_read != frame_size) { 62 if (bytes_read != frame_size) {
64 printf("Could not read %s\n", file_name.c_str()); 63 printf("Could not read %s\n", file_name.c_str());
65 fclose(file_handle); 64 fclose(file_handle);
66 exit(1); 65 exit(1);
67 } 66 }
68 out_frames.push_back(video_frame); 67 out_frames.push_back(video_frame);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 scoped_ptr<GPUPainter> painter(painters[i].painter); 154 scoped_ptr<GPUPainter> painter(painters[i].painter);
156 painter->LoadFrames(&frames); 155 painter->LoadFrames(&frames);
157 painter->SetGLContext(surface, context); 156 painter->SetGLContext(surface, context);
158 painter->Initialize(width, height); 157 painter->Initialize(width, height);
159 printf("Running %s tests...", painters[i].name); 158 printf("Running %s tests...", painters[i].name);
160 RunTest(window.get(), painter.get()); 159 RunTest(window.get(), painter.get());
161 } 160 }
162 161
163 return 0; 162 return 0;
164 } 163 }
OLDNEW
« no previous file with comments | « media/tools/shader_bench/cpu_color_painter.cc ('k') | webkit/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698