| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 } | 761 } |
| 762 | 762 |
| 763 void ChannelManager::GetSupportedFormats_w( | 763 void ChannelManager::GetSupportedFormats_w( |
| 764 VideoCapturer* capturer, | 764 VideoCapturer* capturer, |
| 765 std::vector<cricket::VideoFormat>* out_formats) const { | 765 std::vector<cricket::VideoFormat>* out_formats) const { |
| 766 const std::vector<VideoFormat>* formats = capturer->GetSupportedFormats(); | 766 const std::vector<VideoFormat>* formats = capturer->GetSupportedFormats(); |
| 767 if (formats != NULL) | 767 if (formats != NULL) |
| 768 *out_formats = *formats; | 768 *out_formats = *formats; |
| 769 } | 769 } |
| 770 | 770 |
| 771 // TODO(janahan): For now pass this request through the mediaengine to the | |
| 772 // voice and video engines to do the real work. Once the capturer refactoring | |
| 773 // is done, we will access the capturer using the ssrc (similar to how the | |
| 774 // renderer is accessed today) and register with it directly. | |
| 775 bool ChannelManager::RegisterVideoProcessor(VideoCapturer* capturer, | |
| 776 VideoProcessor* processor) { | |
| 777 return initialized_ && worker_thread_->Invoke<bool>( | |
| 778 Bind(&ChannelManager::RegisterVideoProcessor_w, this, | |
| 779 capturer, processor)); | |
| 780 } | |
| 781 | |
| 782 bool ChannelManager::RegisterVideoProcessor_w(VideoCapturer* capturer, | |
| 783 VideoProcessor* processor) { | |
| 784 return capture_manager_->AddVideoProcessor(capturer, processor); | |
| 785 } | |
| 786 | |
| 787 bool ChannelManager::UnregisterVideoProcessor(VideoCapturer* capturer, | |
| 788 VideoProcessor* processor) { | |
| 789 return initialized_ && worker_thread_->Invoke<bool>( | |
| 790 Bind(&ChannelManager::UnregisterVideoProcessor_w, this, | |
| 791 capturer, processor)); | |
| 792 } | |
| 793 | |
| 794 bool ChannelManager::UnregisterVideoProcessor_w(VideoCapturer* capturer, | |
| 795 VideoProcessor* processor) { | |
| 796 return capture_manager_->RemoveVideoProcessor(capturer, processor); | |
| 797 } | |
| 798 | |
| 799 bool ChannelManager::RegisterVoiceProcessor( | 771 bool ChannelManager::RegisterVoiceProcessor( |
| 800 uint32 ssrc, | 772 uint32 ssrc, |
| 801 VoiceProcessor* processor, | 773 VoiceProcessor* processor, |
| 802 MediaProcessorDirection direction) { | 774 MediaProcessorDirection direction) { |
| 803 return initialized_ && worker_thread_->Invoke<bool>( | 775 return initialized_ && worker_thread_->Invoke<bool>( |
| 804 Bind(&MediaEngineInterface::RegisterVoiceProcessor, media_engine_.get(), | 776 Bind(&MediaEngineInterface::RegisterVoiceProcessor, media_engine_.get(), |
| 805 ssrc, processor, direction)); | 777 ssrc, processor, direction)); |
| 806 } | 778 } |
| 807 | 779 |
| 808 bool ChannelManager::UnregisterVoiceProcessor( | 780 bool ChannelManager::UnregisterVoiceProcessor( |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 const VideoFormat& max_format) { | 918 const VideoFormat& max_format) { |
| 947 device_manager_->SetVideoCaptureDeviceMaxFormat(usb_id, max_format); | 919 device_manager_->SetVideoCaptureDeviceMaxFormat(usb_id, max_format); |
| 948 } | 920 } |
| 949 | 921 |
| 950 bool ChannelManager::StartAecDump(rtc::PlatformFile file) { | 922 bool ChannelManager::StartAecDump(rtc::PlatformFile file) { |
| 951 return worker_thread_->Invoke<bool>( | 923 return worker_thread_->Invoke<bool>( |
| 952 Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file)); | 924 Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file)); |
| 953 } | 925 } |
| 954 | 926 |
| 955 } // namespace cricket | 927 } // namespace cricket |
| OLD | NEW |