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

Side by Side Diff: media/mojo/services/demuxer_stream_provider_shim.cc

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mojo Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/mojo/services/demuxer_stream_provider_shim.h" 5 #include "media/mojo/services/demuxer_stream_provider_shim.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 10
(...skipping 30 matching lines...) Expand all
41 DemuxerStream* DemuxerStreamProviderShim::GetStream(DemuxerStream::Type type) { 41 DemuxerStream* DemuxerStreamProviderShim::GetStream(DemuxerStream::Type type) {
42 DCHECK(demuxer_ready_cb_.is_null()); 42 DCHECK(demuxer_ready_cb_.is_null());
43 for (auto* stream : streams_) { 43 for (auto* stream : streams_) {
44 if (stream->type() == type) 44 if (stream->type() == type)
45 return stream; 45 return stream;
46 } 46 }
47 47
48 return nullptr; 48 return nullptr;
49 } 49 }
50 50
51 DemuxerStreamProvider::Liveness DemuxerStreamProviderShim::GetLiveness() const {
52 // TODO(dalecurtis): This should be removed once liveness lives elsewhere, see
53 // http://crbug.com/420025
54 return DemuxerStreamProvider::LIVENESS_UNKNOWN;
55 }
56
57 void DemuxerStreamProviderShim::OnStreamReady() { 51 void DemuxerStreamProviderShim::OnStreamReady() {
58 if (++streams_ready_ == streams_.size()) 52 if (++streams_ready_ == streams_.size())
59 base::ResetAndReturn(&demuxer_ready_cb_).Run(); 53 base::ResetAndReturn(&demuxer_ready_cb_).Run();
60 } 54 }
61 55
62 } // namespace media 56 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/demuxer_stream_provider_shim.h ('k') | media/mojo/services/media_renderer_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698