Reduce number of RTPVideoSender::SendVideo parameters

use frame_type from the RTPVideoHeader instead of as an extra parameter
merge payload data and payload size into single argument
pass RTPVideoHeader by value (relying on copy elision)

Bug: None
Change-Id: Ie7970af3b198b83b723d84c7a8b047219c4b38c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156400
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29445}
diff --git a/call/rtp_video_sender.cc b/call/rtp_video_sender.cc
index ca6132f..73e356d 100644
--- a/call/rtp_video_sender.cc
+++ b/call/rtp_video_sender.cc
@@ -489,8 +489,6 @@
     stream_index = encoded_image.SpatialIndex().value_or(0);
   }
   RTC_DCHECK_LT(stream_index, rtp_streams_.size());
-  RTPVideoHeader rtp_video_header = params_[stream_index].GetRtpVideoHeader(
-      encoded_image, codec_specific_info, shared_frame_id_);
 
   uint32_t rtp_timestamp =
       encoded_image.Timestamp() +
@@ -515,9 +513,10 @@
   }
 
   bool send_result = rtp_streams_[stream_index].sender_video->SendVideo(
-      encoded_image._frameType, rtp_config_.payload_type, codec_type_,
-      rtp_timestamp, encoded_image.capture_time_ms_, encoded_image.data(),
-      encoded_image.size(), fragmentation, &rtp_video_header,
+      rtp_config_.payload_type, codec_type_, rtp_timestamp,
+      encoded_image.capture_time_ms_, encoded_image, fragmentation,
+      params_[stream_index].GetRtpVideoHeader(
+          encoded_image, codec_specific_info, shared_frame_id_),
       expected_retransmission_time_ms);
   if (frame_count_observer_) {
     FrameCounts& counts = frame_counts_[stream_index];