OLD | NEW |
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 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
6 | 6 |
7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
10 | 10 |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 dev_manager_reset_token_(0), | 515 dev_manager_reset_token_(0), |
516 dx11_dev_manager_reset_token_(0), | 516 dx11_dev_manager_reset_token_(0), |
517 egl_config_(NULL), | 517 egl_config_(NULL), |
518 state_(kUninitialized), | 518 state_(kUninitialized), |
519 pictures_requested_(false), | 519 pictures_requested_(false), |
520 inputs_before_decode_(0), | 520 inputs_before_decode_(0), |
521 sent_drain_message_(false), | 521 sent_drain_message_(false), |
522 make_context_current_(make_context_current), | 522 make_context_current_(make_context_current), |
523 codec_(media::kUnknownVideoCodec), | 523 codec_(media::kUnknownVideoCodec), |
524 decoder_thread_("DXVAVideoDecoderThread"), | 524 decoder_thread_("DXVAVideoDecoderThread"), |
525 weak_ptr_(weak_this_factory_.GetWeakPtr()), | |
526 pending_flush_(false), | 525 pending_flush_(false), |
527 use_dx11_(false), | 526 use_dx11_(false), |
528 dx11_video_format_converter_media_type_needs_init_(true), | 527 dx11_video_format_converter_media_type_needs_init_(true), |
529 gl_context_(gl_context), | 528 gl_context_(gl_context), |
530 weak_this_factory_(this) { | 529 weak_this_factory_(this) { |
| 530 weak_ptr_ = weak_this_factory_.GetWeakPtr(); |
531 memset(&input_stream_info_, 0, sizeof(input_stream_info_)); | 531 memset(&input_stream_info_, 0, sizeof(input_stream_info_)); |
532 memset(&output_stream_info_, 0, sizeof(output_stream_info_)); | 532 memset(&output_stream_info_, 0, sizeof(output_stream_info_)); |
533 } | 533 } |
534 | 534 |
535 DXVAVideoDecodeAccelerator::~DXVAVideoDecodeAccelerator() { | 535 DXVAVideoDecodeAccelerator::~DXVAVideoDecodeAccelerator() { |
536 client_ = NULL; | 536 client_ = NULL; |
537 } | 537 } |
538 | 538 |
539 bool DXVAVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, | 539 bool DXVAVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, |
540 Client* client) { | 540 Client* client) { |
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2189 D3DSURFACE_DESC surface_desc; | 2189 D3DSURFACE_DESC surface_desc; |
2190 hr = surface->GetDesc(&surface_desc); | 2190 hr = surface->GetDesc(&surface_desc); |
2191 RETURN_ON_HR_FAILURE(hr, "Failed to get surface description", false); | 2191 RETURN_ON_HR_FAILURE(hr, "Failed to get surface description", false); |
2192 *width = surface_desc.Width; | 2192 *width = surface_desc.Width; |
2193 *height = surface_desc.Height; | 2193 *height = surface_desc.Height; |
2194 } | 2194 } |
2195 return true; | 2195 return true; |
2196 } | 2196 } |
2197 | 2197 |
2198 } // namespace content | 2198 } // namespace content |
OLD | NEW |