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/gpu_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 // So we have to wait for the RemoveFilter callback here instead and remove | 452 // So we have to wait for the RemoveFilter callback here instead and remove |
453 // the VDA after it arrives and before returning. | 453 // the VDA after it arrives and before returning. |
454 if (filter_.get()) { | 454 if (filter_.get()) { |
455 stub_->channel()->RemoveFilter(filter_.get()); | 455 stub_->channel()->RemoveFilter(filter_.get()); |
456 filter_removed_.Wait(); | 456 filter_removed_.Wait(); |
457 } | 457 } |
458 | 458 |
459 stub_->channel()->RemoveRoute(host_route_id_); | 459 stub_->channel()->RemoveRoute(host_route_id_); |
460 stub_->RemoveDestructionObserver(this); | 460 stub_->RemoveDestructionObserver(this); |
461 | 461 |
| 462 video_decode_accelerator_.reset(); |
462 delete this; | 463 delete this; |
463 } | 464 } |
464 | 465 |
465 void GpuVideoDecodeAccelerator::SetTextureCleared( | 466 void GpuVideoDecodeAccelerator::SetTextureCleared( |
466 const media::Picture& picture) { | 467 const media::Picture& picture) { |
467 DCHECK(child_message_loop_->BelongsToCurrentThread()); | 468 DCHECK(child_message_loop_->BelongsToCurrentThread()); |
468 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); | 469 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); |
469 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it; | 470 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it; |
470 it = uncleared_textures_.find(picture.picture_buffer_id()); | 471 it = uncleared_textures_.find(picture.picture_buffer_id()); |
471 if (it == uncleared_textures_.end()) | 472 if (it == uncleared_textures_.end()) |
(...skipping 15 matching lines...) Expand all Loading... |
487 return stub_->channel()->Send(message); | 488 return stub_->channel()->Send(message); |
488 } | 489 } |
489 | 490 |
490 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 491 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
491 bool succeeded) { | 492 bool succeeded) { |
492 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 493 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
493 Send(message); | 494 Send(message); |
494 } | 495 } |
495 | 496 |
496 } // namespace content | 497 } // namespace content |
OLD | NEW |