| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #ifndef WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ | 10 #ifndef WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ |
| 11 #define WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ | 11 #define WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ |
| 12 | 12 |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "webrtc/base/criticalsection.h" | 15 #include "webrtc/base/criticalsection.h" |
| 16 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 16 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 17 #include "webrtc/system_wrappers/include/clock.h" | 17 #include "webrtc/system_wrappers/include/clock.h" |
| 18 #include "webrtc/typedefs.h" | 18 #include "webrtc/typedefs.h" |
| 19 | 19 |
| 20 namespace webrtc { | 20 namespace webrtc { |
| 21 | 21 |
| 22 class ViEEncoder; | 22 class ViEEncoder; |
| 23 | 23 |
| 24 class EncoderRtcpFeedback : public RtcpIntraFrameObserver { | 24 class EncoderRtcpFeedback : public RtcpIntraFrameObserver { |
| 25 public: | 25 public: |
| 26 EncoderRtcpFeedback(Clock* clock, | 26 EncoderRtcpFeedback(Clock* clock, |
| 27 const std::vector<uint32_t>& ssrcs, | 27 const std::vector<uint32_t>& ssrcs, |
| 28 ViEEncoder* encoder); | 28 ViEEncoder* encoder); |
| 29 void OnReceivedIntraFrameRequest(uint32_t ssrc) override; | 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 | 30 |
| 33 private: | 31 private: |
| 34 bool HasSsrc(uint32_t ssrc); | 32 bool HasSsrc(uint32_t ssrc); |
| 35 size_t GetStreamIndex(uint32_t ssrc); | 33 size_t GetStreamIndex(uint32_t ssrc); |
| 36 | 34 |
| 37 Clock* const clock_; | 35 Clock* const clock_; |
| 38 const std::vector<uint32_t> ssrcs_; | 36 const std::vector<uint32_t> ssrcs_; |
| 39 ViEEncoder* const vie_encoder_; | 37 ViEEncoder* const vie_encoder_; |
| 40 | 38 |
| 41 rtc::CriticalSection crit_; | 39 rtc::CriticalSection crit_; |
| 42 std::vector<int64_t> time_last_intra_request_ms_ GUARDED_BY(crit_); | 40 std::vector<int64_t> time_last_intra_request_ms_ GUARDED_BY(crit_); |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 } // namespace webrtc | 43 } // namespace webrtc |
| 46 | 44 |
| 47 #endif // WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ | 45 #endif // WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_ |
| OLD | NEW |