2012-09-06 08:19:40 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
2016-10-06 08:35:11 -07:00
|
|
|
#ifndef WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_
|
|
|
|
|
#define WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_
|
2012-09-06 08:19:40 +00:00
|
|
|
|
2015-05-05 15:16:30 +02:00
|
|
|
#include <vector>
|
2012-09-06 08:19:40 +00:00
|
|
|
|
2016-01-21 23:24:59 +01:00
|
|
|
#include "webrtc/base/criticalsection.h"
|
2016-02-19 17:36:01 +01:00
|
|
|
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
2016-05-04 11:26:51 -07:00
|
|
|
#include "webrtc/system_wrappers/include/clock.h"
|
2013-05-17 13:44:48 +00:00
|
|
|
#include "webrtc/typedefs.h"
|
2012-09-06 08:19:40 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class ViEEncoder;
|
|
|
|
|
|
2016-10-06 08:35:11 -07:00
|
|
|
class EncoderRtcpFeedback : public RtcpIntraFrameObserver {
|
2012-09-06 08:19:40 +00:00
|
|
|
public:
|
2016-10-06 08:35:11 -07:00
|
|
|
EncoderRtcpFeedback(Clock* clock,
|
2016-05-04 11:26:51 -07:00
|
|
|
const std::vector<uint32_t>& ssrcs,
|
|
|
|
|
ViEEncoder* encoder);
|
2016-02-19 17:36:01 +01:00
|
|
|
void OnReceivedIntraFrameRequest(uint32_t ssrc) override;
|
|
|
|
|
void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) override;
|
|
|
|
|
void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) override;
|
2012-09-06 08:19:40 +00:00
|
|
|
|
|
|
|
|
private:
|
2016-05-04 11:26:51 -07:00
|
|
|
bool HasSsrc(uint32_t ssrc);
|
|
|
|
|
size_t GetStreamIndex(uint32_t ssrc);
|
|
|
|
|
|
|
|
|
|
Clock* const clock_;
|
|
|
|
|
const std::vector<uint32_t> ssrcs_;
|
|
|
|
|
ViEEncoder* const vie_encoder_;
|
2012-09-06 08:19:40 +00:00
|
|
|
|
2016-05-04 11:26:51 -07:00
|
|
|
rtc::CriticalSection crit_;
|
|
|
|
|
std::vector<int64_t> time_last_intra_request_ms_ GUARDED_BY(crit_);
|
2012-09-06 08:19:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2016-10-06 08:35:11 -07:00
|
|
|
#endif // WEBRTC_VIDEO_ENCODER_RTCP_FEEDBACK_H_
|