Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

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: Return rtc::Optional<Level> instead Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c7aeff9f0143e6657883af99ecbf9486f447d84b..bf8ba85a67cdd00fc44a7d1f5e2e996f7b6ac9e0 100644
--- a/webrtc/common_video/h264/profile_level_id.h
+++ b/webrtc/common_video/h264/profile_level_id.h
@@ -61,6 +61,11 @@ struct ProfileLevelId {
// profile level id.
rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str);
+// Given the maximum supported frame size (in pixels) and fps, return the
+// highest H264 level the encoder/decoder is guaranteed to support, or
+// 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
+rtc::Optional<Level> SupportedLevel(int max_frame_pixel_count, int max_fps);
+
// Returns canonical string representation as three hex bytes of the profile
// level id, or returns empty string for invalid profile level id.
std::string ProfileLevelIdToString(const ProfileLevelId& profile_level_id);
« no previous file with comments | « no previous file | webrtc/common_video/h264/profile_level_id.cc » ('j') | webrtc/common_video/h264/profile_level_id.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698