| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace webrtc { | 30 namespace webrtc { |
| 31 | 31 |
| 32 class RTPSenderVideo { | 32 class RTPSenderVideo { |
| 33 public: | 33 public: |
| 34 RTPSenderVideo(Clock* clock, RTPSender* rtpSender); | 34 RTPSenderVideo(Clock* clock, RTPSender* rtpSender); |
| 35 virtual ~RTPSenderVideo(); | 35 virtual ~RTPSenderVideo(); |
| 36 | 36 |
| 37 virtual RtpVideoCodecTypes VideoCodecType() const; | 37 virtual RtpVideoCodecTypes VideoCodecType() const; |
| 38 | 38 |
| 39 size_t FECPacketOverhead() const; | 39 size_t FecPacketOverhead() const; |
| 40 | 40 |
| 41 static RtpUtility::Payload* CreateVideoPayload( | 41 static RtpUtility::Payload* CreateVideoPayload( |
| 42 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 42 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
| 43 int8_t payload_type); | 43 int8_t payload_type); |
| 44 | 44 |
| 45 bool SendVideo(RtpVideoCodecTypes video_type, | 45 bool SendVideo(RtpVideoCodecTypes video_type, |
| 46 FrameType frame_type, | 46 FrameType frame_type, |
| 47 int8_t payload_type, | 47 int8_t payload_type, |
| 48 uint32_t capture_timestamp, | 48 uint32_t capture_timestamp, |
| 49 int64_t capture_time_ms, | 49 int64_t capture_time_ms, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 RTPSender* const rtp_sender_; | 95 RTPSender* const rtp_sender_; |
| 96 Clock* const clock_; | 96 Clock* const clock_; |
| 97 | 97 |
| 98 // Should never be held when calling out of this class. | 98 // Should never be held when calling out of this class. |
| 99 rtc::CriticalSection crit_; | 99 rtc::CriticalSection crit_; |
| 100 | 100 |
| 101 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; | 101 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; |
| 102 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; | 102 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; |
| 103 | 103 |
| 104 // FEC | 104 // FEC |
| 105 ForwardErrorCorrection fec_; | |
| 106 bool fec_enabled_ GUARDED_BY(crit_) = false; | 105 bool fec_enabled_ GUARDED_BY(crit_) = false; |
| 107 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; | 106 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; |
| 108 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; | 107 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; |
| 109 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 108 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
| 110 0, 1, kFecMaskRandom}; | 109 0, 1, kFecMaskRandom}; |
| 111 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 110 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
| 112 0, 1, kFecMaskRandom}; | 111 0, 1, kFecMaskRandom}; |
| 113 ProducerFec producer_fec_ GUARDED_BY(crit_); | 112 ProducerFec producer_fec_ GUARDED_BY(crit_); |
| 114 | 113 |
| 115 rtc::CriticalSection stats_crit_; | 114 rtc::CriticalSection stats_crit_; |
| 116 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets | 115 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets |
| 117 // and any padding overhead. | 116 // and any padding overhead. |
| 118 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); | 117 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); |
| 119 // Bitrate used for video payload and RTP headers. | 118 // Bitrate used for video payload and RTP headers. |
| 120 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); | 119 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); |
| 121 OneTimeEvent first_frame_sent_; | 120 OneTimeEvent first_frame_sent_; |
| 122 }; | 121 }; |
| 123 | 122 |
| 124 } // namespace webrtc | 123 } // namespace webrtc |
| 125 | 124 |
| 126 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 125 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
| OLD | NEW |