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

Side by Side Diff: media/base/android/video_decoder_job.cc

Issue 215783002: Fix an issue that audio and video may run out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing acolwell's comments Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/android/video_decoder_job.h" 5 #include "media/base/android/video_decoder_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/base/android/media_codec_bridge.h" 10 #include "media/base/android/media_codec_bridge.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 VideoDecoderJob::~VideoDecoderJob() { 58 VideoDecoderJob::~VideoDecoderJob() {
59 release_resources_cb_.Run(); 59 release_resources_cb_.Run();
60 } 60 }
61 61
62 void VideoDecoderJob::ReleaseOutputBuffer( 62 void VideoDecoderJob::ReleaseOutputBuffer(
63 int output_buffer_index, 63 int output_buffer_index,
64 size_t size, 64 size_t size,
65 bool render_output, 65 bool render_output,
66 base::TimeDelta current_presentation_timestamp,
66 const ReleaseOutputCompletionCallback& callback) { 67 const ReleaseOutputCompletionCallback& callback) {
67 video_codec_bridge_->ReleaseOutputBuffer(output_buffer_index, render_output); 68 video_codec_bridge_->ReleaseOutputBuffer(output_buffer_index, render_output);
68 callback.Run(0u); 69 callback.Run(current_presentation_timestamp, current_presentation_timestamp);
69 } 70 }
70 71
71 bool VideoDecoderJob::ComputeTimeToRender() const { 72 bool VideoDecoderJob::ComputeTimeToRender() const {
72 return true; 73 return true;
73 } 74 }
74 75
75 } // namespace media 76 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698