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 #ifndef CHROMECAST_PUBLIC_MEDIA_MEDIA_PIPELINE_DEVICE_PARAMS_H_ | 5 #ifndef CHROMECAST_PUBLIC_MEDIA_MEDIA_PIPELINE_DEVICE_PARAMS_H_ |
6 #define CHROMECAST_PUBLIC_MEDIA_MEDIA_PIPELINE_DEVICE_PARAMS_H_ | 6 #define CHROMECAST_PUBLIC_MEDIA_MEDIA_PIPELINE_DEVICE_PARAMS_H_ |
7 | 7 |
8 namespace chromecast { | 8 namespace chromecast { |
9 class TaskRunner; | 9 class TaskRunner; |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 audio_type(kAudioStreamNormal), | 48 audio_type(kAudioStreamNormal), |
49 task_runner(task_runner_in) {} | 49 task_runner(task_runner_in) {} |
50 | 50 |
51 MediaPipelineDeviceParams(MediaSyncType sync_type_in, | 51 MediaPipelineDeviceParams(MediaSyncType sync_type_in, |
52 AudioStreamType audio_type_in, | 52 AudioStreamType audio_type_in, |
53 TaskRunner* task_runner_in) | 53 TaskRunner* task_runner_in) |
54 : sync_type(sync_type_in), | 54 : sync_type(sync_type_in), |
55 audio_type(audio_type_in), | 55 audio_type(audio_type_in), |
56 task_runner(task_runner_in) {} | 56 task_runner(task_runner_in) {} |
57 | 57 |
| 58 // |device_id_in| should be from media/audio/audio_device_description.h or |
| 59 // chromecast/media/base/audio_device_ids.h |
| 60 MediaPipelineDeviceParams(MediaSyncType sync_type_in, |
| 61 AudioStreamType audio_type_in, |
| 62 const std::string& device_id_in, |
| 63 TaskRunner* task_runner_in) |
| 64 : sync_type(sync_type_in), |
| 65 audio_type(audio_type_in), |
| 66 device_id(device_id_in), |
| 67 task_runner(task_runner_in) {} |
| 68 |
58 const MediaSyncType sync_type; | 69 const MediaSyncType sync_type; |
59 const AudioStreamType audio_type; | 70 const AudioStreamType audio_type; |
| 71 const std::string device_id; |
60 | 72 |
61 // task_runner allows backend implementations to post tasks to the media | 73 // task_runner allows backend implementations to post tasks to the media |
62 // thread. Since all calls from cast_shell into the backend are made on | 74 // thread. Since all calls from cast_shell into the backend are made on |
63 // the media thread, this may simplify thread management and safety for | 75 // the media thread, this may simplify thread management and safety for |
64 // some backends. | 76 // some backends. |
65 TaskRunner* const task_runner; | 77 TaskRunner* const task_runner; |
66 }; | 78 }; |
67 | 79 |
68 } // namespace media | 80 } // namespace media |
69 } // namespace chromecast | 81 } // namespace chromecast |
70 | 82 |
71 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_ | 83 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_ |
OLD | NEW |