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

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: 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 24 matching lines...) Expand all
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 Decode(const media::BitstreamBuffer& bitstream_buffer) override; 39 void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
40 void AssignPictureBuffers( 40 void AssignPictureBuffers(
41 const std::vector<media::PictureBuffer>& buffers) override; 41 const std::vector<media::PictureBuffer>& buffers) override;
42 void ReusePictureBuffer(int32 picture_buffer_id) override; 42 void ReusePictureBuffer(int32 picture_buffer_id) override;
43 void Flush() override; 43 void Flush() override;
44 void Reset() override; 44 void Reset() override;
45 void SetCdm(int cdm_id) 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.
61 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); 62 void OnBitstreamBufferProcessed(int32 bitstream_buffer_id);
62 void OnProvidePictureBuffer(uint32 num_requested_buffers, 63 void OnProvidePictureBuffer(uint32 num_requested_buffers,
63 const gfx::Size& dimensions, 64 const gfx::Size& dimensions,
64 uint32 texture_target); 65 uint32 texture_target);
65 void OnDismissPictureBuffer(int32 picture_buffer_id); 66 void OnDismissPictureBuffer(int32 picture_buffer_id);
66 void OnPictureReady(int32 picture_buffer_id, 67 void OnPictureReady(int32 picture_buffer_id,
67 int32 bitstream_buffer_id, 68 int32 bitstream_buffer_id,
68 const gfx::Rect& visible_rect, 69 const gfx::Rect& visible_rect,
69 bool allow_overlay); 70 bool allow_overlay);
70 void OnFlushDone(); 71 void OnFlushDone();
71 void OnResetDone(); 72 void OnResetDone();
73 void OnCdmSet(bool success);
72 void OnNotifyError(uint32 error); 74 void OnNotifyError(uint32 error);
73 75
74 // Unowned reference to the GpuChannelHost to send IPC messages to the GPU 76 // Unowned reference to the GpuChannelHost to send IPC messages to the GPU
75 // process. |channel_| outlives |impl_|, so the reference is always valid as 77 // process. |channel_| outlives |impl_|, so the reference is always valid as
76 // long as it is not NULL. 78 // long as it is not NULL.
77 GpuChannelHost* channel_; 79 GpuChannelHost* channel_;
78 80
79 // Route ID for the associated decoder in the GPU process. 81 // Route ID for the associated decoder in the GPU process.
80 int32 decoder_route_id_; 82 int32 decoder_route_id_;
81 83
(...skipping 10 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