blob: c5e2abbbb477eaaefdf0af51b5bfcfa6d8a2a334 [file] [log] [blame]
Niels Möllerbe682d42018-03-27 08:31:45 +02001/*
2 * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "api/video/encoded_frame.h"
12
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010013#include "absl/types/optional.h"
14
Niels Möllerbe682d42018-03-27 08:31:45 +020015namespace webrtc {
Niels Möllerbe682d42018-03-27 08:31:45 +020016
Evan Shrubsolee9126c12022-03-07 14:50:51 +010017absl::optional<Timestamp> EncodedFrame::ReceivedTimestamp() const {
18 return ReceivedTime() >= 0
19 ? absl::make_optional(Timestamp::Millis(ReceivedTime()))
20 : absl::nullopt;
21}
22
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010023absl::optional<Timestamp> EncodedFrame::RenderTimestamp() const {
24 return RenderTimeMs() >= 0
25 ? absl::make_optional(Timestamp::Millis(RenderTimeMs()))
26 : absl::nullopt;
27}
28
Yves Gerey665174f2018-06-19 15:03:05 +020029bool EncodedFrame::delayed_by_retransmission() const {
Anton Bikineev7abf45f2022-01-23 22:22:59 +010030 return false;
Yves Gerey665174f2018-06-19 15:03:05 +020031}
Niels Möllerbe682d42018-03-27 08:31:45 +020032
Niels Möllerbe682d42018-03-27 08:31:45 +020033} // namespace webrtc