Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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 // TODO(scherkus): clean up PipelineImpl... too many crazy function names, | 5 // TODO(scherkus): clean up PipelineImpl... too many crazy function names, |
| 6 // potential deadlocks, etc... | 6 // potential deadlocks, etc... |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/condition_variable.h" | 9 #include "base/condition_variable.h" |
| 10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 681 // Transition to ended, executing the callback if present. | 681 // Transition to ended, executing the callback if present. |
| 682 state_ = kEnded; | 682 state_ = kEnded; |
| 683 if (ended_callback_.get()) { | 683 if (ended_callback_.get()) { |
| 684 ended_callback_->Run(); | 684 ended_callback_->Run(); |
| 685 } | 685 } |
| 686 } | 686 } |
| 687 | 687 |
| 688 void PipelineImpl::BroadcastMessageTask(FilterMessage message) { | 688 void PipelineImpl::BroadcastMessageTask(FilterMessage message) { |
| 689 DCHECK_EQ(MessageLoop::current(), message_loop_); | 689 DCHECK_EQ(MessageLoop::current(), message_loop_); |
| 690 | 690 |
| 691 // TODO(kylep): This is a horribly ugly hack, but we have no better way to log | |
| 692 // that audio is not and will not be working. | |
|
awong
2009/08/14 20:33:10
File a bug about this and put the bug number into
kylep
2009/08/14 20:48:02
Bug filed: http://crbug.com/19384
| |
| 693 if (message == media::kMsgDisableAudio) | |
| 694 rendered_mime_types_.erase(mime_type::kMajorTypeAudio); | |
|
scherkus (not reviewing)
2009/08/14 20:34:44
is this valid?
I think erase takes an iterator, b
kylep
2009/08/14 20:48:02
Yeah, I looked it up. It takes either an iterator
scherkus (not reviewing)
2009/08/14 22:28:17
What if the element doesn't exist? I have this fe
| |
| 695 | |
| 691 // Broadcast the message to all filters. | 696 // Broadcast the message to all filters. |
| 692 for (FilterVector::iterator iter = filters_.begin(); | 697 for (FilterVector::iterator iter = filters_.begin(); |
| 693 iter != filters_.end(); | 698 iter != filters_.end(); |
| 694 ++iter) { | 699 ++iter) { |
| 695 (*iter)->OnReceivedMessage(message); | 700 (*iter)->OnReceivedMessage(message); |
| 696 } | 701 } |
| 697 } | 702 } |
| 698 | 703 |
| 699 void PipelineImpl::FilterStateTransitionTask() { | 704 void PipelineImpl::FilterStateTransitionTask() { |
| 700 DCHECK_EQ(MessageLoop::current(), message_loop_); | 705 DCHECK_EQ(MessageLoop::current(), message_loop_); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 911 | 916 |
| 912 // Reset the pipeline, which will decrement a reference to this object. | 917 // Reset the pipeline, which will decrement a reference to this object. |
| 913 // We will get destroyed as soon as the remaining tasks finish executing. | 918 // We will get destroyed as soon as the remaining tasks finish executing. |
| 914 // To be safe, we'll set our pipeline reference to NULL. | 919 // To be safe, we'll set our pipeline reference to NULL. |
| 915 filters_.clear(); | 920 filters_.clear(); |
| 916 filter_types_.clear(); | 921 filter_types_.clear(); |
| 917 STLDeleteElements(&filter_threads_); | 922 STLDeleteElements(&filter_threads_); |
| 918 } | 923 } |
| 919 | 924 |
| 920 } // namespace media | 925 } // namespace media |
| OLD | NEW |