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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 // Used by the codec module to deliver a video or audio frame for | 219 // Used by the codec module to deliver a video or audio frame for |
220 // packetization. | 220 // packetization. |
221 // |frame_type| - type of frame to send | 221 // |frame_type| - type of frame to send |
222 // |payload_type| - payload type of frame to send | 222 // |payload_type| - payload type of frame to send |
223 // |timestamp| - timestamp of frame to send | 223 // |timestamp| - timestamp of frame to send |
224 // |payload_data| - payload buffer of frame to send | 224 // |payload_data| - payload buffer of frame to send |
225 // |payload_size| - size of payload buffer to send | 225 // |payload_size| - size of payload buffer to send |
226 // |fragmentation| - fragmentation offset data for fragmented frames such | 226 // |fragmentation| - fragmentation offset data for fragmented frames such |
227 // as layers or RED | 227 // as layers or RED |
228 // Returns -1 on failure else 0. | 228 // |transport_frame_id_out| - set to RTP timestamp. |
229 virtual int32_t SendOutgoingData( | 229 // Returns true on success. |
| 230 |
| 231 virtual bool SendOutgoingData(FrameType frame_type, |
| 232 int8_t payload_type, |
| 233 uint32_t timestamp, |
| 234 int64_t capture_time_ms, |
| 235 const uint8_t* payload_data, |
| 236 size_t payload_size, |
| 237 const RTPFragmentationHeader* fragmentation, |
| 238 const RTPVideoHeader* rtp_video_header, |
| 239 uint32_t* transport_frame_id_out) = 0; |
| 240 |
| 241 // Deprecated version of the method above. |
| 242 int32_t SendOutgoingData( |
230 FrameType frame_type, | 243 FrameType frame_type, |
231 int8_t payload_type, | 244 int8_t payload_type, |
232 uint32_t timestamp, | 245 uint32_t timestamp, |
233 int64_t capture_time_ms, | 246 int64_t capture_time_ms, |
234 const uint8_t* payload_data, | 247 const uint8_t* payload_data, |
235 size_t payload_size, | 248 size_t payload_size, |
236 const RTPFragmentationHeader* fragmentation = nullptr, | 249 const RTPFragmentationHeader* fragmentation = nullptr, |
237 const RTPVideoHeader* rtp_video_header = nullptr) = 0; | 250 const RTPVideoHeader* rtp_video_header = nullptr) { |
| 251 return SendOutgoingData(frame_type, payload_type, timestamp, |
| 252 capture_time_ms, payload_data, payload_size, |
| 253 fragmentation, rtp_video_header, |
| 254 /*frame_id_out=*/nullptr) |
| 255 ? 0 |
| 256 : -1; |
| 257 } |
238 | 258 |
239 virtual bool TimeToSendPacket(uint32_t ssrc, | 259 virtual bool TimeToSendPacket(uint32_t ssrc, |
240 uint16_t sequence_number, | 260 uint16_t sequence_number, |
241 int64_t capture_time_ms, | 261 int64_t capture_time_ms, |
242 bool retransmission, | 262 bool retransmission, |
243 int probe_cluster_id) = 0; | 263 int probe_cluster_id) = 0; |
244 | 264 |
245 virtual size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) = 0; | 265 virtual size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) = 0; |
246 | 266 |
247 // Called on generation of new statistics after an RTP send. | 267 // Called on generation of new statistics after an RTP send. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; | 479 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; |
460 | 480 |
461 // Sends a request for a keyframe. | 481 // Sends a request for a keyframe. |
462 // Returns -1 on failure else 0. | 482 // Returns -1 on failure else 0. |
463 virtual int32_t RequestKeyFrame() = 0; | 483 virtual int32_t RequestKeyFrame() = 0; |
464 }; | 484 }; |
465 | 485 |
466 } // namespace webrtc | 486 } // namespace webrtc |
467 | 487 |
468 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ | 488 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ |
OLD | NEW |