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

Unified Diff: media/filters/omx_video_decode_engine.cc

Issue 2441006: fix player_x11 playback problem. (Closed)
Patch Set: Created 10 years, 7 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 | « media/filters/omx_video_decode_engine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/omx_video_decode_engine.cc
diff --git a/media/filters/omx_video_decode_engine.cc b/media/filters/omx_video_decode_engine.cc
index 5af29e652bdf97954c0cdfa54485d9339f6923ec..7f64a505fcb9b53cd436a539aced837b5f6733f1 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();
+
wjia(left Chromium) 2010/06/02 21:44:38 The boundary condition is not clear. The duration
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_) {
« no previous file with comments | « media/filters/omx_video_decode_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698