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

Unified Diff: media/blink/surface_texture_frame_provider.h

Issue 2136103010: Add StreamTextureWrapper/StreamTextureWrapperImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: media/blink/surface_texture_frame_provider.h
diff --git a/media/blink/surface_texture_frame_provider.h b/media/blink/surface_texture_frame_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..2bc9cc396b3ee14ac4fcb666a5e84aa6f68d8ff3
--- /dev/null
+++ b/media/blink/surface_texture_frame_provider.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef _MEDIA_BLINK_SURFACE_TEXTURE_FRAME_PROVIDER_H_
+#define _MEDIA_BLINK_SURFACE_TEXTURE_FRAME_PROVIDER_H_
+
+#include "cc/layers/video_frame_provider.h"
+#include "media/blink/media_blink_export.h"
+
+namespace media {
+class VideoFrame;
+
+// Interface defining a VideoFrameProvider that is backed by an underlying
+// Android SurfaceTexture.
+class SurfaceTextureFrameProvider : public cc::VideoFrameProvider {
liberato (no reviews please) 2016/07/13 16:42:50 not sure if the additional abstraction is needed -
tguilbert 2016/07/14 02:47:03 I can show you the overall setup/tear down of this
liberato (no reviews please) 2016/07/14 16:41:30 hrm, not sure. i forgot that StreamTextureFactory
+ public:
+ SurfaceTextureFrameProvider() {}
+ virtual ~SurfaceTextureFrameProvider() {}
+
+ // Initialize and start providing frames if possible.
+ // The provided |task_runner| will be used to "signal" new frames (and most
+ // likely should be the compositor's TaskRunner).
+ virtual void Initialize(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ const gfx::Size& natural_size) = 0;
+
+ // TODO(tguilbert): Define and document return value on failure. To be
+ // submitted as part of crbug.com/627658.
+ virtual int GetSurfaceTextureIdentifier() = 0;
liberato (no reviews please) 2016/07/13 16:42:50 is this to tell the browser how to find the Surfac
tguilbert 2016/07/14 02:47:02 That is the plan :) I am using some hard coded val
+
+ // Should be called whenever the Video's natural size changes.
+ virtual void UpdateTextureSize(const gfx::Size& natural_size) = 0;
+};
+
+} // namespace media
+
+#endif // _MEDIA_BLINK_SURFACE_TEXTURE_FRAME_PROVIDER_H_
« content/renderer/media/android/surface_texture_frame_provider_impl.cc ('K') | « media/blink/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698