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

Side by Side Diff: content/common/gpu/media/dxva_video_decode_accelerator.h

Issue 10826238: Ensure that the correct open gl context is made current before attempting to write to the open (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
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.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 CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <d3d9.h> 8 #include <d3d9.h>
9 #include <dxva2api.h> 9 #include <dxva2api.h>
10 #include <list> 10 #include <list>
(...skipping 22 matching lines...) Expand all
33 enum State { 33 enum State {
34 kUninitialized, // un-initialized. 34 kUninitialized, // un-initialized.
35 kNormal, // normal playing state. 35 kNormal, // normal playing state.
36 kResetting, // upon received Reset(), before ResetDone() 36 kResetting, // upon received Reset(), before ResetDone()
37 kEosDrain, // upon input EOS received. 37 kEosDrain, // upon input EOS received.
38 kStopped, // upon output EOS received. 38 kStopped, // upon output EOS received.
39 }; 39 };
40 40
41 // Does not take ownership of |client| which must outlive |*this|. 41 // Does not take ownership of |client| which must outlive |*this|.
42 explicit DXVAVideoDecodeAccelerator( 42 explicit DXVAVideoDecodeAccelerator(
43 media::VideoDecodeAccelerator::Client* client); 43 media::VideoDecodeAccelerator::Client* client,
44 const base::Callback<bool(void)>& make_context_current);
44 virtual ~DXVAVideoDecodeAccelerator(); 45 virtual ~DXVAVideoDecodeAccelerator();
45 46
46 // media::VideoDecodeAccelerator implementation. 47 // media::VideoDecodeAccelerator implementation.
47 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; 48 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE;
48 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; 49 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
49 virtual void AssignPictureBuffers( 50 virtual void AssignPictureBuffers(
50 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; 51 const std::vector<media::PictureBuffer>& buffers) OVERRIDE;
51 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; 52 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE;
52 virtual void Flush() OVERRIDE; 53 virtual void Flush() OVERRIDE;
53 virtual void Reset() OVERRIDE; 54 virtual void Reset() OVERRIDE;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // Counter which holds the number of input packets before a successful 194 // Counter which holds the number of input packets before a successful
194 // decode. 195 // decode.
195 int inputs_before_decode_; 196 int inputs_before_decode_;
196 197
197 // Set to true if all necessary initialization needed before the GPU process 198 // Set to true if all necessary initialization needed before the GPU process
198 // is sandboxed is done. 199 // is sandboxed is done.
199 // This includes the following: 200 // This includes the following:
200 // 1. All required decoder dlls were successfully loaded. 201 // 1. All required decoder dlls were successfully loaded.
201 // 2. The device manager initialization completed. 202 // 2. The device manager initialization completed.
202 static bool pre_sandbox_init_done_; 203 static bool pre_sandbox_init_done_;
204
205 // Callback to set the correct gl context.
206 base::Callback<bool(void)> make_context_current_;
203 }; 207 };
204 208
205 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ 209 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698