Index: media/filters/h264_parser.h |
diff --git a/media/filters/h264_parser.h b/media/filters/h264_parser.h |
index c557383022023dbfacab93e9cc076cf6aab3bd14..64519e8fd7a95eed0bd4fa2f00ddb36c7735c70f 100644 |
--- a/media/filters/h264_parser.h |
+++ b/media/filters/h264_parser.h |
@@ -15,11 +15,17 @@ |
#include <vector> |
#include "base/macros.h" |
+#include "base/optional.h" |
#include "media/base/media_export.h" |
#include "media/base/ranges.h" |
#include "media/base/video_codecs.h" |
#include "media/filters/h264_bit_reader.h" |
+namespace gfx { |
+class Rect; |
+class Size; |
+} |
+ |
namespace media { |
struct SubsampleEntry; |
@@ -166,6 +172,12 @@ struct MEDIA_EXPORT H264SPS { |
bool low_delay_hrd_flag; |
int chroma_array_type; |
+ |
+ // Helpers to compute frequently-used values. These methods return |
+ // base::nullopt if they encounter integer overflow. They do not verify that |
+ // the results are in-spec for the given profile or level. |
+ base::Optional<gfx::Size> GetCodedSize() const; |
+ base::Optional<gfx::Rect> GetVisibleRect() const; |
}; |
struct MEDIA_EXPORT H264PPS { |