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

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

Issue 2871503002: Remove ScopedVector from audio/video renderer related code in media/ (Closed)
Patch Set: Address xhwang's comments and delete some useless includes Created 3 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
« no previous file with comments | « media/filters/decoder_stream.h ('k') | media/filters/video_decoder_selector_unittest.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // AcceleratedVideoDecoderMsg_Decode and friends. Can be created on any thread 42 // AcceleratedVideoDecoderMsg_Decode and friends. Can be created on any thread
43 // but must be accessed and destroyed on GpuVideoAcceleratorFactories's 43 // but must be accessed and destroyed on GpuVideoAcceleratorFactories's
44 // GetMessageLoop(). 44 // GetMessageLoop().
45 class MEDIA_EXPORT GpuVideoDecoder 45 class MEDIA_EXPORT GpuVideoDecoder
46 : public VideoDecoder, 46 : public VideoDecoder,
47 public VideoDecodeAccelerator::Client { 47 public VideoDecodeAccelerator::Client {
48 public: 48 public:
49 GpuVideoDecoder(GpuVideoAcceleratorFactories* factories, 49 GpuVideoDecoder(GpuVideoAcceleratorFactories* factories,
50 const RequestSurfaceCB& request_surface_cb, 50 const RequestSurfaceCB& request_surface_cb,
51 MediaLog* media_log); 51 MediaLog* media_log);
52 ~GpuVideoDecoder() override;
52 53
53 // VideoDecoder implementation. 54 // VideoDecoder implementation.
54 std::string GetDisplayName() const override; 55 std::string GetDisplayName() const override;
55 void Initialize(const VideoDecoderConfig& config, 56 void Initialize(const VideoDecoderConfig& config,
56 bool low_delay, 57 bool low_delay,
57 CdmContext* cdm_context, 58 CdmContext* cdm_context,
58 const InitCB& init_cb, 59 const InitCB& init_cb,
59 const OutputCB& output_cb) override; 60 const OutputCB& output_cb) override;
60 void Decode(const scoped_refptr<DecoderBuffer>& buffer, 61 void Decode(const scoped_refptr<DecoderBuffer>& buffer,
61 const DecodeCB& decode_cb) override; 62 const DecodeCB& decode_cb) override;
(...skipping 11 matching lines...) Expand all
73 uint32_t texture_target) override; 74 uint32_t texture_target) override;
74 void DismissPictureBuffer(int32_t id) override; 75 void DismissPictureBuffer(int32_t id) override;
75 void PictureReady(const media::Picture& picture) override; 76 void PictureReady(const media::Picture& picture) override;
76 void NotifyEndOfBitstreamBuffer(int32_t id) override; 77 void NotifyEndOfBitstreamBuffer(int32_t id) override;
77 void NotifyFlushDone() override; 78 void NotifyFlushDone() override;
78 void NotifyResetDone() override; 79 void NotifyResetDone() override;
79 void NotifyError(media::VideoDecodeAccelerator::Error error) override; 80 void NotifyError(media::VideoDecodeAccelerator::Error error) override;
80 81
81 static const char kDecoderName[]; 82 static const char kDecoderName[];
82 83
83 protected:
84 ~GpuVideoDecoder() override;
85
86 private: 84 private:
87 enum State { 85 enum State {
88 kNormal, 86 kNormal,
89 kDrainingDecoder, 87 kDrainingDecoder,
90 kDecoderDrained, 88 kDecoderDrained,
91 kError 89 kError
92 }; 90 };
93 91
94 // A shared memory segment and its allocated size. 92 // A shared memory segment and its allocated size.
95 struct SHMBuffer { 93 struct SHMBuffer {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Bound to factories_->GetMessageLoop(). 260 // Bound to factories_->GetMessageLoop().
263 // NOTE: Weak pointers must be invalidated before all other member variables. 261 // NOTE: Weak pointers must be invalidated before all other member variables.
264 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; 262 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
265 263
266 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 264 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
267 }; 265 };
268 266
269 } // namespace media 267 } // namespace media
270 268
271 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 269 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/decoder_stream.h ('k') | media/filters/video_decoder_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698