Anton Sukhanov | 4f08faa | 2019-05-21 11:12:57 -0700 | [diff] [blame^] | 1 | /* Copyright 2018 The WebRTC project authors. All Rights Reserved. |
| 2 | * |
| 3 | * Use of this source code is governed by a BSD-style license |
| 4 | * that can be found in the LICENSE file in the root of the source |
| 5 | * tree. An additional intellectual property rights grant can be found |
| 6 | * in the file PATENTS. All contributing project authors may |
| 7 | * be found in the AUTHORS file in the root of the source tree. |
| 8 | */ |
| 9 | #ifndef API_MEDIA_TRANSPORT_CONFIG_H_ |
| 10 | #define API_MEDIA_TRANSPORT_CONFIG_H_ |
| 11 | |
| 12 | #include <memory> |
| 13 | #include <string> |
| 14 | #include <utility> |
| 15 | |
| 16 | namespace webrtc { |
| 17 | |
| 18 | class MediaTransportInterface; |
| 19 | |
| 20 | // MediaTransportConfig contains meida transport (if provided) and passed from |
| 21 | // PeerConnection to call obeject and media layers that require access to media |
| 22 | // transport. In the future we can add other transport (for example, datagram |
| 23 | // transport) and related configuration. |
| 24 | struct MediaTransportConfig { |
| 25 | // Default constructor for no-media transport scenarios. |
| 26 | MediaTransportConfig() = default; |
| 27 | |
| 28 | // TODO(sukhanov): Consider adding RtpTransport* to MediaTransportConfig, |
| 29 | // because it's almost always passes along with media_transport. |
| 30 | // Does not own media_transport. |
| 31 | explicit MediaTransportConfig(MediaTransportInterface* media_transport) |
| 32 | : media_transport(media_transport) {} |
| 33 | |
| 34 | std::string DebugString() const; |
| 35 | |
| 36 | // If provided, all media is sent through media_transport. |
| 37 | MediaTransportInterface* media_transport = nullptr; |
| 38 | }; |
| 39 | |
| 40 | } // namespace webrtc |
| 41 | |
| 42 | #endif // API_MEDIA_TRANSPORT_CONFIG_H_ |