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

Unified Diff: content/common/gpu/media/omx_video_decode_accelerator.cc

Issue 7587008: Adding traces to OmxVideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more traces Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/omx_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/omx_video_decode_accelerator.cc b/content/common/gpu/media/omx_video_decode_accelerator.cc
index f2e79812ccfe2d4ca0f61c1137cd22dc2bf4768b..8deae49f3b14ea8bd2b43d21be60233cfb552dab 100644
--- a/content/common/gpu/media/omx_video_decode_accelerator.cc
+++ b/content/common/gpu/media/omx_video_decode_accelerator.cc
@@ -4,6 +4,7 @@
#include "content/common/gpu/media/omx_video_decode_accelerator.h"
+#include "base/debug/trace_event.h"
#include "base/stl_util.h"
#include "base/string_util.h"
#include "content/common/gpu/gpu_channel.h"
@@ -277,6 +278,8 @@ bool OmxVideoDecodeAccelerator::CreateComponent() {
void OmxVideoDecodeAccelerator::Decode(
const media::BitstreamBuffer& bitstream_buffer) {
+ TRACE_EVENT1("Video Decoder", "OVDA::Decode",
+ "Buffer id", bitstream_buffer.id());
DCHECK_EQ(message_loop_, MessageLoop::current());
DCHECK(!free_input_buffers_.empty());
@@ -353,6 +356,8 @@ void OmxVideoDecodeAccelerator::AssignPictureBuffers(
}
void OmxVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
+ TRACE_EVENT1("Video Decoder", "OVDA::ReusePictureBuffer",
+ "Picture id", picture_buffer_id);
DCHECK_EQ(message_loop_, MessageLoop::current());
RETURN_ON_FAILURE(CanFillBuffer(), "Can't fill buffer", ILLEGAL_STATE,);
@@ -736,6 +741,12 @@ void OmxVideoDecodeAccelerator::OnOutputPortEnabled() {
void OmxVideoDecodeAccelerator::FillBufferDoneTask(
OMX_BUFFERHEADERTYPE* buffer) {
+ media::Picture* picture =
+ reinterpret_cast<media::Picture*>(buffer->pAppPrivate);
+ int picture_buffer_id = picture ? picture->picture_buffer_id() : -1;
+ TRACE_EVENT2("Video Decoder", "OVDA::FillBufferDoneTask",
+ "Buffer id", buffer->nTimeStamp,
+ "Picture id", picture_buffer_id);
DCHECK_EQ(message_loop_, MessageLoop::current());
DCHECK_GT(output_buffers_at_component_, 0);
--output_buffers_at_component_;
@@ -755,11 +766,6 @@ void OmxVideoDecodeAccelerator::FillBufferDoneTask(
saw_eos_during_flush_ = true;
}
- DCHECK(buffer->pAppPrivate);
- media::Picture* picture =
- reinterpret_cast<media::Picture*>(buffer->pAppPrivate);
- int picture_buffer_id = picture->picture_buffer_id();
-
// During the transition from Executing to Idle, and during port-flushing, all
// pictures are sent back through here. Avoid giving them to the client.
// Also avoid sending the (fake) EOS buffer to the client.
@@ -771,6 +777,7 @@ void OmxVideoDecodeAccelerator::FillBufferDoneTask(
return;
}
+ DCHECK(picture);
// See Decode() for an explanation of this abuse of nTimeStamp.
picture->set_bitstream_buffer_id(buffer->nTimeStamp);
if (client_)
@@ -779,6 +786,8 @@ void OmxVideoDecodeAccelerator::FillBufferDoneTask(
void OmxVideoDecodeAccelerator::EmptyBufferDoneTask(
OMX_BUFFERHEADERTYPE* buffer) {
+ TRACE_EVENT1("Video Decoder", "OVDA::EmptyBufferDoneTask",
+ "Buffer id", buffer->nTimeStamp);
DCHECK_EQ(message_loop_, MessageLoop::current());
DCHECK_GT(input_buffers_at_component_, 0);
free_input_buffers_.push(buffer);
@@ -969,6 +978,8 @@ OMX_ERRORTYPE OmxVideoDecodeAccelerator::EmptyBufferCallback(
OMX_HANDLETYPE component,
OMX_PTR priv_data,
OMX_BUFFERHEADERTYPE* buffer) {
+ TRACE_EVENT1("Video Decoder", "OVDA::EmptyBufferCallback",
+ "Buffer id", buffer->nTimeStamp);
// Called on the OMX thread.
OmxVideoDecodeAccelerator* decoder =
static_cast<OmxVideoDecodeAccelerator*>(priv_data);
@@ -986,6 +997,12 @@ OMX_ERRORTYPE OmxVideoDecodeAccelerator::FillBufferCallback(
OMX_HANDLETYPE component,
OMX_PTR priv_data,
OMX_BUFFERHEADERTYPE* buffer) {
+ media::Picture* picture =
+ reinterpret_cast<media::Picture*>(buffer->pAppPrivate);
+ int picture_buffer_id = picture ? picture->picture_buffer_id() : -1;
+ TRACE_EVENT2("Video Decoder", "OVDA::FillBufferCallback",
+ "Buffer id", buffer->nTimeStamp,
+ "Picture id", picture_buffer_id);
// Called on the OMX thread.
OmxVideoDecodeAccelerator* decoder =
static_cast<OmxVideoDecodeAccelerator*>(priv_data);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698