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

Side by Side Diff: chromecast/browser/media/media_pipeline_host.cc

Issue 1306843003: CmaMediaPipelineClient to watch media pipeline status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Doc Created 5 years, 3 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
« no previous file with comments | « chromecast/browser/media/cma_message_filter_host.cc ('k') | chromecast/chromecast.gyp » ('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 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 "chromecast/browser/media/media_pipeline_host.h" 5 #include "chromecast/browser/media/media_pipeline_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const CreateDeviceComponentsCB& create_device_components_cb) { 59 const CreateDeviceComponentsCB& create_device_components_cb) {
60 DCHECK(thread_checker_.CalledOnValidThread()); 60 DCHECK(thread_checker_.CalledOnValidThread());
61 media_pipeline_.reset(new MediaPipelineImpl()); 61 media_pipeline_.reset(new MediaPipelineImpl());
62 task_runner_.reset(new TaskRunnerImpl()); 62 task_runner_.reset(new TaskRunnerImpl());
63 MediaPipelineDeviceParams::MediaSyncType sync_type = 63 MediaPipelineDeviceParams::MediaSyncType sync_type =
64 (load_type == kLoadTypeMediaStream) 64 (load_type == kLoadTypeMediaStream)
65 ? MediaPipelineDeviceParams::kModeIgnorePts 65 ? MediaPipelineDeviceParams::kModeIgnorePts
66 : MediaPipelineDeviceParams::kModeSyncPts; 66 : MediaPipelineDeviceParams::kModeSyncPts;
67 MediaPipelineDeviceParams default_parameters(sync_type, task_runner_.get()); 67 MediaPipelineDeviceParams default_parameters(sync_type, task_runner_.get());
68 68
69 media_pipeline_->SetClient(client);
69 media_pipeline_->Initialize( 70 media_pipeline_->Initialize(
70 load_type, create_device_components_cb.Run(default_parameters).Pass()); 71 load_type, create_device_components_cb.Run(default_parameters).Pass());
71 media_pipeline_->SetClient(client);
72 } 72 }
73 73
74 void MediaPipelineHost::SetAvPipe( 74 void MediaPipelineHost::SetAvPipe(
75 TrackId track_id, 75 TrackId track_id,
76 scoped_ptr<base::SharedMemory> shared_mem, 76 scoped_ptr<base::SharedMemory> shared_mem,
77 const base::Closure& pipe_read_activity_cb, 77 const base::Closure& pipe_read_activity_cb,
78 const base::Closure& av_pipe_set_cb) { 78 const base::Closure& av_pipe_set_cb) {
79 DCHECK(thread_checker_.CalledOnValidThread()); 79 DCHECK(thread_checker_.CalledOnValidThread());
80 CHECK(track_id == kAudioTrackId || track_id == kVideoTrackId); 80 CHECK(track_id == kAudioTrackId || track_id == kVideoTrackId);
81 81
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (it == media_track_map_.end()) 171 if (it == media_track_map_.end())
172 return; 172 return;
173 173
174 MediaTrackHost* media_track_host = it->second; 174 MediaTrackHost* media_track_host = it->second;
175 if (!media_track_host->pipe_write_cb.is_null()) 175 if (!media_track_host->pipe_write_cb.is_null())
176 media_track_host->pipe_write_cb.Run(); 176 media_track_host->pipe_write_cb.Run();
177 } 177 }
178 178
179 } // namespace media 179 } // namespace media
180 } // namespace chromecast 180 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/media/cma_message_filter_host.cc ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698