ossu | 7bb87ee | 2017-01-23 04:56:25 -0800 | [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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef API_MEDIATYPES_H_ |
| 12 | #define API_MEDIATYPES_H_ |
ossu | 7bb87ee | 2017-01-23 04:56:25 -0800 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
| 16 | namespace cricket { |
| 17 | |
| 18 | enum MediaType { |
| 19 | MEDIA_TYPE_AUDIO, |
| 20 | MEDIA_TYPE_VIDEO, |
| 21 | MEDIA_TYPE_DATA |
| 22 | }; |
| 23 | |
| 24 | std::string MediaTypeToString(MediaType type); |
deadbeef | e814a0d | 2017-02-25 18:15:09 -0800 | [diff] [blame] | 25 | // Aborts on invalid string. Only expected to be used on strings that are |
| 26 | // guaranteed to be valid, such as MediaStreamTrackInterface::kind(). |
| 27 | MediaType MediaTypeFromString(const std::string& type_str); |
ossu | 7bb87ee | 2017-01-23 04:56:25 -0800 | [diff] [blame] | 28 | |
| 29 | } // namespace cricket |
| 30 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 31 | #endif // API_MEDIATYPES_H_ |