blob: 2f9e74c65fbeb56ed7dd91c93d594563a5855dfb [file] [log] [blame]
ossu7bb87ee2017-01-23 12:56:251/*
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 Anton10542f22019-01-11 17:11:0011#ifndef API_MEDIA_TYPES_H_
12#define API_MEDIA_TYPES_H_
ossu7bb87ee2017-01-23 12:56:2513
14#include <string>
15
Mirko Bonadei66e76792019-04-02 09:33:5916#include "rtc_base/system/rtc_export.h"
17
Patrik Höglundb6b29e02018-06-21 14:58:0118// The cricket and webrtc have separate definitions for what a media type is.
19// They're not compatible. Watch out for this.
20
ossu7bb87ee2017-01-23 12:56:2521namespace cricket {
22
Yves Gerey665174f2018-06-19 13:03:0523enum MediaType { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO, MEDIA_TYPE_DATA };
ossu7bb87ee2017-01-23 12:56:2524
Mirko Bonadei66e76792019-04-02 09:33:5925RTC_EXPORT std::string MediaTypeToString(MediaType type);
deadbeefe814a0d2017-02-26 02:15:0926// Aborts on invalid string. Only expected to be used on strings that are
27// guaranteed to be valid, such as MediaStreamTrackInterface::kind().
28MediaType MediaTypeFromString(const std::string& type_str);
ossu7bb87ee2017-01-23 12:56:2529
30} // namespace cricket
31
Patrik Höglundb6b29e02018-06-21 14:58:0132namespace webrtc {
33
34enum class MediaType { ANY, AUDIO, VIDEO, DATA };
35
36} // namespace webrtc
37
Steve Anton10542f22019-01-11 17:11:0038#endif // API_MEDIA_TYPES_H_