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

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

Issue 1796633002: Revert of content gpu refactor: get rid of gpu related content switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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 <d3d11.h> 8 #include <d3d11.h>
9 #include <d3d9.h> 9 #include <d3d9.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public: 53 public:
54 enum State { 54 enum State {
55 kUninitialized, // un-initialized. 55 kUninitialized, // un-initialized.
56 kNormal, // normal playing state. 56 kNormal, // normal playing state.
57 kResetting, // upon received Reset(), before ResetDone() 57 kResetting, // upon received Reset(), before ResetDone()
58 kStopped, // upon output EOS received. 58 kStopped, // upon output EOS received.
59 kFlushing, // upon flush request received. 59 kFlushing, // upon flush request received.
60 }; 60 };
61 61
62 // Does not take ownership of |client| which must outlive |*this|. 62 // Does not take ownership of |client| which must outlive |*this|.
63 DXVAVideoDecodeAccelerator( 63 explicit DXVAVideoDecodeAccelerator(
64 const base::Callback<bool(void)>& make_context_current, 64 const base::Callback<bool(void)>& make_context_current,
65 gfx::GLContext* gl_context, 65 gfx::GLContext* gl_context);
66 bool enable_accelerated_vpx_decode);
67 ~DXVAVideoDecodeAccelerator() override; 66 ~DXVAVideoDecodeAccelerator() override;
68 67
69 // media::VideoDecodeAccelerator implementation. 68 // media::VideoDecodeAccelerator implementation.
70 bool Initialize(const Config& config, Client* client) override; 69 bool Initialize(const Config& config, Client* client) override;
71 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; 70 void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
72 void AssignPictureBuffers( 71 void AssignPictureBuffers(
73 const std::vector<media::PictureBuffer>& buffers) override; 72 const std::vector<media::PictureBuffer>& buffers) override;
74 void ReusePictureBuffer(int32_t picture_buffer_id) override; 73 void ReusePictureBuffer(int32_t picture_buffer_id) override;
75 void Flush() override; 74 void Flush() override;
76 void Reset() override; 75 void Reset() override;
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // Set to true if the DX11 video format converter input media types need to 386 // Set to true if the DX11 video format converter input media types need to
388 // be initialized. Defaults to true. 387 // be initialized. Defaults to true.
389 bool dx11_video_format_converter_media_type_needs_init_; 388 bool dx11_video_format_converter_media_type_needs_init_;
390 389
391 // The GLContext to be used by the decoder. 390 // The GLContext to be used by the decoder.
392 scoped_refptr<gfx::GLContext> gl_context_; 391 scoped_refptr<gfx::GLContext> gl_context_;
393 392
394 // Set to true if we are sharing ANGLE's device. 393 // Set to true if we are sharing ANGLE's device.
395 bool using_angle_device_; 394 bool using_angle_device_;
396 395
397 // Enables experimental hardware acceleration for VP8/VP9 video decoding.
398 const bool enable_accelerated_vpx_decode_;
399
400 // WeakPtrFactory for posting tasks back to |this|. 396 // WeakPtrFactory for posting tasks back to |this|.
401 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; 397 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_;
402 398
403 // Function pointer for the MFCreateDXGIDeviceManager API. 399 // Function pointer for the MFCreateDXGIDeviceManager API.
404 static CreateDXGIDeviceManager create_dxgi_device_manager_; 400 static CreateDXGIDeviceManager create_dxgi_device_manager_;
405 401
406 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); 402 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator);
407 }; 403 };
408 404
409 } // namespace content 405 } // namespace content
410 406
411 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ 407 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698