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

Side by Side 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: Change fps type to float 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/common_video/h264/profile_level_id.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 : profile(profile), level(level) {} 53 : profile(profile), level(level) {}
54 Profile profile; 54 Profile profile;
55 Level level; 55 Level level;
56 }; 56 };
57 57
58 // Parse profile level id that is represented as a string of 3 hex bytes. 58 // Parse profile level id that is represented as a string of 3 hex bytes.
59 // Nothing will be returned if the string is not a recognized H264 59 // Nothing will be returned if the string is not a recognized H264
60 // profile level id. 60 // profile level id.
61 rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str); 61 rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str);
62 62
63 // Given that a decoder supports up to a given frame size (in pixels) at up to a
64 // given number of frames per second, return the highest H.264 level where it
65 // can guarantee that it will be able to support all valid encoded streams that
66 // are within that level.
67 rtc::Optional<Level> SupportedLevel(int max_frame_pixel_count, float max_fps);
68
63 // Returns canonical string representation as three hex bytes of the profile 69 // Returns canonical string representation as three hex bytes of the profile
64 // level id, or returns nothing for invalid profile level ids. 70 // level id, or returns nothing for invalid profile level ids.
65 rtc::Optional<std::string> ProfileLevelIdToString( 71 rtc::Optional<std::string> ProfileLevelIdToString(
66 const ProfileLevelId& profile_level_id); 72 const ProfileLevelId& profile_level_id);
67 73
68 } // namespace H264 74 } // namespace H264
69 } // namespace webrtc 75 } // namespace webrtc
70 76
71 #endif // WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ 77 #endif // WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_
OLDNEW
« 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
This is Rietveld 408576698