OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // dropped otherwise. | 43 // dropped otherwise. |
44 void set_active(bool active); | 44 void set_active(bool active); |
45 bool active(); | 45 bool active(); |
46 | 46 |
47 // Implements EncodedImageCallback. | 47 // Implements EncodedImageCallback. |
48 // Returns 0 if the packet was routed / sent, -1 otherwise. | 48 // Returns 0 if the packet was routed / sent, -1 otherwise. |
49 int32_t Encoded(const EncodedImage& encoded_image, | 49 int32_t Encoded(const EncodedImage& encoded_image, |
50 const CodecSpecificInfo* codec_specific_info, | 50 const CodecSpecificInfo* codec_specific_info, |
51 const RTPFragmentationHeader* fragmentation) override; | 51 const RTPFragmentationHeader* fragmentation) override; |
52 | 52 |
| 53 // Configures current target bitrate. |
| 54 void SetTargetSendBitrate(uint32_t bitrate_bps); |
| 55 |
53 // Returns the maximum allowed data payload length, given the configured MTU | 56 // Returns the maximum allowed data payload length, given the configured MTU |
54 // and RTP headers. | 57 // and RTP headers. |
55 size_t MaxPayloadLength() const; | 58 size_t MaxPayloadLength() const; |
56 | 59 |
57 private: | 60 private: |
58 void UpdateModuleSendingState() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 61 void UpdateModuleSendingState() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
59 | 62 |
60 rtc::CriticalSection crit_; | 63 rtc::CriticalSection crit_; |
61 bool active_ GUARDED_BY(crit_); | 64 bool active_ GUARDED_BY(crit_); |
62 std::vector<VideoStream> streams_ GUARDED_BY(crit_); | 65 std::vector<VideoStream> streams_ GUARDED_BY(crit_); |
63 size_t num_sending_modules_ GUARDED_BY(crit_); | 66 size_t num_sending_modules_ GUARDED_BY(crit_); |
64 | 67 |
65 // Rtp modules are assumed to be sorted in simulcast index order. Not owned. | 68 // Rtp modules are assumed to be sorted in simulcast index order. Not owned. |
66 const std::vector<RtpRtcp*> rtp_modules_; | 69 const std::vector<RtpRtcp*> rtp_modules_; |
67 const int payload_type_; | 70 const int payload_type_; |
68 | 71 |
69 RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); | 72 RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); |
70 }; | 73 }; |
71 | 74 |
72 } // namespace webrtc | 75 } // namespace webrtc |
73 | 76 |
74 #endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ | 77 #endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ |
OLD | NEW |