1 /* 2 * Copyright 2020 The WebRTC Project Authors. All rights reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef CALL_ADAPTATION_ADAPTATION_LISTENER_H_ 12 #define CALL_ADAPTATION_ADAPTATION_LISTENER_H_ 13 14 #include "api/adaptation/resource.h" 15 #include "api/scoped_refptr.h" 16 #include "call/adaptation/video_source_restrictions.h" 17 #include "call/adaptation/video_stream_input_state.h" 18 19 namespace webrtc { 20 21 // TODO(hbos): Can this be consolidated with 22 // ResourceAdaptationProcessorListener::OnVideoSourceRestrictionsUpdated()? Both 23 // listen to adaptations being applied, but on different layers with different 24 // arguments. 25 class AdaptationListener { 26 public: 27 virtual ~AdaptationListener(); 28 29 // TODO(https://crbug.com/webrtc/11172): When we have multi-stream adaptation 30 // support, this interface needs to indicate which stream the adaptation 31 // applies to. 32 virtual void OnAdaptationApplied( 33 const VideoStreamInputState& input_state, 34 const VideoSourceRestrictions& restrictions_before, 35 const VideoSourceRestrictions& restrictions_after, 36 rtc::scoped_refptr<Resource> reason_resource) = 0; 37 }; 38 39 } // namespace webrtc 40 41 #endif // CALL_ADAPTATION_ADAPTATION_LISTENER_H_ 42