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

Side by Side Diff: media/filters/gpu_video_decoder.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: fix test on bots Created 4 years, 6 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
« no previous file with comments | « content/renderer/pepper/ppb_video_decoder_impl.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FILTERS_GPU_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void Decode(const scoped_refptr<DecoderBuffer>& buffer, 60 void Decode(const scoped_refptr<DecoderBuffer>& buffer,
61 const DecodeCB& decode_cb) override; 61 const DecodeCB& decode_cb) override;
62 void Reset(const base::Closure& closure) override; 62 void Reset(const base::Closure& closure) override;
63 bool NeedsBitstreamConversion() const override; 63 bool NeedsBitstreamConversion() const override;
64 bool CanReadWithoutStalling() const override; 64 bool CanReadWithoutStalling() const override;
65 int GetMaxDecodeRequests() const override; 65 int GetMaxDecodeRequests() const override;
66 66
67 // VideoDecodeAccelerator::Client implementation. 67 // VideoDecodeAccelerator::Client implementation.
68 void NotifyInitializationComplete(bool success) override; 68 void NotifyInitializationComplete(bool success) override;
69 void ProvidePictureBuffers(uint32_t count, 69 void ProvidePictureBuffers(uint32_t count,
70 VideoPixelFormat format,
70 uint32_t textures_per_buffer, 71 uint32_t textures_per_buffer,
71 const gfx::Size& size, 72 const gfx::Size& size,
72 uint32_t texture_target) override; 73 uint32_t texture_target) override;
73 void DismissPictureBuffer(int32_t id) override; 74 void DismissPictureBuffer(int32_t id) override;
74 void PictureReady(const media::Picture& picture) override; 75 void PictureReady(const media::Picture& picture) override;
75 void NotifyEndOfBitstreamBuffer(int32_t id) override; 76 void NotifyEndOfBitstreamBuffer(int32_t id) override;
76 void NotifyFlushDone() override; 77 void NotifyFlushDone() override;
77 void NotifyResetDone() override; 78 void NotifyResetDone() override;
78 void NotifyError(media::VideoDecodeAccelerator::Error error) override; 79 void NotifyError(media::VideoDecodeAccelerator::Error error) override;
79 80
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // as VideoFrames to be rendered via decode_cb_, and which will be returned 189 // as VideoFrames to be rendered via decode_cb_, and which will be returned
189 // to us via ReusePictureBuffer. 190 // to us via ReusePictureBuffer.
190 typedef std::map<int32_t /* picture_buffer_id */, 191 typedef std::map<int32_t /* picture_buffer_id */,
191 PictureBuffer::TextureIds /* texture_id */> 192 PictureBuffer::TextureIds /* texture_id */>
192 PictureBufferTextureMap; 193 PictureBufferTextureMap;
193 PictureBufferTextureMap picture_buffers_at_display_; 194 PictureBufferTextureMap picture_buffers_at_display_;
194 195
195 // The texture target used for decoded pictures. 196 // The texture target used for decoded pictures.
196 uint32_t decoder_texture_target_; 197 uint32_t decoder_texture_target_;
197 198
199 // The pixel format used for decoded pictures.
200 VideoPixelFormat pixel_format_;
201
198 struct BufferData { 202 struct BufferData {
199 BufferData(int32_t bbid, 203 BufferData(int32_t bbid,
200 base::TimeDelta ts, 204 base::TimeDelta ts,
201 const gfx::Rect& visible_rect, 205 const gfx::Rect& visible_rect,
202 const gfx::Size& natural_size); 206 const gfx::Size& natural_size);
203 ~BufferData(); 207 ~BufferData();
204 int32_t bitstream_buffer_id; 208 int32_t bitstream_buffer_id;
205 base::TimeDelta timestamp; 209 base::TimeDelta timestamp;
206 gfx::Rect visible_rect; 210 gfx::Rect visible_rect;
207 gfx::Size natural_size; 211 gfx::Size natural_size;
(...skipping 23 matching lines...) Expand all
231 // Bound to factories_->GetMessageLoop(). 235 // Bound to factories_->GetMessageLoop().
232 // NOTE: Weak pointers must be invalidated before all other member variables. 236 // NOTE: Weak pointers must be invalidated before all other member variables.
233 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; 237 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
234 238
235 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 239 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
236 }; 240 };
237 241
238 } // namespace media 242 } // namespace media
239 243
240 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 244 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_video_decoder_impl.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698