OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 bool IsScreenshare( | 84 bool IsScreenshare( |
85 const VideoContentType& content_type) { | 85 const VideoContentType& content_type) { |
86 return (static_cast<uint8_t>(content_type) & kScreenshareBitsMask) > 0; | 86 return (static_cast<uint8_t>(content_type) & kScreenshareBitsMask) > 0; |
87 } | 87 } |
88 | 88 |
89 bool IsValidContentType(uint8_t value) { | 89 bool IsValidContentType(uint8_t value) { |
90 // Any 6-bit value is allowed. | 90 // Any 6-bit value is allowed. |
91 return value < (1 << kTotalBitsSize); | 91 return value < (1 << kTotalBitsSize); |
92 } | 92 } |
| 93 |
| 94 const char* ToString(const VideoContentType& content_type) { |
| 95 return IsScreenshare(content_type) ? "screen" : "realtime"; |
| 96 } |
93 } // namespace videocontenttypehelpers | 97 } // namespace videocontenttypehelpers |
94 } // namespace webrtc | 98 } // namespace webrtc |
OLD | NEW |