Index: media/filters/vpx_video_decoder.cc |
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc |
index bf7cc3cdaac32a2c1aa49c5f8d00d362a051ab9b..8c33d6cb66a4455c0f0ac8dec96245b7db3f7efe 100644 |
--- a/media/filters/vpx_video_decoder.cc |
+++ b/media/filters/vpx_video_decoder.cc |
@@ -11,6 +11,7 @@ |
#include "base/bind.h" |
#include "base/callback_helpers.h" |
#include "base/command_line.h" |
+#include "base/debug/trace_event.h" |
#include "base/location.h" |
#include "base/logging.h" |
#include "base/single_thread_task_runner.h" |
@@ -367,11 +368,14 @@ bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer, |
// Pass |buffer| to libvpx. |
int64 timestamp = buffer->timestamp().InMicroseconds(); |
void* user_priv = reinterpret_cast<void*>(×tamp); |
+ |
+ TRACE_EVENT_BEGIN1("video", "vpx_codec_decode", "timestamp", timestamp); |
DaleCurtis
2014/12/03 19:12:16
You can just use TRACE_EVENT_1() and scope it arou
Tom Finegan
2014/12/03 19:33:09
I thought the extra scoping was uglier. :)
Done.
|
vpx_codec_err_t status = vpx_codec_decode(vpx_codec_, |
buffer->data(), |
buffer->data_size(), |
user_priv, |
0); |
+ TRACE_EVENT_END1("video", "vpx_codec_decode", "timestamp", timestamp); |
if (status != VPX_CODEC_OK) { |
LOG(ERROR) << "vpx_codec_decode() failed, status=" << status; |
return false; |
@@ -400,11 +404,15 @@ bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer, |
const uint64 side_data_id = base::NetToHost64( |
*(reinterpret_cast<const uint64*>(buffer->side_data()))); |
if (side_data_id == 1) { |
+ TRACE_EVENT_BEGIN1("video", "vpx_codec_decode_alpha", |
DaleCurtis
2014/12/03 19:12:16
Ditto.
|
+ "timestamp_alpha", timestamp_alpha); |
status = vpx_codec_decode(vpx_codec_alpha_, |
buffer->side_data() + 8, |
buffer->side_data_size() - 8, |
user_priv_alpha, |
0); |
+ TRACE_EVENT_END1("video", "vpx_codec_decode_alpha", |
+ "timestamp_alpha", timestamp_alpha); |
if (status != VPX_CODEC_OK) { |
LOG(ERROR) << "vpx_codec_decode() failed on alpha, status=" << status; |