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 11 #include "api/media_types.h" 12 13 #include "rtc_base/checks.h" 14 15 namespace cricket { 16 17 const char kMediaTypeVideo[] = "video"; 18 const char kMediaTypeAudio[] = "audio"; 19 const char kMediaTypeData[] = "data"; 20 MediaTypeToString(MediaType type)21std::string MediaTypeToString(MediaType type) { 22 switch (type) { 23 case MEDIA_TYPE_AUDIO: 24 return kMediaTypeAudio; 25 case MEDIA_TYPE_VIDEO: 26 return kMediaTypeVideo; 27 case MEDIA_TYPE_DATA: 28 return kMediaTypeData; 29 } 30 FATAL(); 31 // Not reachable; avoids compile warning. 32 return ""; 33 } 34 35 } // namespace cricket 36