| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "media/gpu/media_foundation_video_encode_accelerator_win.h" | 5 #include "media/gpu/media_foundation_video_encode_accelerator_win.h" |
| 6 | 6 |
| 7 #pragma warning(push) | 7 #pragma warning(push) |
| 8 #pragma warning(disable : 4800) // Disable warning for added padding. | 8 #pragma warning(disable : 4800) // Disable warning for added padding. |
| 9 | 9 |
| 10 #include <codecapi.h> | 10 #include <codecapi.h> |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 DVLOG(3) << __func__; | 687 DVLOG(3) << __func__; |
| 688 DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread()); | 688 DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread()); |
| 689 | 689 |
| 690 // Cancel all encoder thread callbacks. | 690 // Cancel all encoder thread callbacks. |
| 691 encoder_task_weak_factory_.InvalidateWeakPtrs(); | 691 encoder_task_weak_factory_.InvalidateWeakPtrs(); |
| 692 | 692 |
| 693 ReleaseEncoderResources(); | 693 ReleaseEncoderResources(); |
| 694 } | 694 } |
| 695 | 695 |
| 696 void MediaFoundationVideoEncodeAccelerator::ReleaseEncoderResources() { | 696 void MediaFoundationVideoEncodeAccelerator::ReleaseEncoderResources() { |
| 697 encoder_.Release(); | 697 encoder_.Reset(); |
| 698 codec_api_.Release(); | 698 codec_api_.Reset(); |
| 699 imf_input_media_type_.Release(); | 699 imf_input_media_type_.Reset(); |
| 700 imf_output_media_type_.Release(); | 700 imf_output_media_type_.Reset(); |
| 701 input_sample_.Release(); | 701 input_sample_.Reset(); |
| 702 output_sample_.Release(); | 702 output_sample_.Reset(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 } // namespace content | 705 } // namespace content |
| OLD | NEW |