blob: eb27e5712858905426b8e881ef180355c1a42b71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2012 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 CONTENT_RENDERER_MEDIA_STREAM_TEXTURE_IMPL_ANDROID_H_
#define CONTENT_RENDERER_MEDIA_STREAM_TEXTURE_IMPL_ANDROID_H_
#include "base/memory/scoped_ptr.h"
#include "content/renderer/gpu/stream_texture_host_android.h"
#include "webkit/media/android/stream_texture_factory_android.h"
namespace WebKit {
class WebGraphicsContext3D;
}
namespace content {
class GpuChannelHost;
// The acutal implementation of StreamTextureFactory class.
class StreamTextureFactoryImpl
: public webkit_media::StreamTextureFactory {
public:
StreamTextureFactoryImpl(WebKit::WebGraphicsContext3D* context,
GpuChannelHost* channel,
int view_id);
virtual ~StreamTextureFactoryImpl();
// webkit_media::StreamTextureFactory implementation:
virtual webkit_media::StreamTextureProxy* CreateProxy() OVERRIDE;
virtual void EstablishPeer(int stream_id, int player_id) OVERRIDE;
virtual unsigned CreateStreamTexture(unsigned* texture_id) OVERRIDE;
virtual void DestroyStreamTexture(unsigned texture_id) OVERRIDE;
private:
WebKit::WebGraphicsContext3D* context_;
scoped_refptr<GpuChannelHost> channel_;
int view_id_;
DISALLOW_COPY_AND_ASSIGN(StreamTextureFactoryImpl);
};
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_STREAM_TEXTURE_IMPL_ANDROID_H_
|