Insert frame transformer between Encoded and Packetizer.
Add a new API in RTPSenderInterface, to be called from the browser side to insert a frame transformer between the Encoded and the Packetizer. The frame transformer is passed from RTPSenderInterface through the library to be eventually set in RTPSenderVideo, where the frame transformation will occur in the follow-up CL https://webrtc-review.googlesource.com/c/src/+/169128. Insertable Streams Web API explainer: https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md Design doc for WebRTC library changes: http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk Bug: webrtc:11380 Change-Id: I46cd0d8a798c2736c837e90cbf90d8901c7d27fb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169127 Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30642}
This commit is contained in:
committed by
Commit Bot
parent
c62e4c5dc7
commit
e77912ba8c
@ -52,9 +52,9 @@ constexpr int64_t kMaxUnretransmittableFrameIntervalMs = 33 * 4;
|
||||
// result recovered packets will be corrupt unless we also remove transport
|
||||
// sequence number during FEC calculation.
|
||||
//
|
||||
// TODO(sukhanov): We need to find find better way to implement FEC with
|
||||
// datagram transport, probably moving FEC to datagram integration layter. We
|
||||
// should also remove special field trial once we switch datagram path from
|
||||
// TODO(sukhanov): We need to find a better way to implement FEC with datagram
|
||||
// transport, probably moving FEC to datagram integration layter. We should
|
||||
// also remove special field trial once we switch datagram path from
|
||||
// RTCConfiguration flags to field trial and use the same field trial for FEC
|
||||
// workaround.
|
||||
const char kExcludeTransportSequenceNumberFromFecFieldTrial[] =
|
||||
@ -275,7 +275,8 @@ RTPSenderVideo::RTPSenderVideo(const Config& config)
|
||||
config.field_trials
|
||||
->Lookup(kExcludeTransportSequenceNumberFromFecFieldTrial)
|
||||
.find("Enabled") == 0),
|
||||
absolute_capture_time_sender_(config.clock) {}
|
||||
absolute_capture_time_sender_(config.clock),
|
||||
frame_transformer_(config.frame_transformer) {}
|
||||
|
||||
RTPSenderVideo::~RTPSenderVideo() {}
|
||||
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/array_view.h"
|
||||
#include "api/frame_transformer_interface.h"
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "api/transport/rtp/dependency_descriptor.h"
|
||||
#include "api/video/video_codec_type.h"
|
||||
#include "api/video/video_frame_type.h"
|
||||
@ -74,6 +76,7 @@ class RTPSenderVideo {
|
||||
absl::optional<int> red_payload_type;
|
||||
absl::optional<int> ulpfec_payload_type;
|
||||
const WebRtcKeyValueConfig* field_trials = nullptr;
|
||||
rtc::scoped_refptr<FrameTransformerInterface> frame_transformer;
|
||||
};
|
||||
|
||||
explicit RTPSenderVideo(const Config& config);
|
||||
@ -222,6 +225,8 @@ class RTPSenderVideo {
|
||||
const bool exclude_transport_sequence_number_from_fec_experiment_;
|
||||
|
||||
AbsoluteCaptureTimeSender absolute_capture_time_sender_;
|
||||
|
||||
const rtc::scoped_refptr<FrameTransformerInterface> frame_transformer_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user