Chromium Code Reviews

Unified Diff: webrtc/common_video/h264/profile_level_id.h

Issue 2470133002: Add function for getting supported H264 level from max resolution and fps (Closed)
Patch Set: Improve comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | webrtc/common_video/h264/profile_level_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/h264/profile_level_id.h
diff --git a/webrtc/common_video/h264/profile_level_id.h b/webrtc/common_video/h264/profile_level_id.h
index 44292631cb51212c55d86d598d738d9c276c9c8e..59f297a8669dd327ba9d1e7d637026a1cb054ca5 100644
--- a/webrtc/common_video/h264/profile_level_id.h
+++ b/webrtc/common_video/h264/profile_level_id.h
@@ -60,6 +60,12 @@ struct ProfileLevelId {
// profile level id.
rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str);
+// Given that a decoder supports up to a given frame size (in pixels) at up to a
+// given number of frames per second, return the highest H.264 level where it
+// can guarantee that it will be able to support all valid encoded streams that
+// are within that level.
+rtc::Optional<Level> SupportedLevel(int max_frame_pixel_count, int max_fps);
hta-webrtc 2016/11/08 09:21:16 Suggest using a float or double for max_fps. The c
magjed_webrtc 2016/11/08 10:29:23 Done, changed to float.
+
// Returns canonical string representation as three hex bytes of the profile
// level id, or returns nothing for invalid profile level ids.
rtc::Optional<std::string> ProfileLevelIdToString(
« no previous file with comments | « no previous file | webrtc/common_video/h264/profile_level_id.cc » ('j') | no next file with comments »

Powered by Google App Engine