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

Side by Side Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.h

Issue 1438063002: media: Support SetCdm() on VideoDecodeAccelerator interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 18 matching lines...) Expand all
29 // for |channel_| and |impl_|.) 29 // for |channel_| and |impl_|.)
30 GpuVideoDecodeAcceleratorHost(GpuChannelHost* channel, 30 GpuVideoDecodeAcceleratorHost(GpuChannelHost* channel,
31 CommandBufferProxyImpl* impl); 31 CommandBufferProxyImpl* impl);
32 32
33 // IPC::Listener implementation. 33 // IPC::Listener implementation.
34 void OnChannelError() override; 34 void OnChannelError() override;
35 bool OnMessageReceived(const IPC::Message& message) override; 35 bool OnMessageReceived(const IPC::Message& message) override;
36 36
37 // media::VideoDecodeAccelerator implementation. 37 // media::VideoDecodeAccelerator implementation.
38 bool Initialize(media::VideoCodecProfile profile, Client* client) override; 38 bool Initialize(media::VideoCodecProfile profile, Client* client) override;
39 void SetCdm(int cdm_id) override;
39 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; 40 void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
40 void AssignPictureBuffers( 41 void AssignPictureBuffers(
41 const std::vector<media::PictureBuffer>& buffers) override; 42 const std::vector<media::PictureBuffer>& buffers) override;
42 void ReusePictureBuffer(int32 picture_buffer_id) override; 43 void ReusePictureBuffer(int32 picture_buffer_id) override;
43 void Flush() override; 44 void Flush() override;
44 void Reset() override; 45 void Reset() override;
45 void Destroy() override; 46 void Destroy() override;
46 47
47 // CommandBufferProxyImpl::DeletionObserver implemetnation. 48 // CommandBufferProxyImpl::DeletionObserver implemetnation.
48 void OnWillDeleteImpl() override; 49 void OnWillDeleteImpl() override;
49 50
50 private: 51 private:
51 // Only Destroy() should be deleting |this|. 52 // Only Destroy() should be deleting |this|.
52 ~GpuVideoDecodeAcceleratorHost() override; 53 ~GpuVideoDecodeAcceleratorHost() override;
53 54
54 // Notify |client_| of an error. Posts a task to avoid re-entrancy. 55 // Notify |client_| of an error. Posts a task to avoid re-entrancy.
55 void PostNotifyError(Error); 56 void PostNotifyError(Error);
56 57
57 void Send(IPC::Message* message); 58 void Send(IPC::Message* message);
58 59
59 // IPC handlers, proxying media::VideoDecodeAccelerator::Client for the GPU 60 // IPC handlers, proxying media::VideoDecodeAccelerator::Client for the GPU
60 // process. Should not be called directly. 61 // process. Should not be called directly.
62 void OnCdmAttached(bool success);
61 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); 63 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id);
62 void OnProvidePictureBuffer(uint32 num_requested_buffers, 64 void OnProvidePictureBuffer(uint32 num_requested_buffers,
63 const gfx::Size& dimensions, 65 const gfx::Size& dimensions,
64 uint32 texture_target); 66 uint32 texture_target);
65 void OnDismissPictureBuffer(int32 picture_buffer_id); 67 void OnDismissPictureBuffer(int32 picture_buffer_id);
66 void OnPictureReady(int32 picture_buffer_id, 68 void OnPictureReady(int32 picture_buffer_id,
67 int32 bitstream_buffer_id, 69 int32 bitstream_buffer_id,
68 const gfx::Rect& visible_rect, 70 const gfx::Rect& visible_rect,
69 bool allow_overlay); 71 bool allow_overlay);
70 void OnFlushDone(); 72 void OnFlushDone();
(...skipping 21 matching lines...) Expand all
92 94
93 // WeakPtr factory for posting tasks back to itself. 95 // WeakPtr factory for posting tasks back to itself.
94 base::WeakPtrFactory<GpuVideoDecodeAcceleratorHost> weak_this_factory_; 96 base::WeakPtrFactory<GpuVideoDecodeAcceleratorHost> weak_this_factory_;
95 97
96 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); 98 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost);
97 }; 99 };
98 100
99 } // namespace content 101 } // namespace content
100 102
101 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 103 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_video_decode_accelerator_host.cc » ('j') | content/common/gpu/gpu_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698