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

Unified Diff: content/renderer/pepper/pepper_video_destination_host.cc

Issue 631903003: Move VideoDestinationHandler processing to the IO-thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 2 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 | « content/renderer/pepper/pepper_video_destination_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_video_destination_host.cc
diff --git a/content/renderer/pepper/pepper_video_destination_host.cc b/content/renderer/pepper/pepper_video_destination_host.cc
index 5254374b1b0fbc5d7777af479cfb94dbac5091ca..3c2ee23b84a1aa1d0c387044bc276eb0023b4e4f 100644
--- a/content/renderer/pepper/pepper_video_destination_host.cc
+++ b/content/renderer/pepper/pepper_video_destination_host.cc
@@ -50,11 +50,9 @@ int32_t PepperVideoDestinationHost::OnHostMsgOpen(
if (!gurl.is_valid())
return PP_ERROR_BADARGUMENT;
- FrameWriterInterface* frame_writer = NULL;
if (!VideoDestinationHandler::Open(
- NULL /* registry */, gurl.spec(), &frame_writer))
+ NULL /* registry */, gurl.spec(), &frame_writer_))
return PP_ERROR_FAILED;
- frame_writer_.reset(frame_writer);
ReplyMessageContext reply_context = context->MakeReplyMessageContext();
reply_context.params.set_result(PP_OK);
@@ -66,6 +64,7 @@ int32_t PepperVideoDestinationHost::OnHostMsgPutFrame(
HostMessageContext* context,
const ppapi::HostResource& image_data_resource,
PP_TimeTicks timestamp) {
+ TRACE_EVENT0("video", "PepperVideoDestinationHost::OnHostMsgPutFrame");
ppapi::thunk::EnterResourceNoLock<ppapi::thunk::PPB_ImageData_API> enter(
image_data_resource.host_resource(), true);
if (enter.failed())
@@ -77,7 +76,7 @@ int32_t PepperVideoDestinationHost::OnHostMsgPutFrame(
image_data_impl->format()))
return PP_ERROR_BADARGUMENT;
- if (!frame_writer_.get())
+ if (frame_writer_.is_null())
return PP_ERROR_FAILED;
// Convert PP_TimeTicks (a double, in seconds) to a TimeDelta (int64,
@@ -87,14 +86,14 @@ int32_t PepperVideoDestinationHost::OnHostMsgPutFrame(
base::Time::FromDoubleT(timestamp) - base::Time();
int64_t timestamp_ns =
time_delta.InMicroseconds() * base::Time::kNanosecondsPerMicrosecond;
- frame_writer_->PutFrame(image_data_impl, timestamp_ns);
+ frame_writer_.Run(image_data_impl, timestamp_ns);
return PP_OK;
}
int32_t PepperVideoDestinationHost::OnHostMsgClose(
HostMessageContext* context) {
- frame_writer_.reset(NULL);
+ frame_writer_.Reset();
return PP_OK;
}
« no previous file with comments | « content/renderer/pepper/pepper_video_destination_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698