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

Unified Diff: content/common/gpu/media/v4l2_video_decode_accelerator.h

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a small issue Created 6 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
Index: content/common/gpu/media/v4l2_video_decode_accelerator.h
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.h b/content/common/gpu/media/v4l2_video_decode_accelerator.h
index 0c6a4930714de29f9a10d33975255dc90d011f26..97c13628f43c2968c149c876877781ecc279159e 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.h
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.h
@@ -11,6 +11,7 @@
#include <queue>
#include <vector>
+#include <linux/videodev2.h>
Pawel Osciak 2014/03/25 08:21:08 Why did we not need this before? If this is for v4
shivdasp 2014/03/25 10:36:40 This was for v4l2_format but now if we use frame_b
#include "base/callback_forward.h"
#include "base/memory/linked_ptr.h"
@@ -294,6 +295,13 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
// Callback that indicates a picture has been cleared.
void PictureCleared();
+ // This method determines whether a resolution change event processing
+ // is indeed required by returning true if either:
+ // - width or height of the new format is different than previous format.
+ // - V4L2_CID_MIN_BUFFERS_FOR_CAPTURE has changed.
+ // Returns false otherwise.
+ bool IsResolutionChangeNecessary();
+
// Our original calling message loop for the child thread.
scoped_refptr<base::MessageLoopProxy> child_message_loop_proxy_;
@@ -426,6 +434,12 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
// The codec we'll be decoding for.
media::VideoCodecProfile video_profile_;
+ // Stores the current format. This is used to check against
+ // the format received when we dequeue a RESOLUTION_CHANGE event.
+ // Resolution change sequence is only executed if the new format is different
+ // than the current_format_.
+ struct v4l2_format current_format_;
+
DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator);
};

Powered by Google App Engine
This is Rietveld 408576698