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

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

Issue 14217008: Remove reference counting from media::DemuxerStream and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/mock_filters.h ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 base::Bind(&Pipeline::OnAudioUnderflow, this), 924 base::Bind(&Pipeline::OnAudioUnderflow, this),
925 base::Bind(&Pipeline::OnAudioTimeUpdate, this), 925 base::Bind(&Pipeline::OnAudioTimeUpdate, this),
926 base::Bind(&Pipeline::OnAudioRendererEnded, this), 926 base::Bind(&Pipeline::OnAudioRendererEnded, this),
927 base::Bind(&Pipeline::OnAudioDisabled, this), 927 base::Bind(&Pipeline::OnAudioDisabled, this),
928 base::Bind(&Pipeline::SetError, this)); 928 base::Bind(&Pipeline::SetError, this));
929 } 929 }
930 930
931 void Pipeline::InitializeVideoRenderer(const PipelineStatusCB& done_cb) { 931 void Pipeline::InitializeVideoRenderer(const PipelineStatusCB& done_cb) {
932 DCHECK(message_loop_->BelongsToCurrentThread()); 932 DCHECK(message_loop_->BelongsToCurrentThread());
933 933
934 scoped_refptr<DemuxerStream> stream = 934 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO);
935 demuxer_->GetStream(DemuxerStream::VIDEO);
936 935
937 { 936 {
938 // Get an initial natural size so we have something when we signal 937 // Get an initial natural size so we have something when we signal
939 // the kHaveMetadata buffering state. 938 // the kHaveMetadata buffering state.
940 base::AutoLock l(lock_); 939 base::AutoLock l(lock_);
941 natural_size_ = stream->video_decoder_config().natural_size(); 940 natural_size_ = stream->video_decoder_config().natural_size();
942 } 941 }
943 942
944 video_renderer_ = filter_collection_->GetVideoRenderer(); 943 video_renderer_ = filter_collection_->GetVideoRenderer();
945 video_renderer_->Initialize( 944 video_renderer_->Initialize(
(...skipping 25 matching lines...) Expand all
971 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 970 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
972 lock_.AssertAcquired(); 971 lock_.AssertAcquired();
973 if (!waiting_for_clock_update_) 972 if (!waiting_for_clock_update_)
974 return; 973 return;
975 974
976 waiting_for_clock_update_ = false; 975 waiting_for_clock_update_ = false;
977 clock_->Play(); 976 clock_->Play();
978 } 977 }
979 978
980 } // namespace media 979 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698