| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 bool inc_sequence_number = true) = 0; | 60 bool inc_sequence_number = true) = 0; |
| 61 | 61 |
| 62 virtual size_t RTPHeaderLength() const = 0; | 62 virtual size_t RTPHeaderLength() const = 0; |
| 63 // Returns the next sequence number to use for a packet and allocates | 63 // Returns the next sequence number to use for a packet and allocates |
| 64 // 'packets_to_send' number of sequence numbers. It's important all allocated | 64 // 'packets_to_send' number of sequence numbers. It's important all allocated |
| 65 // sequence numbers are used in sequence to avoid perceived packet loss. | 65 // sequence numbers are used in sequence to avoid perceived packet loss. |
| 66 virtual uint16_t AllocateSequenceNumber(uint16_t packets_to_send) = 0; | 66 virtual uint16_t AllocateSequenceNumber(uint16_t packets_to_send) = 0; |
| 67 virtual uint16_t SequenceNumber() const = 0; | 67 virtual uint16_t SequenceNumber() const = 0; |
| 68 virtual size_t MaxPayloadLength() const = 0; | 68 virtual size_t MaxPayloadLength() const = 0; |
| 69 virtual size_t MaxDataPayloadLength() const = 0; | 69 virtual size_t MaxDataPayloadLength() const = 0; |
| 70 virtual uint16_t PacketOverHead() const = 0; | |
| 71 virtual uint16_t ActualSendBitrateKbit() const = 0; | 70 virtual uint16_t ActualSendBitrateKbit() const = 0; |
| 72 | 71 |
| 73 virtual int32_t SendToNetwork(uint8_t* data_buffer, | 72 virtual int32_t SendToNetwork(uint8_t* data_buffer, |
| 74 size_t payload_length, | 73 size_t payload_length, |
| 75 size_t rtp_header_length, | 74 size_t rtp_header_length, |
| 76 int64_t capture_time_ms, | 75 int64_t capture_time_ms, |
| 77 StorageType storage, | 76 StorageType storage, |
| 78 RtpPacketSender::Priority priority) = 0; | 77 RtpPacketSender::Priority priority) = 0; |
| 79 | 78 |
| 80 virtual bool UpdateVideoRotation(uint8_t* rtp_packet, | 79 virtual bool UpdateVideoRotation(uint8_t* rtp_packet, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void SetStartTimestamp(uint32_t timestamp, bool force); | 138 void SetStartTimestamp(uint32_t timestamp, bool force); |
| 140 | 139 |
| 141 uint32_t GenerateNewSSRC(); | 140 uint32_t GenerateNewSSRC(); |
| 142 void SetSSRC(uint32_t ssrc); | 141 void SetSSRC(uint32_t ssrc); |
| 143 | 142 |
| 144 uint16_t SequenceNumber() const override; | 143 uint16_t SequenceNumber() const override; |
| 145 void SetSequenceNumber(uint16_t seq); | 144 void SetSequenceNumber(uint16_t seq); |
| 146 | 145 |
| 147 void SetCsrcs(const std::vector<uint32_t>& csrcs); | 146 void SetCsrcs(const std::vector<uint32_t>& csrcs); |
| 148 | 147 |
| 149 int32_t SetMaxPayloadLength(size_t length, uint16_t packet_over_head); | 148 void SetMaxPayloadLength(size_t max_payload_length); |
| 150 | 149 |
| 151 int32_t SendOutgoingData(FrameType frame_type, | 150 int32_t SendOutgoingData(FrameType frame_type, |
| 152 int8_t payload_type, | 151 int8_t payload_type, |
| 153 uint32_t timestamp, | 152 uint32_t timestamp, |
| 154 int64_t capture_time_ms, | 153 int64_t capture_time_ms, |
| 155 const uint8_t* payload_data, | 154 const uint8_t* payload_data, |
| 156 size_t payload_size, | 155 size_t payload_size, |
| 157 const RTPFragmentationHeader* fragmentation, | 156 const RTPFragmentationHeader* fragmentation, |
| 158 const RTPVideoHeader* rtp_hdr = NULL); | 157 const RTPVideoHeader* rtp_hdr = NULL); |
| 159 | 158 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 int8_t payload_type, | 239 int8_t payload_type, |
| 241 bool marker_bit, | 240 bool marker_bit, |
| 242 uint32_t capture_timestamp, | 241 uint32_t capture_timestamp, |
| 243 int64_t capture_time_ms, | 242 int64_t capture_time_ms, |
| 244 const bool timestamp_provided = true, | 243 const bool timestamp_provided = true, |
| 245 const bool inc_sequence_number = true) override; | 244 const bool inc_sequence_number = true) override; |
| 246 | 245 |
| 247 size_t RTPHeaderLength() const override; | 246 size_t RTPHeaderLength() const override; |
| 248 uint16_t AllocateSequenceNumber(uint16_t packets_to_send) override; | 247 uint16_t AllocateSequenceNumber(uint16_t packets_to_send) override; |
| 249 size_t MaxPayloadLength() const override; | 248 size_t MaxPayloadLength() const override; |
| 250 uint16_t PacketOverHead() const override; | |
| 251 | 249 |
| 252 // Current timestamp. | 250 // Current timestamp. |
| 253 uint32_t Timestamp() const override; | 251 uint32_t Timestamp() const override; |
| 254 uint32_t SSRC() const override; | 252 uint32_t SSRC() const override; |
| 255 | 253 |
| 256 int32_t SendToNetwork(uint8_t* data_buffer, | 254 int32_t SendToNetwork(uint8_t* data_buffer, |
| 257 size_t payload_length, | 255 size_t payload_length, |
| 258 size_t rtp_header_length, | 256 size_t rtp_header_length, |
| 259 int64_t capture_time_ms, | 257 int64_t capture_time_ms, |
| 260 StorageType storage, | 258 StorageType storage, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 RtpPacketSender* const paced_sender_; | 428 RtpPacketSender* const paced_sender_; |
| 431 TransportSequenceNumberAllocator* const transport_sequence_number_allocator_; | 429 TransportSequenceNumberAllocator* const transport_sequence_number_allocator_; |
| 432 TransportFeedbackObserver* const transport_feedback_observer_; | 430 TransportFeedbackObserver* const transport_feedback_observer_; |
| 433 int64_t last_capture_time_ms_sent_; | 431 int64_t last_capture_time_ms_sent_; |
| 434 rtc::CriticalSection send_critsect_; | 432 rtc::CriticalSection send_critsect_; |
| 435 | 433 |
| 436 Transport *transport_; | 434 Transport *transport_; |
| 437 bool sending_media_ GUARDED_BY(send_critsect_); | 435 bool sending_media_ GUARDED_BY(send_critsect_); |
| 438 | 436 |
| 439 size_t max_payload_length_; | 437 size_t max_payload_length_; |
| 440 uint16_t packet_over_head_; | |
| 441 | 438 |
| 442 int8_t payload_type_ GUARDED_BY(send_critsect_); | 439 int8_t payload_type_ GUARDED_BY(send_critsect_); |
| 443 std::map<int8_t, RtpUtility::Payload*> payload_type_map_; | 440 std::map<int8_t, RtpUtility::Payload*> payload_type_map_; |
| 444 | 441 |
| 445 RtpHeaderExtensionMap rtp_header_extension_map_; | 442 RtpHeaderExtensionMap rtp_header_extension_map_; |
| 446 int32_t transmission_time_offset_; | 443 int32_t transmission_time_offset_; |
| 447 uint32_t absolute_send_time_; | 444 uint32_t absolute_send_time_; |
| 448 VideoRotation rotation_; | 445 VideoRotation rotation_; |
| 449 CVOMode cvo_mode_; | 446 CVOMode cvo_mode_; |
| 450 uint16_t transport_sequence_number_; | 447 uint16_t transport_sequence_number_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 // that the target bitrate is still valid. | 491 // that the target bitrate is still valid. |
| 495 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_; | 492 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_; |
| 496 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_); | 493 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_); |
| 497 | 494 |
| 498 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); | 495 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); |
| 499 }; | 496 }; |
| 500 | 497 |
| 501 } // namespace webrtc | 498 } // namespace webrtc |
| 502 | 499 |
| 503 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ | 500 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ |
| OLD | NEW |