Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.h

Issue 2089773002: Add EncodedImageCallback::OnEncodedImage(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual size_t RtpHeaderLength() const = 0; 69 virtual size_t RtpHeaderLength() const = 0;
70 // Returns the next sequence number to use for a packet and allocates 70 // Returns the next sequence number to use for a packet and allocates
71 // 'packets_to_send' number of sequence numbers. It's important all allocated 71 // 'packets_to_send' number of sequence numbers. It's important all allocated
72 // sequence numbers are used in sequence to avoid perceived packet loss. 72 // sequence numbers are used in sequence to avoid perceived packet loss.
73 virtual uint16_t AllocateSequenceNumber(uint16_t packets_to_send) = 0; 73 virtual uint16_t AllocateSequenceNumber(uint16_t packets_to_send) = 0;
74 virtual uint16_t SequenceNumber() const = 0; 74 virtual uint16_t SequenceNumber() const = 0;
75 virtual size_t MaxPayloadLength() const = 0; 75 virtual size_t MaxPayloadLength() const = 0;
76 virtual size_t MaxDataPayloadLength() const = 0; 76 virtual size_t MaxDataPayloadLength() const = 0;
77 virtual uint16_t ActualSendBitrateKbit() const = 0; 77 virtual uint16_t ActualSendBitrateKbit() const = 0;
78 78
79 virtual int32_t SendToNetwork(uint8_t* data_buffer, 79 virtual bool SendToNetwork(uint8_t* data_buffer,
80 size_t payload_length, 80 size_t payload_length,
81 size_t rtp_header_length, 81 size_t rtp_header_length,
82 int64_t capture_time_ms, 82 int64_t capture_time_ms,
83 StorageType storage, 83 StorageType storage,
84 RtpPacketSender::Priority priority) = 0; 84 RtpPacketSender::Priority priority) = 0;
85 85
86 virtual bool UpdateVideoRotation(uint8_t* rtp_packet, 86 virtual bool UpdateVideoRotation(uint8_t* rtp_packet,
87 size_t rtp_packet_length, 87 size_t rtp_packet_length,
88 const RTPHeader& rtp_header, 88 const RTPHeader& rtp_header,
89 VideoRotation rotation) const = 0; 89 VideoRotation rotation) const = 0;
90 virtual bool IsRtpHeaderExtensionRegistered(RTPExtensionType type) = 0; 90 virtual bool IsRtpHeaderExtensionRegistered(RTPExtensionType type) = 0;
91 virtual bool ActivateCVORtpHeaderExtension() = 0; 91 virtual bool ActivateCVORtpHeaderExtension() = 0;
92 }; 92 };
93 93
94 class RTPSender : public RTPSenderInterface { 94 class RTPSender : public RTPSenderInterface {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 uint32_t GenerateNewSSRC(); 147 uint32_t GenerateNewSSRC();
148 void SetSSRC(uint32_t ssrc); 148 void SetSSRC(uint32_t ssrc);
149 149
150 uint16_t SequenceNumber() const override; 150 uint16_t SequenceNumber() const override;
151 void SetSequenceNumber(uint16_t seq); 151 void SetSequenceNumber(uint16_t seq);
152 152
153 void SetCsrcs(const std::vector<uint32_t>& csrcs); 153 void SetCsrcs(const std::vector<uint32_t>& csrcs);
154 154
155 void SetMaxPayloadLength(size_t max_payload_length); 155 void SetMaxPayloadLength(size_t max_payload_length);
156 156
157 int32_t SendOutgoingData(FrameType frame_type, 157 bool SendOutgoingData(FrameType frame_type,
158 int8_t payload_type, 158 int8_t payload_type,
159 uint32_t timestamp, 159 uint32_t timestamp,
160 int64_t capture_time_ms, 160 int64_t capture_time_ms,
161 const uint8_t* payload_data, 161 const uint8_t* payload_data,
162 size_t payload_size, 162 size_t payload_size,
163 const RTPFragmentationHeader* fragmentation, 163 const RTPFragmentationHeader* fragmentation,
164 const RTPVideoHeader* rtp_header); 164 const RTPVideoHeader* rtp_header,
165 uint32_t* transport_frame_id_out);
165 166
166 // RTP header extension 167 // RTP header extension
167 int32_t SetTransmissionTimeOffset(int32_t transmission_time_offset); 168 int32_t SetTransmissionTimeOffset(int32_t transmission_time_offset);
168 int32_t SetAbsoluteSendTime(uint32_t absolute_send_time); 169 int32_t SetAbsoluteSendTime(uint32_t absolute_send_time);
169 void SetVideoRotation(VideoRotation rotation); 170 void SetVideoRotation(VideoRotation rotation);
170 int32_t SetTransportSequenceNumber(uint16_t sequence_number); 171 int32_t SetTransportSequenceNumber(uint16_t sequence_number);
171 172
172 int32_t RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id); 173 int32_t RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id);
173 bool IsRtpHeaderExtensionRegistered(RTPExtensionType type) override; 174 bool IsRtpHeaderExtensionRegistered(RTPExtensionType type) override;
174 int32_t DeregisterRtpHeaderExtension(RTPExtensionType type); 175 int32_t DeregisterRtpHeaderExtension(RTPExtensionType type);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 int64_t capture_time_ms) override; 270 int64_t capture_time_ms) override;
270 271
271 size_t RtpHeaderLength() const override; 272 size_t RtpHeaderLength() const override;
272 uint16_t AllocateSequenceNumber(uint16_t packets_to_send) override; 273 uint16_t AllocateSequenceNumber(uint16_t packets_to_send) override;
273 size_t MaxPayloadLength() const override; 274 size_t MaxPayloadLength() const override;
274 275
275 // Current timestamp. 276 // Current timestamp.
276 uint32_t Timestamp() const override; 277 uint32_t Timestamp() const override;
277 uint32_t SSRC() const override; 278 uint32_t SSRC() const override;
278 279
279 int32_t SendToNetwork(uint8_t* data_buffer, 280 bool SendToNetwork(uint8_t* data_buffer,
280 size_t payload_length, 281 size_t payload_length,
281 size_t rtp_header_length, 282 size_t rtp_header_length,
282 int64_t capture_time_ms, 283 int64_t capture_time_ms,
283 StorageType storage, 284 StorageType storage,
284 RtpPacketSender::Priority priority) override; 285 RtpPacketSender::Priority priority) override;
285 286
286 // Audio. 287 // Audio.
287 288
288 // Send a DTMF tone using RFC 2833 (4733). 289 // Send a DTMF tone using RFC 2833 (4733).
289 int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level); 290 int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level);
290 291
291 // Set audio packet size, used to determine when it's time to send a DTMF 292 // Set audio packet size, used to determine when it's time to send a DTMF
292 // packet in silence (CNG). 293 // packet in silence (CNG).
293 int32_t SetAudioPacketSize(uint16_t packet_size_samples); 294 int32_t SetAudioPacketSize(uint16_t packet_size_samples);
294 295
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); 497 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_);
497 498
498 RateLimiter* const retransmission_rate_limiter_; 499 RateLimiter* const retransmission_rate_limiter_;
499 500
500 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); 501 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
501 }; 502 };
502 503
503 } // namespace webrtc 504 } // namespace webrtc
504 505
505 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 506 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698