OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 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 #ifndef WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ |
| 12 #define WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ |
| 13 |
| 14 #include "webrtc/base/optional.h" |
| 15 |
| 16 namespace webrtc { |
| 17 namespace H264 { |
| 18 |
| 19 enum Profile { |
| 20 kProfileConstrainedBaseline, |
| 21 kProfileBaseline, |
| 22 kProfileMain, |
| 23 kProfileConstrainedHigh, |
| 24 kProfileHigh, |
| 25 }; |
| 26 |
| 27 // All values are equal to ten times the level number, except level 1b which is |
| 28 // special. |
| 29 enum Level { |
| 30 kLevel1_b = 0, |
| 31 kLevel1 = 10, |
| 32 kLevel1_1 = 11, |
| 33 kLevel1_2 = 12, |
| 34 kLevel1_3 = 13, |
| 35 kLevel2 = 20, |
| 36 kLevel2_1 = 21, |
| 37 kLevel2_2 = 22, |
| 38 kLevel3 = 30, |
| 39 kLevel3_1 = 31, |
| 40 kLevel3_2 = 32, |
| 41 kLevel4 = 40, |
| 42 kLevel4_1 = 41, |
| 43 kLevel4_2 = 42, |
| 44 kLevel5 = 50, |
| 45 kLevel5_1 = 51, |
| 46 kLevel5_2 = 52 |
| 47 }; |
| 48 |
| 49 struct ProfileLevelId { |
| 50 Profile profile; |
| 51 Level level; |
| 52 }; |
| 53 |
| 54 // Parse profile level id that is represented as a string of 3 hex bytes. |
| 55 // Nothing will be returned if the string is not a recognized H264 |
| 56 // profile level id. |
| 57 rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str); |
| 58 |
| 59 } // namespace H264 |
| 60 } // namespace webrtc |
| 61 |
| 62 #endif // WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ |
OLD | NEW |