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

Unified Diff: webrtc/media/engine/webrtcvideoframe.cc

Issue 2088953002: Add cricket::VideoFrame::frame_id() and set it to RTP timestamp. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . 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/media/engine/webrtcvideoframe.cc
diff --git a/webrtc/media/engine/webrtcvideoframe.cc b/webrtc/media/engine/webrtcvideoframe.cc
index 2ff4042c525b2e56394976fe176ef8897d74ee31..676f71559641dae06c54527e4b98efd631c0115f 100644
--- a/webrtc/media/engine/webrtcvideoframe.cc
+++ b/webrtc/media/engine/webrtcvideoframe.cc
@@ -28,9 +28,11 @@ WebRtcVideoFrame::WebRtcVideoFrame()
WebRtcVideoFrame::WebRtcVideoFrame(
const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
webrtc::VideoRotation rotation,
- int64_t timestamp_us)
+ int64_t timestamp_us,
+ uint32_t transport_frame_id)
: video_frame_buffer_(buffer),
timestamp_us_(timestamp_us),
+ transport_frame_id_(transport_frame_id),
rotation_(rotation) {}
WebRtcVideoFrame::WebRtcVideoFrame(
@@ -39,7 +41,8 @@ WebRtcVideoFrame::WebRtcVideoFrame(
webrtc::VideoRotation rotation)
: WebRtcVideoFrame(buffer,
rotation,
- time_stamp_ns / rtc::kNumNanosecsPerMicrosec) {}
+ time_stamp_ns / rtc::kNumNanosecsPerMicrosec,
+ 0) {}
WebRtcVideoFrame::~WebRtcVideoFrame() {}
@@ -78,8 +81,25 @@ WebRtcVideoFrame::video_frame_buffer() const {
return video_frame_buffer_;
}
+uint32_t WebRtcVideoFrame::transport_frame_id() const {
+ return transport_frame_id_;
+}
+
+int64_t WebRtcVideoFrame::timestamp_us() const {
+ return timestamp_us_;
+}
+
+void WebRtcVideoFrame::set_timestamp_us(int64_t time_us) {
+ timestamp_us_ = time_us;
+}
+
+webrtc::VideoRotation WebRtcVideoFrame::rotation() const {
+ return rotation_;
+}
+
VideoFrame* WebRtcVideoFrame::Copy() const {
- return new WebRtcVideoFrame(video_frame_buffer_, rotation_, timestamp_us_);
+ return new WebRtcVideoFrame(video_frame_buffer_, rotation_, timestamp_us_,
+ transport_frame_id_);
}
size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32_t to_fourcc,
@@ -195,8 +215,8 @@ const VideoFrame* WebRtcVideoFrame::GetCopyWithRotationApplied() const {
current_width, current_height,
static_cast<libyuv::RotationMode>(rotation()));
if (ret == 0) {
- rotated_frame_.reset(
- new WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, timestamp_us_));
+ rotated_frame_.reset(new WebRtcVideoFrame(
+ buffer, webrtc::kVideoRotation_0, timestamp_us_, transport_frame_id_));
}
return rotated_frame_.get();
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.h ('k') | webrtc/sdk/objc/Framework/Classes/RTCVideoRendererAdapter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698