ossu | 7bb87ee | 2017-01-23 12:56:25 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 11 | #ifndef API_MEDIA_TYPES_H_ |
| 12 | #define API_MEDIA_TYPES_H_ |
ossu | 7bb87ee | 2017-01-23 12:56:25 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
Mirko Bonadei | 66e7679 | 2019-04-02 09:33:59 | [diff] [blame] | 16 | #include "rtc_base/system/rtc_export.h" |
| 17 | |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 18 | // The cricket and webrtc have separate definitions for what a media type is. |
Björn Terelius | 99261af | 2021-05-12 17:06:49 | [diff] [blame] | 19 | // They're not compatible. Watch out for this. |
Patrik Höglund | b6b29e0 | 2018-06-21 14:58:01 | [diff] [blame] | 20 | |
ossu | 7bb87ee | 2017-01-23 12:56:25 | [diff] [blame] | 21 | namespace cricket { |
| 22 | |
Philipp Hancke | 4e8c115 | 2020-10-13 10:43:15 | [diff] [blame] | 23 | enum MediaType { |
Björn Terelius | 99261af | 2021-05-12 17:06:49 | [diff] [blame] | 24 | MEDIA_TYPE_AUDIO, |
| 25 | MEDIA_TYPE_VIDEO, |
| 26 | MEDIA_TYPE_DATA, |
| 27 | MEDIA_TYPE_UNSUPPORTED |
Philipp Hancke | 4e8c115 | 2020-10-13 10:43:15 | [diff] [blame] | 28 | }; |
ossu | 7bb87ee | 2017-01-23 12:56:25 | [diff] [blame] | 29 | |
Niels Möller | 6dcd4dc | 2019-08-26 08:45:28 | [diff] [blame] | 30 | extern const char kMediaTypeAudio[]; |
| 31 | extern const char kMediaTypeVideo[]; |
| 32 | extern const char kMediaTypeData[]; |
| 33 | |
Mirko Bonadei | 66e7679 | 2019-04-02 09:33:59 | [diff] [blame] | 34 | RTC_EXPORT std::string MediaTypeToString(MediaType type); |
ossu | 7bb87ee | 2017-01-23 12:56:25 | [diff] [blame] | 35 | |
| 36 | } // namespace cricket |
| 37 | |
Björn Terelius | 99261af | 2021-05-12 17:06:49 | [diff] [blame] | 38 | namespace webrtc { |
| 39 | |
| 40 | enum class MediaType { ANY, AUDIO, VIDEO, DATA }; |
| 41 | |
| 42 | } // namespace webrtc |
| 43 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 44 | #endif // API_MEDIA_TYPES_H_ |