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

Side by Side Diff: content/renderer/media/rtc_video_decoder.h

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 10 matching lines...) Expand all
21 #include "media/base/bitstream_buffer.h" 21 #include "media/base/bitstream_buffer.h"
22 #include "media/base/video_decoder.h" 22 #include "media/base/video_decoder.h"
23 #include "media/video/picture.h" 23 #include "media/video/picture.h"
24 #include "media/video/video_decode_accelerator.h" 24 #include "media/video/video_decode_accelerator.h"
25 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h" 25 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h"
26 26
27 namespace base { 27 namespace base {
28 class MessageLoopProxy; 28 class MessageLoopProxy;
29 }; 29 };
30 30
31 namespace gpu {
32 struct MailboxHolder;
33 }
34
31 namespace media { 35 namespace media {
32 class DecoderBuffer; 36 class DecoderBuffer;
33 class GpuVideoAcceleratorFactories; 37 class GpuVideoAcceleratorFactories;
34 } 38 }
35 39
36 namespace content { 40 namespace content {
37 41
38 // This class uses hardware accelerated video decoder to decode video for 42 // This class uses hardware accelerated video decoder to decode video for
39 // WebRTC. |vda_message_loop_| is the message loop proxy of the media thread, 43 // WebRTC. |vda_message_loop_| is the message loop proxy of the media thread,
40 // which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC 44 // which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const media::PictureBuffer& pb, 153 const media::PictureBuffer& pb,
150 uint32_t timestamp, 154 uint32_t timestamp,
151 uint32_t width, 155 uint32_t width,
152 uint32_t height, 156 uint32_t height,
153 size_t size); 157 size_t size);
154 158
155 // Resets VDA. 159 // Resets VDA.
156 void ResetInternal(); 160 void ResetInternal();
157 161
158 // Tells VDA that a picture buffer can be recycled. 162 // Tells VDA that a picture buffer can be recycled.
159 void ReusePictureBuffer(int64 picture_buffer_id, uint32 sync_point); 163 void ReusePictureBuffer(int64 picture_buffer_id,
164 scoped_ptr<gpu::MailboxHolder> mailbox_holder);
160 165
161 void DestroyTextures(); 166 void DestroyTextures();
162 void DestroyVDA(); 167 void DestroyVDA();
163 168
164 // Gets a shared-memory segment of at least |min_size| bytes from 169 // Gets a shared-memory segment of at least |min_size| bytes from
165 // |available_shm_segments_|. Returns NULL if there is no buffer or the 170 // |available_shm_segments_|. Returns NULL if there is no buffer or the
166 // buffer is not big enough. 171 // buffer is not big enough.
167 scoped_ptr<SHMBuffer> GetSHM_Locked(size_t min_size); 172 scoped_ptr<SHMBuffer> GetSHM_Locked(size_t min_size);
168 173
169 // Returns a shared-memory segment to the available pool. 174 // Returns a shared-memory segment to the available pool.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Factory used to populate |weak_this_|. Must be destroyed, or invalidated, 276 // Factory used to populate |weak_this_|. Must be destroyed, or invalidated,
272 // on |vda_loop_proxy_|. 277 // on |vda_loop_proxy_|.
273 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; 278 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_;
274 279
275 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); 280 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder);
276 }; 281 };
277 282
278 } // namespace content 283 } // namespace content
279 284
280 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 285 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698