webrtc lib: Make the rtpreceiver struct private

This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
This commit is contained in:
Olivier Crête 2021-04-21 16:04:26 -04:00 committed by GStreamer Marge Bot
parent a6593753a5
commit 5233c349e7
2 changed files with 33 additions and 30 deletions

View 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

View 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__ */