 Chromium Code Reviews
 Chromium Code Reviews Issue 2470133002:
  Add function for getting supported H264 level from max resolution and fps  (Closed)
    
  
    Issue 2470133002:
  Add function for getting supported H264 level from max resolution and fps  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 : profile(profile), level(level) {} | 54 : profile(profile), level(level) {} | 
| 55 Profile profile; | 55 Profile profile; | 
| 56 Level level; | 56 Level level; | 
| 57 }; | 57 }; | 
| 58 | 58 | 
| 59 // Parse profile level id that is represented as a string of 3 hex bytes. | 59 // Parse profile level id that is represented as a string of 3 hex bytes. | 
| 60 // Nothing will be returned if the string is not a recognized H264 | 60 // Nothing will be returned if the string is not a recognized H264 | 
| 61 // profile level id. | 61 // profile level id. | 
| 62 rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str); | 62 rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str); | 
| 63 | 63 | 
| 64 // Given the maximum supported frame size (in pixels) and fps, return the | |
| 65 // highest H264 level the encoder/decoder is guaranteed to support, or | |
| 66 // return no level if not even level 1 is supported. | |
| 
hta-webrtc
2016/11/03 14:04:32
This can be made clearer.
Something like:
Given t
 
magjed_webrtc
2016/11/03 14:53:39
You are right about this and I thought about addin
 
magjed_webrtc
2016/11/03 14:54:52
I updated the comment according to your suggestion
 | |
| 67 rtc::Optional<Level> SupportedLevel(int max_frame_pixel_count, int max_fps); | |
| 68 | |
| 64 // Returns canonical string representation as three hex bytes of the profile | 69 // Returns canonical string representation as three hex bytes of the profile | 
| 65 // level id, or returns empty string for invalid profile level id. | 70 // level id, or returns empty string for invalid profile level id. | 
| 66 std::string ProfileLevelIdToString(const ProfileLevelId& profile_level_id); | 71 std::string ProfileLevelIdToString(const ProfileLevelId& profile_level_id); | 
| 67 | 72 | 
| 68 } // namespace H264 | 73 } // namespace H264 | 
| 69 } // namespace webrtc | 74 } // namespace webrtc | 
| 70 | 75 | 
| 71 #endif // WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ | 76 #endif // WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ | 
| OLD | NEW |