Add NtpTimeMs as a method in EncodedImage.

Bug: b/151082828
Change-Id: Idaa6848f952f9cc9458899680d19ddf338a3ace1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170044
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30729}
diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h
index b375d48..25f83c7 100644
--- a/api/video/encoded_image.h
+++ b/api/video/encoded_image.h
@@ -94,6 +94,8 @@
 
   void SetEncodeTime(int64_t encode_start_ms, int64_t encode_finish_ms);
 
+  int64_t NtpTimeMs() const { return ntp_time_ms_; }
+
   absl::optional<int> SpatialIndex() const { return spatial_index_; }
   void SetSpatialIndex(absl::optional<int> spatial_index) {
     RTC_DCHECK_GE(spatial_index.value_or(0), 0);
@@ -184,6 +186,7 @@
   uint32_t _encodedWidth = 0;
   uint32_t _encodedHeight = 0;
   // NTP time of the capture time in local timebase in milliseconds.
+  // TODO(minyue): make this member private.
   int64_t ntp_time_ms_ = 0;
   int64_t capture_time_ms_ = 0;
   VideoFrameType _frameType = VideoFrameType::kVideoFrameDelta;
diff --git a/modules/video_coding/encoded_frame.h b/modules/video_coding/encoded_frame.h
index 2ca0263..84b8c71 100644
--- a/modules/video_coding/encoded_frame.h
+++ b/modules/video_coding/encoded_frame.h
@@ -56,6 +56,7 @@
   using EncodedImage::ColorSpace;
   using EncodedImage::data;
   using EncodedImage::GetEncodedData;
+  using EncodedImage::NtpTimeMs;
   using EncodedImage::PacketInfos;
   using EncodedImage::Retain;
   using EncodedImage::set_size;