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

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

Issue 10852009: Clarify ownership of GpuVideoDecodeAcceleratorHost and avoid crash on context loss. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 (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 <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void ReusePictureBuffer(int64 picture_buffer_id); 118 void ReusePictureBuffer(int64 picture_buffer_id);
119 119
120 void RecordBufferTimeData( 120 void RecordBufferTimeData(
121 const BitstreamBuffer& bitstream_buffer, const Buffer& buffer); 121 const BitstreamBuffer& bitstream_buffer, const Buffer& buffer);
122 base::TimeDelta GetBufferTimestamp(int32 id); 122 base::TimeDelta GetBufferTimestamp(int32 id);
123 123
124 // Set |vda_| and |weak_vda_| on the VDA thread (in practice the render 124 // Set |vda_| and |weak_vda_| on the VDA thread (in practice the render
125 // thread). 125 // thread).
126 void SetVDA(VideoDecodeAccelerator* vda); 126 void SetVDA(VideoDecodeAccelerator* vda);
127 127
128 // Call VDA::Destroy() on |vda_loop_proxy_| ensuring that |this| outlives the
129 // Destroy() call.
130 void DestroyVDA();
131
128 // A shared memory segment and its allocated size. 132 // A shared memory segment and its allocated size.
129 struct SHMBuffer { 133 struct SHMBuffer {
130 SHMBuffer(base::SharedMemory* m, size_t s); 134 SHMBuffer(base::SharedMemory* m, size_t s);
131 ~SHMBuffer(); 135 ~SHMBuffer();
132 base::SharedMemory* shm; 136 base::SharedMemory* shm;
133 size_t size; 137 size_t size;
134 }; 138 };
135 139
136 // Request a shared-memory segment of at least |min_size| bytes. Will 140 // Request a shared-memory segment of at least |min_size| bytes. Will
137 // allocate as necessary. Caller does not own returned pointer. 141 // allocate as necessary. Caller does not own returned pointer.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 214
211 // Indicates decoding error occurred. 215 // Indicates decoding error occurred.
212 bool error_occured_; 216 bool error_occured_;
213 217
214 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 218 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
215 }; 219 };
216 220
217 } // namespace media 221 } // namespace media
218 222
219 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 223 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698