diff options
author | jiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 22:49:06 +0000 |
---|---|---|
committer | jiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 22:49:06 +0000 |
commit | 4ac6fdbbefe6735c583efb01d1ce98b478fd4c25 (patch) | |
tree | a884390217d6426a7a6a8007cb36f089c58c3100 /media | |
parent | f7eb0933c30336852768df9cc7d97c0bbbb1d86a (diff) | |
download | chromium_src-4ac6fdbbefe6735c583efb01d1ce98b478fd4c25.zip chromium_src-4ac6fdbbefe6735c583efb01d1ce98b478fd4c25.tar.gz chromium_src-4ac6fdbbefe6735c583efb01d1ce98b478fd4c25.tar.bz2 |
time stamp is not used , therefore the player_x11 hangs.
there are also flow control problem. but it is not addressed in this CL.
BUG=None.
Test=dev board.
Review URL: http://codereview.chromium.org/2441006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48786 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/omx_video_decode_engine.cc | 5 | ||||
-rw-r--r-- | media/filters/omx_video_decode_engine.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/media/filters/omx_video_decode_engine.cc b/media/filters/omx_video_decode_engine.cc index 5af29e6..7f64a50 100644 --- a/media/filters/omx_video_decode_engine.cc +++ b/media/filters/omx_video_decode_engine.cc @@ -224,6 +224,10 @@ void OmxVideoDecodeEngine::OnReadComplete(OMX_BUFFERHEADERTYPE* buffer) { buffer->pBuffer + pixels + pixels /4, pixels / 4); + frame->SetTimestamp(base::TimeDelta::FromMilliseconds(buffer->nTimeStamp)); + frame->SetDuration(frame->GetTimestamp() - last_pts_); + last_pts_ = frame->GetTimestamp(); + fill_this_buffer_callback_->Run(frame); } @@ -633,6 +637,7 @@ void OmxVideoDecodeEngine::OnPortEnableEventRun(int port) { DCHECK_EQ(port, output_port_); output_port_state_ = kPortEnabled; + last_pts_ = base::TimeDelta::FromMilliseconds(0); OnPortEnableEventFunc = NULL; InitialFillBuffer(); if (kClientError == client_state_) { diff --git a/media/filters/omx_video_decode_engine.h b/media/filters/omx_video_decode_engine.h index 00fdab1..10f1ead 100644 --- a/media/filters/omx_video_decode_engine.h +++ b/media/filters/omx_video_decode_engine.h @@ -208,6 +208,7 @@ class OmxVideoDecodeEngine : int output_port_; bool output_eos_; bool uses_egl_image_; + base::TimeDelta last_pts_; // |il_state_| records the current component state. During state transition // |expected_il_state_| is the next state that the component will transition |