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 // |transport_frame_id_out| - set to RTP timestamp. | 228 // Returns -1 on failure else 0. |
229 // Returns true on success. | 229 virtual int32_t SendOutgoingData( |
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( | |
243 FrameType frame_type, | 230 FrameType frame_type, |
244 int8_t payload_type, | 231 int8_t payload_type, |
245 uint32_t timestamp, | 232 uint32_t timestamp, |
246 int64_t capture_time_ms, | 233 int64_t capture_time_ms, |
247 const uint8_t* payload_data, | 234 const uint8_t* payload_data, |
248 size_t payload_size, | 235 size_t payload_size, |
249 const RTPFragmentationHeader* fragmentation = nullptr, | 236 const RTPFragmentationHeader* fragmentation = nullptr, |
250 const RTPVideoHeader* rtp_video_header = nullptr) { | 237 const RTPVideoHeader* rtp_video_header = nullptr) = 0; |
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 } | |
258 | 238 |
259 virtual bool TimeToSendPacket(uint32_t ssrc, | 239 virtual bool TimeToSendPacket(uint32_t ssrc, |
260 uint16_t sequence_number, | 240 uint16_t sequence_number, |
261 int64_t capture_time_ms, | 241 int64_t capture_time_ms, |
262 bool retransmission, | 242 bool retransmission, |
263 int probe_cluster_id) = 0; | 243 int probe_cluster_id) = 0; |
264 | 244 |
265 virtual size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) = 0; | 245 virtual size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) = 0; |
266 | 246 |
267 // Called on generation of new statistics after an RTP send. | 247 // Called on generation of new statistics after an RTP send. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; | 459 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; |
480 | 460 |
481 // Sends a request for a keyframe. | 461 // Sends a request for a keyframe. |
482 // Returns -1 on failure else 0. | 462 // Returns -1 on failure else 0. |
483 virtual int32_t RequestKeyFrame() = 0; | 463 virtual int32_t RequestKeyFrame() = 0; |
484 }; | 464 }; |
485 | 465 |
486 } // namespace webrtc | 466 } // namespace webrtc |
487 | 467 |
488 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ | 468 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ |
OLD | NEW |