blob: b0a1c874b7a90d60043ffc856fffea1c64cc8217 [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_codecs/video_decoder.h"
12
13namespace webrtc {
14
15int32_t DecodedImageCallback::Decoded(VideoFrame& decodedImage,
16 int64_t decode_time_ms) {
17 // The default implementation ignores custom decode time value.
18 return Decoded(decodedImage);
19}
20
21void DecodedImageCallback::Decoded(VideoFrame& decodedImage,
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020022 absl::optional<int32_t> decode_time_ms,
23 absl::optional<uint8_t> qp) {
Niels Möllerbe682d42018-03-27 08:31:45 +020024 Decoded(decodedImage, decode_time_ms.value_or(-1));
25}
26
Niels Möllerbe682d42018-03-27 08:31:45 +020027int32_t DecodedImageCallback::ReceivedDecodedFrame(const uint64_t pictureId) {
28 return -1;
29}
30
Niels Möller7aacdd92019-03-25 09:11:40 +010031int32_t VideoDecoder::Decode(const EncodedImage& input_image,
32 bool missing_frames,
33 int64_t render_time_ms) {
34 return Decode(input_image, missing_frames, nullptr, render_time_ms);
35}
36
37int32_t VideoDecoder::Decode(const EncodedImage& input_image,
38 bool missing_frames,
39 const CodecSpecificInfo* codec_specific_info,
40 int64_t render_time_ms) {
41 return Decode(input_image, missing_frames, render_time_ms);
42}
43
Niels Möllerbe682d42018-03-27 08:31:45 +020044bool VideoDecoder::PrefersLateDecoding() const {
45 return true;
46}
47
48const char* VideoDecoder::ImplementationName() const {
49 return "unknown";
50}
51
Niels Möllerbe682d42018-03-27 08:31:45 +020052} // namespace webrtc