| Index: media/base/android/stream_texture_wrapper.h
|
| diff --git a/media/base/android/stream_texture_wrapper.h b/media/base/android/stream_texture_wrapper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ede9a66fc53c7667dfa657258ef809691c3e2699
|
| --- /dev/null
|
| +++ b/media/base/android/stream_texture_wrapper.h
|
| @@ -0,0 +1,44 @@
|
| +// 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_BASE_ANDROID_STREAM_TEXTURE_WRAPPER_H_
|
| +#define _MEDIA_BASE_ANDROID_STREAM_TEXTURE_WRAPPER_H_
|
| +
|
| +#include "media/base/video_frame.h"
|
| +#include "media/blink/media_blink_export.h"
|
| +
|
| +namespace media {
|
| +class VideoFrame;
|
| +
|
| +// Interface defining a class wrapping the initialization and registration
|
| +// of a StreamTexture, along with a way to access the wrapped underlying Texture
|
| +// via a VideoFrame.
|
| +//
|
| +// TODO(tguilbert): Support registering the underlying SurfaceTexture so it can
|
| +// be used by a MediaPlayer in the browser process. See crbug.com/627658.
|
| +class StreamTextureWrapper {
|
| + public:
|
| + StreamTextureWrapper() {}
|
| + virtual ~StreamTextureWrapper() {}
|
| +
|
| + // TODO(tguilbert): Update comment for |main_task_runner|
|
| + // 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(
|
| + cc::VideoFrameProvider::Client* client,
|
| + const gfx::Size& natural_size,
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
|
| + const base::Closure& init_cb) = 0;
|
| +
|
| + // Should be called whenever the Video's natural size changes.
|
| + virtual void UpdateTextureSize(const gfx::Size& natural_size) = 0;
|
| +
|
| + // Returns the latest frame.
|
| + virtual scoped_refptr<VideoFrame> GetCurrentFrame();
|
| +};
|
| +
|
| +} // namespace media
|
| +
|
| +#endif // _MEDIA_BASE_ANDROID_STREAM_TEXTURE_WRAPPER_H_
|
|
|