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

Side by Side Diff: media/filters/gpu_video_decoder.h

Issue 2019333004: Revert of 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, 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,
71 uint32_t textures_per_buffer, 70 uint32_t textures_per_buffer,
72 const gfx::Size& size, 71 const gfx::Size& size,
73 uint32_t texture_target) override; 72 uint32_t texture_target) override;
74 void DismissPictureBuffer(int32_t id) override; 73 void DismissPictureBuffer(int32_t id) override;
75 void PictureReady(const media::Picture& picture) override; 74 void PictureReady(const media::Picture& picture) override;
76 void NotifyEndOfBitstreamBuffer(int32_t id) override; 75 void NotifyEndOfBitstreamBuffer(int32_t id) override;
77 void NotifyFlushDone() override; 76 void NotifyFlushDone() override;
78 void NotifyResetDone() override; 77 void NotifyResetDone() override;
79 void NotifyError(media::VideoDecodeAccelerator::Error error) override; 78 void NotifyError(media::VideoDecodeAccelerator::Error error) override;
80 79
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // as VideoFrames to be rendered via decode_cb_, and which will be returned 188 // as VideoFrames to be rendered via decode_cb_, and which will be returned
190 // to us via ReusePictureBuffer. 189 // to us via ReusePictureBuffer.
191 typedef std::map<int32_t /* picture_buffer_id */, 190 typedef std::map<int32_t /* picture_buffer_id */,
192 PictureBuffer::TextureIds /* texture_id */> 191 PictureBuffer::TextureIds /* texture_id */>
193 PictureBufferTextureMap; 192 PictureBufferTextureMap;
194 PictureBufferTextureMap picture_buffers_at_display_; 193 PictureBufferTextureMap picture_buffers_at_display_;
195 194
196 // The texture target used for decoded pictures. 195 // The texture target used for decoded pictures.
197 uint32_t decoder_texture_target_; 196 uint32_t decoder_texture_target_;
198 197
199 // The pixel format used for decoded pictures.
200 VideoPixelFormat pixel_format_;
201
202 struct BufferData { 198 struct BufferData {
203 BufferData(int32_t bbid, 199 BufferData(int32_t bbid,
204 base::TimeDelta ts, 200 base::TimeDelta ts,
205 const gfx::Rect& visible_rect, 201 const gfx::Rect& visible_rect,
206 const gfx::Size& natural_size); 202 const gfx::Size& natural_size);
207 ~BufferData(); 203 ~BufferData();
208 int32_t bitstream_buffer_id; 204 int32_t bitstream_buffer_id;
209 base::TimeDelta timestamp; 205 base::TimeDelta timestamp;
210 gfx::Rect visible_rect; 206 gfx::Rect visible_rect;
211 gfx::Size natural_size; 207 gfx::Size natural_size;
(...skipping 23 matching lines...) Expand all
235 // Bound to factories_->GetMessageLoop(). 231 // Bound to factories_->GetMessageLoop().
236 // NOTE: Weak pointers must be invalidated before all other member variables. 232 // NOTE: Weak pointers must be invalidated before all other member variables.
237 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; 233 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
238 234
239 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 235 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
240 }; 236 };
241 237
242 } // namespace media 238 } // namespace media
243 239
244 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 240 #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