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 84f0005785bb04c2394d07d37a3f4b09bb45a81d..44292631cb51212c55d86d598d738d9c276c9c8e 100644 |
--- a/webrtc/common_video/h264/profile_level_id.h |
+++ b/webrtc/common_video/h264/profile_level_id.h |
@@ -11,6 +11,8 @@ |
#ifndef WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ |
#define WEBRTC_COMMON_VIDEO_H264_PROFILE_LEVEL_ID_H_ |
+#include <string> |
+ |
#include "webrtc/base/optional.h" |
namespace webrtc { |
@@ -47,6 +49,8 @@ enum Level { |
}; |
struct ProfileLevelId { |
+ ProfileLevelId(Profile profile, Level level) |
+ : profile(profile), level(level) {} |
Profile profile; |
Level level; |
}; |
@@ -56,6 +60,11 @@ struct ProfileLevelId { |
// profile level id. |
rtc::Optional<ProfileLevelId> ParseProfileLevelId(const char* str); |
+// 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( |
+ const ProfileLevelId& profile_level_id); |
+ |
} // namespace H264 |
} // namespace webrtc |