mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-15 14:50:39 +01:00

Additionally, * Moved to its own GN target. * Added unittests. * Removed unused variable `_zeroWallClock`. * Renamed variables to match style guide. * Moved fields _dTS and _wrapArounds to variables. Change-Id: I7aa8b8dec55abab49ceabe838dabf2a7e13d685d Bug: webrtc:13756 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253580 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36147}
33 lines
1,001 B
C++
33 lines
1,001 B
C++
/*
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "api/video/encoded_frame.h"
|
|
|
|
#include "absl/types/optional.h"
|
|
|
|
namespace webrtc {
|
|
|
|
absl::optional<Timestamp> EncodedFrame::ReceivedTimestamp() const {
|
|
return ReceivedTime() >= 0
|
|
? absl::make_optional(Timestamp::Millis(ReceivedTime()))
|
|
: absl::nullopt;
|
|
}
|
|
|
|
absl::optional<Timestamp> EncodedFrame::RenderTimestamp() const {
|
|
return RenderTimeMs() >= 0
|
|
? absl::make_optional(Timestamp::Millis(RenderTimeMs()))
|
|
: absl::nullopt;
|
|
}
|
|
|
|
bool EncodedFrame::delayed_by_retransmission() const {
|
|
return false;
|
|
}
|
|
|
|
} // namespace webrtc
|