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

Unified Diff: media/filters/decrypting_video_decoder.cc

Issue 11360042: Encrypted Media: Add TRACE_EVENT to trace eme implementation performance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use uint32 for the trace_id_ Created 8 years, 1 month 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/decrypting_video_decoder.h ('k') | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_video_decoder.cc
diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc
index cd93330262844ebe2a2478ca381293b287746eb2..f7ba299b5bae5eec8c9e11ffc6e6be8c8636322c 100644
--- a/media/filters/decrypting_video_decoder.cc
+++ b/media/filters/decrypting_video_decoder.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
+#include "base/debug/trace_event.h"
#include "base/location.h"
#include "base/message_loop_proxy.h"
#include "media/base/bind_to_loop.h"
@@ -28,7 +29,8 @@ DecryptingVideoDecoder::DecryptingVideoDecoder(
state_(kUninitialized),
request_decryptor_notification_cb_(request_decryptor_notification_cb),
decryptor_(NULL),
- key_added_while_pending_decode_(false) {
+ key_added_while_pending_decode_(false),
+ trace_id_(0) {
}
void DecryptingVideoDecoder::Initialize(
@@ -290,6 +292,8 @@ void DecryptingVideoDecoder::DoDecryptAndDecodeBuffer(
void DecryptingVideoDecoder::DecodePendingBuffer() {
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK_EQ(state_, kPendingDecode) << state_;
+ TRACE_EVENT_ASYNC_BEGIN0(
+ "eme", "DecryptingVideoDecoder::DecodePendingBuffer", ++trace_id_);
decryptor_->DecryptAndDecodeVideo(
pending_buffer_to_decode_,
base::Bind(&DecryptingVideoDecoder::DeliverFrame, this,
@@ -315,6 +319,8 @@ void DecryptingVideoDecoder::DoDeliverFrame(
const scoped_refptr<VideoFrame>& frame) {
DVLOG(3) << "DoDeliverFrame() - status: " << status;
DCHECK(message_loop_->BelongsToCurrentThread());
+ TRACE_EVENT_ASYNC_END0(
+ "eme", "DecryptingVideoDecoder::DecodePendingBuffer", trace_id_);
if (state_ == kStopped)
return;
« no previous file with comments | « media/filters/decrypting_video_decoder.h ('k') | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698