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

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

Issue 175223003: HW Video: Make media::VideoFrame handle the sync point of the compositor as well as webgl (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Focus on this CL's goal and remove wrong change Created 6 years, 9 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 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 <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 10 matching lines...) Expand all
21 #include "media/base/video_decoder.h" 21 #include "media/base/video_decoder.h"
22 #include "media/video/picture.h" 22 #include "media/video/picture.h"
23 #include "media/video/video_decode_accelerator.h" 23 #include "media/video/video_decode_accelerator.h"
24 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h" 24 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h"
25 25
26 namespace base { 26 namespace base {
27 class WaitableEvent; 27 class WaitableEvent;
28 class MessageLoopProxy; 28 class MessageLoopProxy;
29 }; 29 };
30 30
31 namespace gpu {
32 struct MailboxHolder;
33 }
34
35 namespace media { 31 namespace media {
36 class DecoderBuffer; 32 class DecoderBuffer;
37 class GpuVideoAcceleratorFactories; 33 class GpuVideoAcceleratorFactories;
38 } 34 }
39 35
40 namespace content { 36 namespace content {
41 37
42 // This class uses hardware accelerated video decoder to decode video for 38 // This class uses hardware accelerated video decoder to decode video for
43 // WebRTC. |vda_message_loop_| is the message loop proxy of the media thread, 39 // WebRTC. |vda_message_loop_| is the message loop proxy of the media thread,
44 // which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC 40 // which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 uint32_t timestamp, 143 uint32_t timestamp,
148 uint32_t width, 144 uint32_t width,
149 uint32_t height, 145 uint32_t height,
150 size_t size); 146 size_t size);
151 147
152 // Resets VDA. 148 // Resets VDA.
153 void ResetInternal(); 149 void ResetInternal();
154 150
155 // Tells VDA that a picture buffer can be recycled. 151 // Tells VDA that a picture buffer can be recycled.
156 void ReusePictureBuffer(int64 picture_buffer_id, 152 void ReusePictureBuffer(int64 picture_buffer_id,
157 scoped_ptr<gpu::MailboxHolder> mailbox_holder); 153 const std::vector<uint32>& release_sync_points);
158 154
159 // Create |vda_| on |vda_loop_proxy_|. 155 // Create |vda_| on |vda_loop_proxy_|.
160 void CreateVDA(media::VideoCodecProfile profile, base::WaitableEvent* waiter); 156 void CreateVDA(media::VideoCodecProfile profile, base::WaitableEvent* waiter);
161 157
162 void DestroyTextures(); 158 void DestroyTextures();
163 void DestroyVDA(); 159 void DestroyVDA();
164 160
165 // Gets a shared-memory segment of at least |min_size| bytes from 161 // Gets a shared-memory segment of at least |min_size| bytes from
166 // |available_shm_segments_|. Returns NULL if there is no buffer or the 162 // |available_shm_segments_|. Returns NULL if there is no buffer or the
167 // buffer is not big enough. 163 // buffer is not big enough.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // Must be destroyed, or invalidated, on |vda_loop_proxy_| 265 // Must be destroyed, or invalidated, on |vda_loop_proxy_|
270 // NOTE: Weak pointers must be invalidated before all other member variables. 266 // NOTE: Weak pointers must be invalidated before all other member variables.
271 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; 267 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_;
272 268
273 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); 269 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder);
274 }; 270 };
275 271
276 } // namespace content 272 } // namespace content
277 273
278 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 274 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698