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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
17 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
18 #include "webrtc/base/onetimeevent.h" | 18 #include "webrtc/base/onetimeevent.h" |
19 #include "webrtc/base/rate_statistics.h" | 19 #include "webrtc/base/rate_statistics.h" |
20 #include "webrtc/base/sequenced_task_checker.h" | 20 #include "webrtc/base/sequenced_task_checker.h" |
21 #include "webrtc/base/thread_annotations.h" | 21 #include "webrtc/base/thread_annotations.h" |
22 #include "webrtc/common_types.h" | 22 #include "webrtc/common_types.h" |
23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
24 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" | 24 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" |
25 #include "webrtc/modules/rtp_rtcp/source/producer_fec.h" | |
26 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" | 25 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" |
27 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" | 26 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" |
28 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 27 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
| 28 #include "webrtc/modules/rtp_rtcp/source/ulpfec_generator.h" |
29 #include "webrtc/modules/rtp_rtcp/source/video_codec_information.h" | 29 #include "webrtc/modules/rtp_rtcp/source/video_codec_information.h" |
30 #include "webrtc/typedefs.h" | 30 #include "webrtc/typedefs.h" |
31 | 31 |
32 namespace webrtc { | 32 namespace webrtc { |
33 class RtpPacketToSend; | 33 class RtpPacketToSend; |
34 | 34 |
35 class RTPSenderVideo { | 35 class RTPSenderVideo { |
36 public: | 36 public: |
37 RTPSenderVideo(Clock* clock, RTPSender* rtpSender); | 37 RTPSenderVideo(Clock* clock, RTPSender* rtpSender); |
38 virtual ~RTPSenderVideo(); | 38 virtual ~RTPSenderVideo(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 VideoRotation last_rotation_ GUARDED_BY(encoder_checker_) = kVideoRotation_0; | 97 VideoRotation last_rotation_ GUARDED_BY(encoder_checker_) = kVideoRotation_0; |
98 | 98 |
99 // FEC | 99 // FEC |
100 bool fec_enabled_ GUARDED_BY(crit_) = false; | 100 bool fec_enabled_ GUARDED_BY(crit_) = false; |
101 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; | 101 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; |
102 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; | 102 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; |
103 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 103 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
104 0, 1, kFecMaskRandom}; | 104 0, 1, kFecMaskRandom}; |
105 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 105 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
106 0, 1, kFecMaskRandom}; | 106 0, 1, kFecMaskRandom}; |
107 ProducerFec producer_fec_ GUARDED_BY(crit_); | 107 UlpfecGenerator ulpfec_generator_ GUARDED_BY(crit_); |
108 | 108 |
109 rtc::CriticalSection stats_crit_; | 109 rtc::CriticalSection stats_crit_; |
110 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets | 110 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets |
111 // and any padding overhead. | 111 // and any padding overhead. |
112 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); | 112 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); |
113 // Bitrate used for video payload and RTP headers. | 113 // Bitrate used for video payload and RTP headers. |
114 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); | 114 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); |
115 OneTimeEvent first_frame_sent_; | 115 OneTimeEvent first_frame_sent_; |
116 }; | 116 }; |
117 | 117 |
118 } // namespace webrtc | 118 } // namespace webrtc |
119 | 119 |
120 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 120 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
OLD | NEW |