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

Side by Side Diff: media/gpu/ipc/client/gpu_video_decode_accelerator_host.h

Issue 1942123002: Plumb decoded video pixel format from GPU process to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 5 #ifndef MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
6 #define MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 6 #define MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // VideoDecodeAccelerator implementation. 43 // VideoDecodeAccelerator implementation.
44 bool Initialize(const Config& config, Client* client) override; 44 bool Initialize(const Config& config, Client* client) override;
45 void SetCdm(int cdm_id) override; 45 void SetCdm(int cdm_id) override;
46 void Decode(const BitstreamBuffer& bitstream_buffer) override; 46 void Decode(const BitstreamBuffer& bitstream_buffer) override;
47 void AssignPictureBuffers(const std::vector<PictureBuffer>& buffers) override; 47 void AssignPictureBuffers(const std::vector<PictureBuffer>& buffers) override;
48 void ReusePictureBuffer(int32_t picture_buffer_id) override; 48 void ReusePictureBuffer(int32_t picture_buffer_id) override;
49 void Flush() override; 49 void Flush() override;
50 void Reset() override; 50 void Reset() override;
51 void Destroy() override; 51 void Destroy() override;
52 VideoPixelFormat GetOutputFormat() const override;
52 53
53 // gpu::CommandBufferProxyImpl::DeletionObserver implemetnation. 54 // gpu::CommandBufferProxyImpl::DeletionObserver implemetnation.
54 void OnWillDeleteImpl() override; 55 void OnWillDeleteImpl() override;
55 56
56 private: 57 private:
57 // Only Destroy() should be deleting |this|. 58 // Only Destroy() should be deleting |this|.
58 ~GpuVideoDecodeAcceleratorHost() override; 59 ~GpuVideoDecodeAcceleratorHost() override;
59 60
60 // Notify |client_| of an error. Posts a task to avoid re-entrancy. 61 // Notify |client_| of an error. Posts a task to avoid re-entrancy.
61 void PostNotifyError(Error); 62 void PostNotifyError(Error);
62 63
63 void Send(IPC::Message* message); 64 void Send(IPC::Message* message);
64 65
65 // IPC handlers, proxying VideoDecodeAccelerator::Client for the GPU 66 // IPC handlers, proxying VideoDecodeAccelerator::Client for the GPU
66 // process. Should not be called directly. 67 // process. Should not be called directly.
67 void OnInitializationComplete(bool success); 68 void OnInitializationComplete(bool success);
68 void OnBitstreamBufferProcessed(int32_t bitstream_buffer_id); 69 void OnBitstreamBufferProcessed(int32_t bitstream_buffer_id);
69 void OnProvidePictureBuffer(uint32_t num_requested_buffers, 70 void OnProvidePictureBuffer(VideoPixelFormat format,
71 uint32_t num_requested_buffers,
70 uint32_t textures_per_buffer, 72 uint32_t textures_per_buffer,
71 const gfx::Size& dimensions, 73 const gfx::Size& dimensions,
72 uint32_t texture_target); 74 uint32_t texture_target);
73 void OnDismissPictureBuffer(int32_t picture_buffer_id); 75 void OnDismissPictureBuffer(int32_t picture_buffer_id);
74 void OnPictureReady(int32_t picture_buffer_id, 76 void OnPictureReady(int32_t picture_buffer_id,
75 int32_t bitstream_buffer_id, 77 int32_t bitstream_buffer_id,
76 const gfx::Rect& visible_rect, 78 const gfx::Rect& visible_rect,
77 bool allow_overlay, 79 bool allow_overlay,
78 bool size_changed); 80 bool size_changed);
79 void OnFlushDone(); 81 void OnFlushDone();
(...skipping 12 matching lines...) Expand all
92 Client* client_; 94 Client* client_;
93 95
94 // Unowned reference to the gpu::CommandBufferProxyImpl that created us. 96 // Unowned reference to the gpu::CommandBufferProxyImpl that created us.
95 // |this| registers as a DeletionObserver of |impl_|, the so reference is 97 // |this| registers as a DeletionObserver of |impl_|, the so reference is
96 // always valid as long as it is not NULL. 98 // always valid as long as it is not NULL.
97 gpu::CommandBufferProxyImpl* impl_; 99 gpu::CommandBufferProxyImpl* impl_;
98 100
99 // Requested dimensions of the buffer, from ProvidePictureBuffers(). 101 // Requested dimensions of the buffer, from ProvidePictureBuffers().
100 gfx::Size picture_buffer_dimensions_; 102 gfx::Size picture_buffer_dimensions_;
101 103
104 VideoPixelFormat picture_buffer_format_;
105
102 // WeakPtr factory for posting tasks back to itself. 106 // WeakPtr factory for posting tasks back to itself.
103 base::WeakPtrFactory<GpuVideoDecodeAcceleratorHost> weak_this_factory_; 107 base::WeakPtrFactory<GpuVideoDecodeAcceleratorHost> weak_this_factory_;
104 108
105 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); 109 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost);
106 }; 110 };
107 111
108 } // namespace media 112 } // namespace media
109 113
110 #endif // MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 114 #endif // MEDIA_GPU_IPC_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698