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

Unified Diff: media/video/picture.h

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 months 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
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/video/picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/picture.h
diff --git a/media/video/picture.h b/media/video/picture.h
index 5ec3c55d9c8d4bf61fe1abcf5054bfd42b03db0f..13d7c9070df18548e8598871cf6027589bf405f6 100644
--- a/media/video/picture.h
+++ b/media/video/picture.h
@@ -35,6 +35,7 @@ class MEDIA_EXPORT PictureBuffer {
gfx::Size size() const {
return size_;
}
+ void set_size(const gfx::Size& size) { size_ = size; }
// Returns the id of the texture.
// NOTE: The texture id in the renderer process corresponds to a different
@@ -59,6 +60,8 @@ class MEDIA_EXPORT PictureBuffer {
// This is the media-namespace equivalent of PP_Picture_Dev.
class MEDIA_EXPORT Picture {
public:
+ // Defaults |size_changed_| to false. Size changed is currently only used
+ // by AVDA and is set via set_size_changd().
Picture(int32_t picture_buffer_id,
int32_t bitstream_buffer_id,
const gfx::Rect& visible_rect,
@@ -81,11 +84,20 @@ class MEDIA_EXPORT Picture {
bool allow_overlay() const { return allow_overlay_; }
+ // Returns true when the VDA has adjusted the resolution of this Picture
+ // without requesting new PictureBuffers. GpuVideoDecoder should read this
+ // as a signal to update the size of the corresponding PicutreBuffer using
+ // visible_rect() upon receiving this Picture from a VDA.
+ bool size_changed() const { return size_changed_; };
+
+ void set_size_changed(bool size_changed) { size_changed_ = size_changed; }
+
private:
int32_t picture_buffer_id_;
int32_t bitstream_buffer_id_;
gfx::Rect visible_rect_;
bool allow_overlay_;
+ bool size_changed_;
};
} // namespace media
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/video/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698