| 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 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 class ViEEncoder; | 25 class ViEEncoder; |
| 26 | 26 |
| 27 class EncoderStateFeedback : public RtcpIntraFrameObserver { | 27 class EncoderStateFeedback : public RtcpIntraFrameObserver { |
| 28 public: | 28 public: |
| 29 EncoderStateFeedback(); | 29 EncoderStateFeedback(); |
| 30 | 30 |
| 31 // Adds an encoder to receive feedback for a set of SSRCs. | 31 // Adds an encoder to receive feedback for a set of SSRCs. |
| 32 void Init(const std::vector<uint32_t>& ssrc, ViEEncoder* encoder); | 32 void Init(const std::vector<uint32_t>& ssrc, ViEEncoder* encoder); |
| 33 | 33 |
| 34 // Removes the registered encoder. Necessary since RTP modules outlive | |
| 35 // ViEEncoder. | |
| 36 // TODO(pbos): Make sure RTP modules are not running when tearing down | |
| 37 // ViEEncoder, then remove this function. | |
| 38 void TearDown(); | |
| 39 | |
| 40 void OnReceivedIntraFrameRequest(uint32_t ssrc) override; | 34 void OnReceivedIntraFrameRequest(uint32_t ssrc) override; |
| 41 void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) override; | 35 void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) override; |
| 42 void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) override; | 36 void OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) override; |
| 43 void OnLocalSsrcChanged(uint32_t old_ssrc, uint32_t new_ssrc) override; | 37 void OnLocalSsrcChanged(uint32_t old_ssrc, uint32_t new_ssrc) override; |
| 44 | 38 |
| 45 private: | 39 private: |
| 46 bool HasSsrc(uint32_t ssrc) EXCLUSIVE_LOCKS_REQUIRED(crit_); | 40 bool HasSsrc(uint32_t ssrc) EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 47 rtc::CriticalSection crit_; | 41 rtc::CriticalSection crit_; |
| 48 | 42 |
| 49 std::vector<uint32_t> ssrcs_ GUARDED_BY(crit_); | 43 std::vector<uint32_t> ssrcs_ GUARDED_BY(crit_); |
| 50 ViEEncoder* vie_encoder_ GUARDED_BY(crit_); | 44 ViEEncoder* vie_encoder_ GUARDED_BY(crit_); |
| 51 }; | 45 }; |
| 52 | 46 |
| 53 } // namespace webrtc | 47 } // namespace webrtc |
| 54 | 48 |
| 55 #endif // WEBRTC_VIDEO_ENCODER_STATE_FEEDBACK_H_ | 49 #endif // WEBRTC_VIDEO_ENCODER_STATE_FEEDBACK_H_ |
| OLD | NEW |