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 | 15 |
| 16 #include "webrtc/base/criticalsection.h" |
16 #include "webrtc/base/onetimeevent.h" | 17 #include "webrtc/base/onetimeevent.h" |
17 #include "webrtc/base/scoped_ptr.h" | |
18 #include "webrtc/base/thread_annotations.h" | 18 #include "webrtc/base/thread_annotations.h" |
19 #include "webrtc/common_types.h" | 19 #include "webrtc/common_types.h" |
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
21 #include "webrtc/modules/rtp_rtcp/source/bitrate.h" | 21 #include "webrtc/modules/rtp_rtcp/source/bitrate.h" |
22 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" | 22 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" |
23 #include "webrtc/modules/rtp_rtcp/source/producer_fec.h" | 23 #include "webrtc/modules/rtp_rtcp/source/producer_fec.h" |
24 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" | 24 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" |
25 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" | 25 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" |
26 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 26 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
27 #include "webrtc/modules/rtp_rtcp/source/video_codec_information.h" | 27 #include "webrtc/modules/rtp_rtcp/source/video_codec_information.h" |
28 #include "webrtc/typedefs.h" | 28 #include "webrtc/typedefs.h" |
29 | 29 |
30 namespace webrtc { | 30 namespace webrtc { |
31 class CriticalSectionWrapper; | |
32 | 31 |
33 class RTPSenderVideo { | 32 class RTPSenderVideo { |
34 public: | 33 public: |
35 RTPSenderVideo(Clock* clock, RTPSenderInterface* rtpSender); | 34 RTPSenderVideo(Clock* clock, RTPSenderInterface* rtpSender); |
36 virtual ~RTPSenderVideo(); | 35 virtual ~RTPSenderVideo(); |
37 | 36 |
38 virtual RtpVideoCodecTypes VideoCodecType() const; | 37 virtual RtpVideoCodecTypes VideoCodecType() const; |
39 | 38 |
40 size_t FECPacketOverhead() const; | 39 size_t FECPacketOverhead() const; |
41 | 40 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 const size_t rtpHeaderLength, | 90 const size_t rtpHeaderLength, |
92 uint16_t video_seq_num, | 91 uint16_t video_seq_num, |
93 const uint32_t capture_timestamp, | 92 const uint32_t capture_timestamp, |
94 int64_t capture_time_ms, | 93 int64_t capture_time_ms, |
95 StorageType media_packet_storage, | 94 StorageType media_packet_storage, |
96 bool protect); | 95 bool protect); |
97 | 96 |
98 RTPSenderInterface& _rtpSender; | 97 RTPSenderInterface& _rtpSender; |
99 | 98 |
100 // Should never be held when calling out of this class. | 99 // Should never be held when calling out of this class. |
101 const rtc::scoped_ptr<CriticalSectionWrapper> crit_; | 100 const rtc::CriticalSection crit_; |
102 | 101 |
103 RtpVideoCodecTypes _videoType; | 102 RtpVideoCodecTypes _videoType; |
104 int32_t _retransmissionSettings GUARDED_BY(crit_); | 103 int32_t _retransmissionSettings GUARDED_BY(crit_); |
105 | 104 |
106 // FEC | 105 // FEC |
107 ForwardErrorCorrection fec_; | 106 ForwardErrorCorrection fec_; |
108 bool fec_enabled_ GUARDED_BY(crit_); | 107 bool fec_enabled_ GUARDED_BY(crit_); |
109 int8_t red_payload_type_ GUARDED_BY(crit_); | 108 int8_t red_payload_type_ GUARDED_BY(crit_); |
110 int8_t fec_payload_type_ GUARDED_BY(crit_); | 109 int8_t fec_payload_type_ GUARDED_BY(crit_); |
111 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_); | 110 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_); |
112 FecProtectionParams key_fec_params_ GUARDED_BY(crit_); | 111 FecProtectionParams key_fec_params_ GUARDED_BY(crit_); |
113 ProducerFec producer_fec_ GUARDED_BY(crit_); | 112 ProducerFec producer_fec_ GUARDED_BY(crit_); |
114 | 113 |
115 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets | 114 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets |
116 // and any padding overhead. | 115 // and any padding overhead. |
117 Bitrate _fecOverheadRate; | 116 Bitrate _fecOverheadRate; |
118 // Bitrate used for video payload and RTP headers | 117 // Bitrate used for video payload and RTP headers |
119 Bitrate _videoBitrate; | 118 Bitrate _videoBitrate; |
120 OneTimeEvent first_frame_sent_; | 119 OneTimeEvent first_frame_sent_; |
121 }; | 120 }; |
122 } // namespace webrtc | 121 } // namespace webrtc |
123 | 122 |
124 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 123 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
OLD | NEW |