webrtc lib: Make the rtpreceiver struct private
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Wed, 21 Apr 2021 20:04:26 +0000 (16:04 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 21 Jun 2021 20:53:09 +0000 (20:53 +0000)
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>

gst-libs/gst/webrtc/rtpreceiver.h
gst-libs/gst/webrtc/webrtc-priv.h

index a02bad1..6a55457 100644 (file)
@@ -24,6 +24,8 @@
 #include <gst/webrtc/webrtc_fwd.h>
 #include <gst/webrtc/dtlstransport.h>
 
+#include "webrtc-priv.h"
+
 G_BEGIN_DECLS
 
 GST_WEBRTC_API
@@ -35,36 +37,6 @@ GType gst_webrtc_rtp_receiver_get_type(void);
 #define GST_IS_WEBRTC_RTP_RECEIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_WEBRTC_RTP_RECEIVER))
 #define GST_WEBRTC_RTP_RECEIVER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_WEBRTC_RTP_RECEIVER,GstWebRTCRTPReceiverClass))
 
-/**
- * GstWebRTCRTPReceiver:
- * @transport: The transport for RTP packets
- *
- * An object to track the receiving aspect of the stream
- *
- * Mostly matches the WebRTC RTCRtpReceiver interface.
- *
- * Since: 1.16
- */
-struct _GstWebRTCRTPReceiver
-{
-  GstObject                          parent;
-
-  /* The MediStreamTrack is represented by the stream and is output into @transport as necessary */
-  GstWebRTCDTLSTransport            *transport;
-
-  gpointer                          _padding[GST_PADDING];
-};
-
-struct _GstWebRTCRTPReceiverClass
-{
-  GstObjectClass            parent_class;
-
-  gpointer                  _padding[GST_PADDING];
-};
-
-GST_WEBRTC_API
-GstWebRTCRTPReceiver *      gst_webrtc_rtp_receiver_new                 (void);
-
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstWebRTCRTPReceiver, gst_object_unref)
 
 G_END_DECLS
index 559fc2d..d1768c4 100644 (file)
@@ -128,6 +128,37 @@ struct _GstWebRTCRTPSenderClass
 GST_WEBRTC_API
 GstWebRTCRTPSender *        gst_webrtc_rtp_sender_new                   (void);
 
+/**
+ * GstWebRTCRTPReceiver:
+ * @transport: The transport for RTP packets
+ *
+ * An object to track the receiving aspect of the stream
+ *
+ * Mostly matches the WebRTC RTCRtpReceiver interface.
+ *
+ * Since: 1.16
+ */
+struct _GstWebRTCRTPReceiver
+{
+  GstObject                          parent;
+
+  /* The MediStreamTrack is represented by the stream and is output into @transport as necessary */
+  GstWebRTCDTLSTransport            *transport;
+
+  gpointer                          _padding[GST_PADDING];
+};
+
+struct _GstWebRTCRTPReceiverClass
+{
+  GstObjectClass            parent_class;
+
+  gpointer                  _padding[GST_PADDING];
+};
+
+GST_WEBRTC_API
+GstWebRTCRTPReceiver *      gst_webrtc_rtp_receiver_new                 (void);
+
+
 G_END_DECLS
 
 #endif /* __GST_WEBRTC_PRIV_H__ */