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

Unified Diff: chrome/gpu/gpu_video_decoder.cc

Issue 6673003: Move GPU messages to content. I've also switched the IPC structs to use the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/gpu/gpu_video_decoder.h ('k') | chrome/gpu/gpu_video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_video_decoder.cc
===================================================================
--- chrome/gpu/gpu_video_decoder.cc (revision 77652)
+++ chrome/gpu/gpu_video_decoder.cc (working copy)
@@ -5,11 +5,11 @@
#include "chrome/gpu/gpu_video_decoder.h"
#include "base/command_line.h"
-#include "chrome/common/gpu_messages.h"
#include "chrome/gpu/gpu_channel.h"
#include "chrome/gpu/media/fake_gl_video_decode_engine.h"
#include "chrome/gpu/media/fake_gl_video_device.h"
#include "content/common/child_thread.h"
+#include "content/common/gpu_messages.h"
#include "media/base/data_buffer.h"
#include "media/base/media_switches.h"
#include "media/base/video_frame.h"
@@ -127,11 +127,11 @@
// TODO(sjl): Do something with the statistics...
if (frame->IsEndOfStream()) {
- SendConsumeVideoFrame(kGpuVideoInvalidFrameId, 0, 0, kGpuVideoEndOfStream);
+ SendConsumeVideoFrame(0, 0, 0, kGpuVideoEndOfStream);
return;
}
- int32 frame_id = kGpuVideoInvalidFrameId;
+ int32 frame_id = -1;
for (VideoFrameMap::iterator i = video_frame_map_.begin();
i != video_frame_map_.end(); ++i) {
if (i->second == frame) {
@@ -139,8 +139,12 @@
break;
}
}
- DCHECK_NE(-1, frame_id) << "VideoFrame not recognized";
+ if (frame_id == -1) {
+ NOTREACHED() << "VideoFrame not recognized";
+ return;
+ }
+
SendConsumeVideoFrame(frame_id, frame->GetTimestamp().InMicroseconds(),
frame->GetDuration().InMicroseconds(), 0);
}
« no previous file with comments | « chrome/gpu/gpu_video_decoder.h ('k') | chrome/gpu/gpu_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698