Revert "Add a FrameToRender argument struct as input to FrameToRender"
This reverts commit 01f91c81f7660be842fa44e96bf804a8b2402f47. Reason for revert: break downstream projects. Original change's description: > Add a FrameToRender argument struct as input to FrameToRender > > This is to make it easier to add new arguments to the method in the > future. We will remove the already existing method accordingly to WebRTCs deprecation rules. > > Bug: webrtc:358039777 > Change-Id: Id0706de5216fbd0182cac80ebfccfc4a6a055ee8 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364642 > Commit-Queue: Fanny Linderborg <linderborg@webrtc.org> > Reviewed-by: Erik Språng <sprang@webrtc.org> > Auto-Submit: Fanny Linderborg <linderborg@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#43181} Bug: webrtc:358039777 Change-Id: Id59633023a428fb63aadeb266421b09040e590bb No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364841 Owners-Override: Jeremy Leconte <jleconte@webrtc.org> Commit-Queue: Jeremy Leconte <jleconte@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#43184}
This commit is contained in:
parent
8216668537
commit
5680d8199a
@ -288,9 +288,7 @@ rtc_library("video_codec_interface") {
|
|||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":codec_globals_headers",
|
":codec_globals_headers",
|
||||||
"../../api/units:time_delta",
|
|
||||||
"../../api/video:video_frame",
|
"../../api/video:video_frame",
|
||||||
"../../api/video:video_frame_type",
|
|
||||||
"../../api/video:video_rtp_headers",
|
"../../api/video:video_rtp_headers",
|
||||||
"../../api/video_codecs:scalability_mode",
|
"../../api/video_codecs:scalability_mode",
|
||||||
"../../api/video_codecs:video_codecs_api",
|
"../../api/video_codecs:video_codecs_api",
|
||||||
|
|||||||
@ -220,11 +220,9 @@ void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
|
|||||||
|
|
||||||
decodedImage.set_timestamp_us(
|
decodedImage.set_timestamp_us(
|
||||||
frame_info->render_time ? frame_info->render_time->us() : -1);
|
frame_info->render_time ? frame_info->render_time->us() : -1);
|
||||||
_receiveCallback->FrameToRender({.video_frame = decodedImage,
|
_receiveCallback->FrameToRender(decodedImage, qp, decode_time,
|
||||||
.qp = qp,
|
frame_info->content_type,
|
||||||
.decode_time = decode_time,
|
frame_info->frame_type);
|
||||||
.content_type = frame_info->content_type,
|
|
||||||
.frame_type = frame_info->frame_type});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VCMDecodedFrameCallback::OnDecoderInfoChanged(
|
void VCMDecodedFrameCallback::OnDecoderInfoChanged(
|
||||||
|
|||||||
@ -17,10 +17,6 @@
|
|||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "api/rtp_packet_infos.h"
|
#include "api/rtp_packet_infos.h"
|
||||||
#include "api/units/time_delta.h"
|
|
||||||
#include "api/video/video_content_type.h"
|
|
||||||
#include "api/video/video_frame.h"
|
|
||||||
#include "api/video/video_frame_type.h"
|
|
||||||
#include "api/video_codecs/video_decoder.h"
|
#include "api/video_codecs/video_decoder.h"
|
||||||
#include "common_video/test/utilities.h"
|
#include "common_video/test/utilities.h"
|
||||||
#include "modules/video_coding/timing/timing.h"
|
#include "modules/video_coding/timing/timing.h"
|
||||||
@ -41,15 +37,7 @@ class ReceiveCallback : public VCMReceiveCallback {
|
|||||||
TimeDelta decode_time,
|
TimeDelta decode_time,
|
||||||
VideoContentType content_type,
|
VideoContentType content_type,
|
||||||
VideoFrameType frame_type) override {
|
VideoFrameType frame_type) override {
|
||||||
return FrameToRender({.video_frame = frame,
|
frames_.push_back(frame);
|
||||||
.qp = qp,
|
|
||||||
.decode_time = decode_time,
|
|
||||||
.content_type = content_type,
|
|
||||||
.frame_type = frame_type});
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t FrameToRender(const struct FrameToRender& arguments) override {
|
|
||||||
frames_.push_back(arguments.video_frame);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,10 +16,8 @@
|
|||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include "api/units/time_delta.h"
|
|
||||||
#include "api/video/video_content_type.h"
|
#include "api/video/video_content_type.h"
|
||||||
#include "api/video/video_frame.h"
|
#include "api/video/video_frame.h"
|
||||||
#include "api/video/video_frame_type.h"
|
|
||||||
#include "api/video/video_timing.h"
|
#include "api/video/video_timing.h"
|
||||||
#include "api/video_codecs/video_decoder.h"
|
#include "api/video_codecs/video_decoder.h"
|
||||||
|
|
||||||
@ -53,25 +51,11 @@ enum VCMVideoProtection {
|
|||||||
// rendered.
|
// rendered.
|
||||||
class VCMReceiveCallback {
|
class VCMReceiveCallback {
|
||||||
public:
|
public:
|
||||||
struct FrameToRender {
|
|
||||||
VideoFrame& video_frame;
|
|
||||||
std::optional<uint8_t> qp;
|
|
||||||
TimeDelta decode_time;
|
|
||||||
VideoContentType content_type;
|
|
||||||
VideoFrameType frame_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: bugs.webrtc.org/358039777 - Delete this function.
|
|
||||||
[[deprecated("Use FrameToRender(FrameToRender) instead.")]]
|
|
||||||
virtual int32_t FrameToRender(VideoFrame& videoFrame, // NOLINT
|
virtual int32_t FrameToRender(VideoFrame& videoFrame, // NOLINT
|
||||||
std::optional<uint8_t> qp,
|
std::optional<uint8_t> qp,
|
||||||
TimeDelta decode_time,
|
TimeDelta decode_time,
|
||||||
VideoContentType content_type,
|
VideoContentType content_type,
|
||||||
VideoFrameType frame_type) = 0;
|
VideoFrameType frame_type) = 0;
|
||||||
// TODO: bugs.webrtc.org/358039777 - Make this pure virtual.
|
|
||||||
virtual int32_t FrameToRender(const struct FrameToRender& arguments) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void OnDroppedFrames(uint32_t frames_dropped);
|
virtual void OnDroppedFrames(uint32_t frames_dropped);
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,12 @@
|
|||||||
|
|
||||||
#include "modules/video_coding/video_receiver2.h"
|
#include "modules/video_coding/video_receiver2.h"
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "api/test/mock_video_decoder.h"
|
#include "api/test/mock_video_decoder.h"
|
||||||
#include "api/units/time_delta.h"
|
|
||||||
#include "api/units/timestamp.h"
|
#include "api/units/timestamp.h"
|
||||||
#include "api/video/encoded_frame.h"
|
#include "api/video/encoded_frame.h"
|
||||||
#include "api/video/video_content_type.h"
|
|
||||||
#include "api/video/video_frame.h"
|
|
||||||
#include "api/video/video_frame_type.h"
|
|
||||||
#include "common_video/test/utilities.h"
|
#include "common_video/test/utilities.h"
|
||||||
#include "modules/video_coding/decoder_database.h"
|
#include "modules/video_coding/decoder_database.h"
|
||||||
#include "modules/video_coding/timing/timing.h"
|
#include "modules/video_coding/timing/timing.h"
|
||||||
@ -49,10 +43,6 @@ class MockVCMReceiveCallback : public VCMReceiveCallback {
|
|||||||
VideoContentType,
|
VideoContentType,
|
||||||
VideoFrameType),
|
VideoFrameType),
|
||||||
(override));
|
(override));
|
||||||
MOCK_METHOD(int32_t,
|
|
||||||
FrameToRender,
|
|
||||||
(const struct FrameToRender&),
|
|
||||||
(override));
|
|
||||||
MOCK_METHOD(void, OnIncomingPayloadType, (int), (override));
|
MOCK_METHOD(void, OnIncomingPayloadType, (int), (override));
|
||||||
MOCK_METHOD(void,
|
MOCK_METHOD(void,
|
||||||
OnDecoderInfoChanged,
|
OnDecoderInfoChanged,
|
||||||
|
|||||||
@ -8,20 +8,12 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
#include "api/test/mock_video_decoder.h"
|
#include "api/test/mock_video_decoder.h"
|
||||||
#include "api/units/time_delta.h"
|
|
||||||
#include "api/video/video_content_type.h"
|
|
||||||
#include "api/video/video_frame.h"
|
|
||||||
#include "api/video/video_frame_type.h"
|
|
||||||
#include "api/video_codecs/video_decoder.h"
|
#include "api/video_codecs/video_decoder.h"
|
||||||
#include "modules/video_coding/include/video_coding.h"
|
#include "modules/video_coding/include/video_coding.h"
|
||||||
#include "modules/video_coding/timing/timing.h"
|
#include "modules/video_coding/timing/timing.h"
|
||||||
#include "modules/video_coding/video_coding_impl.h"
|
#include "modules/video_coding/video_coding_impl.h"
|
||||||
#include "system_wrappers/include/clock.h"
|
#include "system_wrappers/include/clock.h"
|
||||||
#include "test/gmock.h"
|
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
#include "test/scoped_key_value_config.h"
|
#include "test/scoped_key_value_config.h"
|
||||||
|
|
||||||
@ -54,10 +46,6 @@ class MockVCMReceiveCallback : public VCMReceiveCallback {
|
|||||||
VideoContentType,
|
VideoContentType,
|
||||||
VideoFrameType),
|
VideoFrameType),
|
||||||
(override));
|
(override));
|
||||||
MOCK_METHOD(int32_t,
|
|
||||||
FrameToRender,
|
|
||||||
(const struct FrameToRender&),
|
|
||||||
(override));
|
|
||||||
MOCK_METHOD(void, OnIncomingPayloadType, (int), (override));
|
MOCK_METHOD(void, OnIncomingPayloadType, (int), (override));
|
||||||
MOCK_METHOD(void,
|
MOCK_METHOD(void,
|
||||||
OnDecoderInfoChanged,
|
OnDecoderInfoChanged,
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
|
|
||||||
#include "video/video_stream_decoder2.h"
|
#include "video/video_stream_decoder2.h"
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
#include "api/units/time_delta.h"
|
|
||||||
#include "api/video/video_content_type.h"
|
|
||||||
#include "api/video/video_frame.h"
|
|
||||||
#include "api/video/video_frame_type.h"
|
|
||||||
#include "api/video_codecs/video_decoder.h"
|
#include "api/video_codecs/video_decoder.h"
|
||||||
#include "modules/video_coding/video_receiver2.h"
|
#include "modules/video_coding/video_receiver2.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
@ -55,18 +48,9 @@ int32_t VideoStreamDecoder::FrameToRender(VideoFrame& video_frame,
|
|||||||
TimeDelta decode_time,
|
TimeDelta decode_time,
|
||||||
VideoContentType content_type,
|
VideoContentType content_type,
|
||||||
VideoFrameType frame_type) {
|
VideoFrameType frame_type) {
|
||||||
return FrameToRender({.video_frame = video_frame,
|
receive_stats_callback_->OnDecodedFrame(video_frame, qp, decode_time,
|
||||||
.qp = qp,
|
content_type, frame_type);
|
||||||
.decode_time = decode_time,
|
incoming_video_stream_->OnFrame(video_frame);
|
||||||
.content_type = content_type,
|
|
||||||
.frame_type = frame_type});
|
|
||||||
}
|
|
||||||
int32_t VideoStreamDecoder::FrameToRender(
|
|
||||||
const struct FrameToRender& arguments) {
|
|
||||||
receive_stats_callback_->OnDecodedFrame(
|
|
||||||
arguments.video_frame, arguments.qp, arguments.decode_time,
|
|
||||||
arguments.content_type, arguments.frame_type);
|
|
||||||
incoming_video_stream_->OnFrame(arguments.video_frame);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,18 +11,12 @@
|
|||||||
#ifndef VIDEO_VIDEO_STREAM_DECODER2_H_
|
#ifndef VIDEO_VIDEO_STREAM_DECODER2_H_
|
||||||
#define VIDEO_VIDEO_STREAM_DECODER2_H_
|
#define VIDEO_VIDEO_STREAM_DECODER2_H_
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "api/units/time_delta.h"
|
|
||||||
#include "api/video/video_content_type.h"
|
|
||||||
#include "api/video/video_frame.h"
|
|
||||||
#include "api/video/video_frame_type.h"
|
|
||||||
#include "api/video/video_sink_interface.h"
|
#include "api/video/video_sink_interface.h"
|
||||||
#include "api/video_codecs/video_decoder.h"
|
#include "api/video_codecs/video_decoder.h"
|
||||||
#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
|
#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
|
||||||
@ -51,7 +45,6 @@ class VideoStreamDecoder : public VCMReceiveCallback {
|
|||||||
TimeDelta decode_time,
|
TimeDelta decode_time,
|
||||||
VideoContentType content_type,
|
VideoContentType content_type,
|
||||||
VideoFrameType frame_type) override;
|
VideoFrameType frame_type) override;
|
||||||
int32_t FrameToRender(const struct FrameToRender& arguments) override;
|
|
||||||
void OnDroppedFrames(uint32_t frames_dropped) override;
|
void OnDroppedFrames(uint32_t frames_dropped) override;
|
||||||
void OnIncomingPayloadType(int payload_type) override;
|
void OnIncomingPayloadType(int payload_type) override;
|
||||||
void OnDecoderInfoChanged(
|
void OnDecoderInfoChanged(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user