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

Side by Side Diff: media/base/pipeline.cc

Issue 236023003: Add WebMediaPlayer::timelineOffset() support to WebMediaPlayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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/base/pipeline.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 408 }
409 if (!audio_renderer_ && !video_renderer_) { 409 if (!audio_renderer_ && !video_renderer_) {
410 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER); 410 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER);
411 return; 411 return;
412 } 412 }
413 413
414 { 414 {
415 PipelineMetadata metadata; 415 PipelineMetadata metadata;
416 metadata.has_audio = audio_renderer_; 416 metadata.has_audio = audio_renderer_;
417 metadata.has_video = video_renderer_; 417 metadata.has_video = video_renderer_;
418 metadata.timeline_offset = demuxer_->GetWallclockTimelineOffset();
418 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); 419 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO);
419 if (stream) 420 if (stream)
420 metadata.natural_size = stream->video_decoder_config().natural_size(); 421 metadata.natural_size = stream->video_decoder_config().natural_size();
421 metadata_cb_.Run(metadata); 422 metadata_cb_.Run(metadata);
422 } 423 }
423 424
424 return DoInitialPreroll(done_cb); 425 return DoInitialPreroll(done_cb);
425 426
426 case kStarting: 427 case kStarting:
427 return DoPlay(done_cb); 428 return DoPlay(done_cb);
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 928 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
928 lock_.AssertAcquired(); 929 lock_.AssertAcquired();
929 if (!waiting_for_clock_update_) 930 if (!waiting_for_clock_update_)
930 return; 931 return;
931 932
932 waiting_for_clock_update_ = false; 933 waiting_for_clock_update_ = false;
933 clock_->Play(); 934 clock_->Play();
934 } 935 }
935 936
936 } // namespace media 937 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698