| 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 | |
| 69 const MediaSyncType sync_type; | 58 const MediaSyncType sync_type; |
| 70 const AudioStreamType audio_type; | 59 const AudioStreamType audio_type; |
| 71 const std::string device_id; | |
| 72 | 60 |
| 73 // task_runner allows backend implementations to post tasks to the media | 61 // task_runner allows backend implementations to post tasks to the media |
| 74 // thread. Since all calls from cast_shell into the backend are made on | 62 // thread. Since all calls from cast_shell into the backend are made on |
| 75 // the media thread, this may simplify thread management and safety for | 63 // the media thread, this may simplify thread management and safety for |
| 76 // some backends. | 64 // some backends. |
| 77 TaskRunner* const task_runner; | 65 TaskRunner* const task_runner; |
| 78 }; | 66 }; |
| 79 | 67 |
| 80 } // namespace media | 68 } // namespace media |
| 81 } // namespace chromecast | 69 } // namespace chromecast |
| 82 | 70 |
| 83 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_ | 71 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_ |
| OLD | NEW |