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 #include <string> |
| 9 |
8 namespace chromecast { | 10 namespace chromecast { |
9 class TaskRunner; | 11 class TaskRunner; |
10 | 12 |
11 namespace media { | 13 namespace media { |
12 | 14 |
13 // Supplies creation parameters to platform-specific pipeline backend. | 15 // Supplies creation parameters to platform-specific pipeline backend. |
14 struct MediaPipelineDeviceParams { | 16 struct MediaPipelineDeviceParams { |
15 enum MediaSyncType { | 17 enum MediaSyncType { |
16 // Default operation, synchronize playback using PTS with higher latency. | 18 // Default operation, synchronize playback using PTS with higher latency. |
17 kModeSyncPts = 0, | 19 kModeSyncPts = 0, |
(...skipping 30 matching lines...) Expand all Loading... |
48 audio_type(kAudioStreamNormal), | 50 audio_type(kAudioStreamNormal), |
49 task_runner(task_runner_in) {} | 51 task_runner(task_runner_in) {} |
50 | 52 |
51 MediaPipelineDeviceParams(MediaSyncType sync_type_in, | 53 MediaPipelineDeviceParams(MediaSyncType sync_type_in, |
52 AudioStreamType audio_type_in, | 54 AudioStreamType audio_type_in, |
53 TaskRunner* task_runner_in) | 55 TaskRunner* task_runner_in) |
54 : sync_type(sync_type_in), | 56 : sync_type(sync_type_in), |
55 audio_type(audio_type_in), | 57 audio_type(audio_type_in), |
56 task_runner(task_runner_in) {} | 58 task_runner(task_runner_in) {} |
57 | 59 |
| 60 // |device_id_in| should be from media/audio/audio_device_description.h or |
| 61 // chromecast/media/base/audio_device_ids.h |
| 62 MediaPipelineDeviceParams(MediaSyncType sync_type_in, |
| 63 AudioStreamType audio_type_in, |
| 64 const std::string& device_id_in, |
| 65 TaskRunner* task_runner_in) |
| 66 : sync_type(sync_type_in), |
| 67 audio_type(audio_type_in), |
| 68 device_id(device_id_in), |
| 69 task_runner(task_runner_in) {} |
| 70 |
58 const MediaSyncType sync_type; | 71 const MediaSyncType sync_type; |
59 const AudioStreamType audio_type; | 72 const AudioStreamType audio_type; |
| 73 const std::string device_id; |
60 | 74 |
61 // task_runner allows backend implementations to post tasks to the media | 75 // 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 | 76 // 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 | 77 // the media thread, this may simplify thread management and safety for |
64 // some backends. | 78 // some backends. |
65 TaskRunner* const task_runner; | 79 TaskRunner* const task_runner; |
66 }; | 80 }; |
67 | 81 |
68 } // namespace media | 82 } // namespace media |
69 } // namespace chromecast | 83 } // namespace chromecast |
70 | 84 |
71 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_ | 85 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_PARAMS_H_ |
OLD | NEW |