Files
platform-external-webrtc/api/video/video_frame_metadata.h
Marina Ciocea 8de900cdcb Reland "Make TransformableVideoFrameInterface::GetMetadata pure virtual."
This reverts commit 3e9068a6b488c63d98e5dd8a21caf7b83eb3744f.

Reason for revert: Fixed Chrome compile in https://crrev.com/c/2207191.

Original change's description:
> Revert "Make TransformableVideoFrameInterface::GetMetadata pure virtual."
> 
> This reverts commit 576ad5d510894040d7bbc041d5c86745c67f30f8.
> 
> Reason for revert: Causes compile error in Chrome.
> 
> Original change's description:
> > Make TransformableVideoFrameInterface::GetMetadata pure virtual.
> > 
> > GetMetadata() has been implemented downstream and can be made pure
> > virtual.
> > 
> > Bug: chromium:1069295
> > Change-Id: I62a3be6106552d2d82d8c413c6f523d31626b0d8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175001
> > Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31281}
> 
> TBR=hta@webrtc.org,marinaciocea@webrtc.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: chromium:1069295
> Change-Id: I5915270d5b8dab9fc30a07f22fddedb29beca01a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175620
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31304}

TBR=hta@webrtc.org,guidou@webrtc.org,marinaciocea@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: chromium:1069295
Change-Id: Icc192a38f2c17898d3547e0eb38aa399befe6250
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175624
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31312}
2020-05-18 17:53:38 +00:00

60 lines
1.8 KiB
C++

/*
* Copyright 2020 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.
*/
#ifndef API_VIDEO_VIDEO_FRAME_METADATA_H_
#define API_VIDEO_VIDEO_FRAME_METADATA_H_
#include <cstdint>
#include "absl/container/inlined_vector.h"
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "api/transport/rtp/dependency_descriptor.h"
namespace webrtc {
struct RTPVideoHeader;
// A subset of metadata from the RTP video header, exposed in insertable streams
// API.
class VideoFrameMetadata {
public:
explicit VideoFrameMetadata(const RTPVideoHeader& header);
VideoFrameMetadata(const VideoFrameMetadata&) = default;
VideoFrameMetadata& operator=(const VideoFrameMetadata&) = default;
uint16_t GetWidth() const { return width_; }
uint16_t GetHeight() const { return height_; }
absl::optional<int64_t> GetFrameId() const { return frame_id_; }
int GetSpatialIndex() const { return spatial_index_; }
int GetTemporalIndex() const { return temporal_index_; }
rtc::ArrayView<const int64_t> GetFrameDependencies() const {
return frame_dependencies_;
}
rtc::ArrayView<const DecodeTargetIndication> GetDecodeTargetIndications()
const {
return decode_target_indications_;
}
private:
int16_t width_;
int16_t height_;
absl::optional<int64_t> frame_id_;
int spatial_index_ = 0;
int temporal_index_ = 0;
absl::InlinedVector<int64_t, 5> frame_dependencies_;
absl::InlinedVector<DecodeTargetIndication, 10> decode_target_indications_;
};
} // namespace webrtc
#endif // API_VIDEO_VIDEO_FRAME_METADATA_H_