| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2012 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 #ifndef WEBRTC_VIDEO_ENCODER_STATE_FEEDBACK_H_ | |
| 11 #define WEBRTC_VIDEO_ENCODER_STATE_FEEDBACK_H_ | |
| 12 | |
| 13 #include <vector> | |
| 14 | |
| 15 #include "webrtc/base/criticalsection.h" | |
| 16 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | |
| 17 #include "webrtc/system_wrappers/include/clock.h" | |
| 18 #include "webrtc/typedefs.h" | |
| 19 | |
| 20 namespace webrtc { | |
| 21 | |
| 22 class ViEEncoder; | |
| 23 | |
| 24 class EncoderStateFeedback : public RtcpIntraFrameObserver { | |
| 25 public: | |
| 26 EncoderStateFeedback(Clock* clock, | |
| 27 const std::vector<uint32_t>& ssrcs, | |
| 28 ViEEncoder* encoder); | |
| 29 void OnReceivedIntraFrameRequest(uint32_t ssrc) override; | |
| 30 void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) override; | |
| 31 void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) override; | |
| 32 void OnLocalSsrcChanged(uint32_t old_ssrc, uint32_t new_ssrc) override; | |
| 33 | |
| 34 private: | |
| 35 bool HasSsrc(uint32_t ssrc); | |
| 36 size_t GetStreamIndex(uint32_t ssrc); | |
| 37 | |
| 38 Clock* const clock_; | |
| 39 const std::vector<uint32_t> ssrcs_; | |
| 40 ViEEncoder* const vie_encoder_; | |
| 41 | |
| 42 rtc::CriticalSection crit_; | |
| 43 std::vector<int64_t> time_last_intra_request_ms_ GUARDED_BY(crit_); | |
| 44 }; | |
| 45 | |
| 46 } // namespace webrtc | |
| 47 | |
| 48 #endif // WEBRTC_VIDEO_ENCODER_STATE_FEEDBACK_H_ | |
| OLD | NEW |