blob: 64e2ebc286049c4934bb5051a8d7a5854a6a5da6 [file] [log] [blame]
ossu7bb87ee2017-01-23 04:56:25 -08001/*
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 09:11:00 -080011#ifndef API_MEDIA_TYPES_H_
12#define API_MEDIA_TYPES_H_
ossu7bb87ee2017-01-23 04:56:25 -080013
14#include <string>
15
Patrik Höglundb6b29e02018-06-21 16:58:01 +020016// The cricket and webrtc have separate definitions for what a media type is.
17// They're not compatible. Watch out for this.
18
ossu7bb87ee2017-01-23 04:56:25 -080019namespace cricket {
20
Yves Gerey665174f2018-06-19 15:03:05 +020021enum MediaType { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO, MEDIA_TYPE_DATA };
ossu7bb87ee2017-01-23 04:56:25 -080022
23std::string MediaTypeToString(MediaType type);
deadbeefe814a0d2017-02-25 18:15:09 -080024// Aborts on invalid string. Only expected to be used on strings that are
25// guaranteed to be valid, such as MediaStreamTrackInterface::kind().
26MediaType MediaTypeFromString(const std::string& type_str);
ossu7bb87ee2017-01-23 04:56:25 -080027
28} // namespace cricket
29
Patrik Höglundb6b29e02018-06-21 16:58:01 +020030namespace webrtc {
31
32enum class MediaType { ANY, AUDIO, VIDEO, DATA };
33
34} // namespace webrtc
35
Steve Anton10542f22019-01-11 09:11:00 -080036#endif // API_MEDIA_TYPES_H_