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

Side by Side Diff: media/filters/decrypting_audio_decoder.cc

Issue 265943002: Revert of Remove AudioBuffer::set_duration(), instead base on frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/filters/decrypting_audio_decoder.h" 5 #include "media/filters/decrypting_audio_decoder.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 base::TimeDelta current_time = timestamp_helper_->GetTimestamp(); 365 base::TimeDelta current_time = timestamp_helper_->GetTimestamp();
366 if (IsOutOfSync(current_time, frame->timestamp())) { 366 if (IsOutOfSync(current_time, frame->timestamp())) {
367 DVLOG(1) << "Timestamp returned by the decoder (" 367 DVLOG(1) << "Timestamp returned by the decoder ("
368 << frame->timestamp().InMilliseconds() << " ms)" 368 << frame->timestamp().InMilliseconds() << " ms)"
369 << " does not match the input timestamp and number of samples" 369 << " does not match the input timestamp and number of samples"
370 << " decoded (" << current_time.InMilliseconds() << " ms)."; 370 << " decoded (" << current_time.InMilliseconds() << " ms).";
371 } 371 }
372 372
373 frame->set_timestamp(current_time); 373 frame->set_timestamp(current_time);
374 frame->set_duration(
375 timestamp_helper_->GetFrameDuration(frame->frame_count()));
374 timestamp_helper_->AddFrames(frame->frame_count()); 376 timestamp_helper_->AddFrames(frame->frame_count());
375 } 377 }
376 } 378 }
377 379
378 } // namespace media 380 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl_unittest.cc ('k') | media/filters/decrypting_audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698