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

Unified Diff: content/common/gpu/client/gpu_video_encode_accelerator_host.h

Issue 170843004: Pass Client pointer in Initialize() for VDA/VEA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 50e826de Rebase. Created 6 years, 10 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/client/gpu_video_encode_accelerator_host.h
diff --git a/content/common/gpu/client/gpu_video_encode_accelerator_host.h b/content/common/gpu/client/gpu_video_encode_accelerator_host.h
index 860955d114211e5fe6f6437a9f43ea89b2226e0f..bedf7fb6c35b705f3e1967be0841f25610aa7521 100644
--- a/content/common/gpu/client/gpu_video_encode_accelerator_host.h
+++ b/content/common/gpu/client/gpu_video_encode_accelerator_host.h
@@ -36,10 +36,9 @@ class GpuVideoEncodeAcceleratorHost
public media::VideoEncodeAccelerator,
public base::SupportsWeakPtr<GpuVideoEncodeAcceleratorHost> {
public:
- // |client| is assumed to outlive this object. Since the GpuChannelHost does
- // _not_ own this object, a reference to |gpu_channel_host| is taken.
+ // Since the GpuChannelHost does _not_ own this object, a reference to
+ // |gpu_channel_host| is taken.
GpuVideoEncodeAcceleratorHost(
- media::VideoEncodeAccelerator::Client* client,
const scoped_refptr<GpuChannelHost>& gpu_channel_host,
int32 route_id);
virtual ~GpuVideoEncodeAcceleratorHost();
@@ -56,7 +55,8 @@ class GpuVideoEncodeAcceleratorHost
virtual void Initialize(media::VideoFrame::Format format,
const gfx::Size& input_visible_size,
media::VideoCodecProfile output_profile,
- uint32 initial_bitrate) OVERRIDE;
+ uint32 initial_bitrate,
+ Client* client) OVERRIDE;
virtual void Encode(const scoped_refptr<media::VideoFrame>& frame,
bool force_keyframe) OVERRIDE;
virtual void UseOutputBitstreamBuffer(
@@ -84,12 +84,12 @@ class GpuVideoEncodeAcceleratorHost
void Send(IPC::Message* message);
- // Weak pointer for client callbacks on the
- // media::VideoEncodeAccelerator::Client interface.
- media::VideoEncodeAccelerator::Client* client_;
+ // Pointer for client callbacks on the media::VideoEncodeAccelerator::Client
+ // interface.
+ Client* client_;
// |client_ptr_factory_| is used for callbacks that need to be done through
// a PostTask() to avoid re-entrancy on the client.
- base::WeakPtrFactory<VideoEncodeAccelerator::Client> client_ptr_factory_;
+ scoped_ptr<base::WeakPtrFactory<Client> > client_ptr_factory_;
// IPC channel and route ID.
scoped_refptr<GpuChannelHost> channel_;

Powered by Google App Engine
This is Rietveld 408576698