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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2089773002: Add EncodedImageCallback::OnEncodedImage(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: update SendOutgoingData() Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index 25016e053f2b43a948f803846fda364423d31dbe..e1f6ceb172b1cf76051214b0902acc08c15c9740 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -455,7 +455,8 @@ int32_t RTPSender::SendOutgoingData(FrameType frame_type,
const uint8_t* payload_data,
size_t payload_size,
const RTPFragmentationHeader* fragmentation,
- const RTPVideoHeader* rtp_hdr) {
+ const RTPVideoHeader* rtp_hdr,
+ uint32_t* frame_id_out) {
uint32_t ssrc;
uint16_t sequence_number;
{
@@ -512,6 +513,13 @@ int32_t RTPSender::SendOutgoingData(FrameType frame_type,
capture_time_ms, payload_data, payload_size, fragmentation, rtp_hdr);
}
+ if (frame_id_out) {
+ rtc::CritScope lock(&send_critsect_);
+ // TODO(sergeyu): Move RTP timestamp calculation from BuildRTPheader() to
+ // SendOutgoingData() and pass it to SendVideo()/SendAudio() calls.
+ *frame_id_out = timestamp_;
+ }
+
rtc::CritScope cs(&statistics_crit_);
// Note: This is currently only counting for video.
if (frame_type == kVideoFrameKey) {

Powered by Google App Engine
This is Rietveld 408576698