OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 media_pipeline_.reset(new MediaPipelineImpl()); | 64 media_pipeline_.reset(new MediaPipelineImpl()); |
65 task_runner_.reset(new TaskRunnerImpl()); | 65 task_runner_.reset(new TaskRunnerImpl()); |
66 MediaPipelineDeviceParams::MediaSyncType sync_type = | 66 MediaPipelineDeviceParams::MediaSyncType sync_type = |
67 (load_type == kLoadTypeMediaStream) | 67 (load_type == kLoadTypeMediaStream) |
68 ? MediaPipelineDeviceParams::kModeIgnorePts | 68 ? MediaPipelineDeviceParams::kModeIgnorePts |
69 : MediaPipelineDeviceParams::kModeSyncPts; | 69 : MediaPipelineDeviceParams::kModeSyncPts; |
70 MediaPipelineDeviceParams default_parameters(sync_type, task_runner_.get()); | 70 MediaPipelineDeviceParams default_parameters(sync_type, task_runner_.get()); |
71 | 71 |
72 media_pipeline_->SetClient(client); | 72 media_pipeline_->SetClient(client); |
73 media_pipeline_->Initialize(load_type, | 73 media_pipeline_->Initialize(load_type, |
74 create_backend_cb.Run(default_parameters)); | 74 create_backend_cb.Run(default_parameters, 0)); |
75 } | 75 } |
76 | 76 |
77 void MediaPipelineHost::SetAvPipe( | 77 void MediaPipelineHost::SetAvPipe( |
78 TrackId track_id, | 78 TrackId track_id, |
79 std::unique_ptr<base::SharedMemory> shared_mem, | 79 std::unique_ptr<base::SharedMemory> shared_mem, |
80 const base::Closure& pipe_read_activity_cb, | 80 const base::Closure& pipe_read_activity_cb, |
81 const base::Closure& av_pipe_set_cb) { | 81 const base::Closure& av_pipe_set_cb) { |
82 DCHECK(thread_checker_.CalledOnValidThread()); | 82 DCHECK(thread_checker_.CalledOnValidThread()); |
83 CHECK(track_id == kAudioTrackId || track_id == kVideoTrackId); | 83 CHECK(track_id == kAudioTrackId || track_id == kVideoTrackId); |
84 | 84 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |