OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef MEDIA_TOOLS_PLAYER_WTL_VIEW_H_ | 5 #ifndef MEDIA_TOOLS_PLAYER_WTL_VIEW_H_ |
6 #define MEDIA_TOOLS_PLAYER_WTL_VIEW_H_ | 6 #define MEDIA_TOOLS_PLAYER_WTL_VIEW_H_ |
7 | 7 |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <process.h> | 9 #include <process.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 renderer_->GetCurrentFrame(&frame); | 228 renderer_->GetCurrentFrame(&frame); |
229 if (frame.get()) { | 229 if (frame.get()) { |
230 base::TimeDelta frame_timestamp = frame->GetTimestamp(); | 230 base::TimeDelta frame_timestamp = frame->GetTimestamp(); |
231 if (frame != last_frame_ || frame_timestamp != last_timestamp_) { | 231 if (frame != last_frame_ || frame_timestamp != last_timestamp_) { |
232 last_frame_ = frame; | 232 last_frame_ = frame; |
233 last_timestamp_ = frame_timestamp; | 233 last_timestamp_ = frame_timestamp; |
234 ConvertFrame(frame); | 234 ConvertFrame(frame); |
235 } | 235 } |
236 frame = NULL; | 236 frame = NULL; |
237 } | 237 } |
| 238 renderer_->PutCurrentFrame(frame); |
238 | 239 |
239 #ifdef TESTING | 240 #ifdef TESTING |
240 double paint_time_start = GetTime(); | 241 double paint_time_start = GetTime(); |
241 static double paint_time_previous = 0; | 242 static double paint_time_previous = 0; |
242 if (!paint_time_previous) | 243 if (!paint_time_previous) |
243 paint_time_previous = paint_time_start; | 244 paint_time_previous = paint_time_start; |
244 #endif | 245 #endif |
245 CDC dcMem; | 246 CDC dcMem; |
246 dcMem.CreateCompatibleDC(dc); | 247 dcMem.CreateCompatibleDC(dc); |
247 HBITMAP hBmpOld = hbmp_ ? hbmp_: dcMem.SelectBitmap(bmp_); | 248 HBITMAP hBmpOld = hbmp_ ? hbmp_: dcMem.SelectBitmap(bmp_); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 } | 443 } |
443 } | 444 } |
444 | 445 |
445 media::VideoFrame* last_frame_; | 446 media::VideoFrame* last_frame_; |
446 base::TimeDelta last_timestamp_; | 447 base::TimeDelta last_timestamp_; |
447 | 448 |
448 DISALLOW_COPY_AND_ASSIGN(WtlVideoWindow); | 449 DISALLOW_COPY_AND_ASSIGN(WtlVideoWindow); |
449 }; | 450 }; |
450 | 451 |
451 #endif // MEDIA_TOOLS_PLAYER_WTL_VIEW_H_ | 452 #endif // MEDIA_TOOLS_PLAYER_WTL_VIEW_H_ |
OLD | NEW |