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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added DCHECK for valid sync token before IPC conversions Created 5 years, 1 month 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 (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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
16 #include "media/base/video_decoder.h" 16 #include "media/base/video_decoder.h"
17 #include "media/video/video_decode_accelerator.h" 17 #include "media/video/video_decode_accelerator.h"
18 18
19 template <class T> class scoped_refptr; 19 template <class T> class scoped_refptr;
20 20
21 namespace base { 21 namespace base {
22 class SharedMemory; 22 class SharedMemory;
23 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
24 } 24 }
25 25
26 namespace gpu {
27 struct SyncToken;
28 }
29
26 namespace media { 30 namespace media {
27 31
28 class DecoderBuffer; 32 class DecoderBuffer;
29 class GpuVideoAcceleratorFactories; 33 class GpuVideoAcceleratorFactories;
30 class MediaLog; 34 class MediaLog;
31 35
32 // GPU-accelerated video decoder implementation. Relies on 36 // GPU-accelerated video decoder implementation. Relies on
33 // AcceleratedVideoDecoderMsg_Decode and friends. Can be created on any thread 37 // AcceleratedVideoDecoderMsg_Decode and friends. Can be created on any thread
34 // but must be accessed and destroyed on GpuVideoAcceleratorFactories's 38 // but must be accessed and destroyed on GpuVideoAcceleratorFactories's
35 // GetMessageLoop(). 39 // GetMessageLoop().
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 101
98 typedef std::map<int32, PictureBuffer> PictureBufferMap; 102 typedef std::map<int32, PictureBuffer> PictureBufferMap;
99 103
100 void DeliverFrame(const scoped_refptr<VideoFrame>& frame); 104 void DeliverFrame(const scoped_refptr<VideoFrame>& frame);
101 105
102 // Static method is to allow it to run even after GVD is deleted. 106 // Static method is to allow it to run even after GVD is deleted.
103 static void ReleaseMailbox(base::WeakPtr<GpuVideoDecoder> decoder, 107 static void ReleaseMailbox(base::WeakPtr<GpuVideoDecoder> decoder,
104 media::GpuVideoAcceleratorFactories* factories, 108 media::GpuVideoAcceleratorFactories* factories,
105 int64 picture_buffer_id, 109 int64 picture_buffer_id,
106 uint32 texture_id, 110 uint32 texture_id,
107 uint32 release_sync_point); 111 const gpu::SyncToken& release_sync_token);
108 // Indicate the picture buffer can be reused by the decoder. 112 // Indicate the picture buffer can be reused by the decoder.
109 void ReusePictureBuffer(int64 picture_buffer_id); 113 void ReusePictureBuffer(int64 picture_buffer_id);
110 114
111 void RecordBufferData( 115 void RecordBufferData(
112 const BitstreamBuffer& bitstream_buffer, const DecoderBuffer& buffer); 116 const BitstreamBuffer& bitstream_buffer, const DecoderBuffer& buffer);
113 void GetBufferData(int32 id, base::TimeDelta* timetamp, 117 void GetBufferData(int32 id, base::TimeDelta* timetamp,
114 gfx::Rect* visible_rect, gfx::Size* natural_size); 118 gfx::Rect* visible_rect, gfx::Size* natural_size);
115 119
116 void DestroyVDA(); 120 void DestroyVDA();
117 121
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Bound to factories_->GetMessageLoop(). 195 // Bound to factories_->GetMessageLoop().
192 // NOTE: Weak pointers must be invalidated before all other member variables. 196 // NOTE: Weak pointers must be invalidated before all other member variables.
193 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; 197 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
194 198
195 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 199 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
196 }; 200 };
197 201
198 } // namespace media 202 } // namespace media
199 203
200 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 204 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698