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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Holmer@ comments Created 3 years, 6 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h b/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h
index f2ddc8a52e467801cc3ed5e72af5fc1945e96ca2..55bad2d502c0ce360da956489c83a62c457b8eef 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h
@@ -10,6 +10,7 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_TO_SEND_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_PACKET_TO_SEND_H_
+#include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_packet.h"
namespace webrtc {
@@ -23,10 +24,36 @@ class RtpPacketToSend : public rtp::Packet {
: Packet(extensions, capacity) {}
RtpPacketToSend& operator=(const RtpPacketToSend& packet) = default;
+
// Time in local time base as close as it can to frame capture time.
int64_t capture_time_ms() const { return capture_time_ms_; }
+
void set_capture_time_ms(int64_t time) { capture_time_ms_ = time; }
+ void set_packetization_finish_time_ms(int64_t time) {
+ SetExtension<VideoTimingExtension>(
+ VideoTiming::GetDeltaCappedMs(capture_time_ms_, time),
+ VideoTiming::kPacketizationFinishDeltaIdx);
+ }
+
+ void set_pacer_exit_time_ms(int64_t time) {
+ SetExtension<VideoTimingExtension>(
+ VideoTiming::GetDeltaCappedMs(capture_time_ms_, time),
+ VideoTiming::kPacerExitDeltaIdx);
+ }
+
+ void set_network_time_ms(int64_t time) {
+ SetExtension<VideoTimingExtension>(
+ VideoTiming::GetDeltaCappedMs(capture_time_ms_, time),
+ VideoTiming::kNetworkTimestampDeltaIdx);
+ }
+
+ void set_network2_time_ms(int64_t time) {
+ SetExtension<VideoTimingExtension>(
+ VideoTiming::GetDeltaCappedMs(capture_time_ms_, time),
+ VideoTiming::kNetwork2TimestampDeltaIdx);
+ }
+
private:
int64_t capture_time_ms_ = 0;
};
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698