Introduce the TransformerHost interface
This is the first step in implementing custom codecs in SDP.
Bug: none
Change-Id: I7789478208a769eaefd58b410ae6f488c604594d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348662
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#42171}
diff --git a/api/frame_transformer_interface.h b/api/frame_transformer_interface.h
index 102ac33..d3d1541 100644
--- a/api/frame_transformer_interface.h
+++ b/api/frame_transformer_interface.h
@@ -120,6 +120,18 @@
~FrameTransformerInterface() override = default;
};
+// An interface implemented by classes that can host a transform.
+// Currently this is implemented by the RTCRtpSender and RTCRtpReceiver.
+class FrameTransformerHost {
+ public:
+ virtual ~FrameTransformerHost() {}
+ virtual void SetFrameTransformer(
+ rtc::scoped_refptr<FrameTransformerInterface> frame_transformer) = 0;
+ // TODO: bugs.webrtc.org/15929 - To be added:
+ // virtual AddIncomingMediaType(RtpCodec codec) = 0;
+ // virtual AddOutgoingMediaType(RtpCodec codec) = 0;
+};
+
} // namespace webrtc
#endif // API_FRAME_TRANSFORMER_INTERFACE_H_