mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
webrtc lib: Make the icetransport 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:
parent
5233c349e7
commit
a0813c5bd2
4 changed files with 45 additions and 40 deletions
|
@ -26,6 +26,8 @@
|
|||
#include <gst/webrtc/webrtc.h>
|
||||
#include "gstwebrtcice.h"
|
||||
|
||||
#include "gst/webrtc/webrtc-priv.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GType gst_webrtc_nice_transport_get_type(void);
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include "icetransport.h"
|
||||
#include "webrtc-enumtypes.h"
|
||||
|
||||
#include "webrtc-priv.h"
|
||||
|
||||
#define GST_CAT_DEFAULT gst_webrtc_ice_transport_debug
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||
|
||||
|
|
|
@ -34,46 +34,6 @@ GType gst_webrtc_ice_transport_get_type(void);
|
|||
#define GST_IS_WEBRTC_ICE_TRANSPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_WEBRTC_ICE_TRANSPORT))
|
||||
#define GST_WEBRTC_ICE_TRANSPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_WEBRTC_ICE_TRANSPORT,GstWebRTCICETransportClass))
|
||||
|
||||
/**
|
||||
* GstWebRTCICETransport:
|
||||
*/
|
||||
struct _GstWebRTCICETransport
|
||||
{
|
||||
GstObject parent;
|
||||
|
||||
GstWebRTCICERole role;
|
||||
GstWebRTCICEComponent component;
|
||||
|
||||
GstWebRTCICEConnectionState state;
|
||||
GstWebRTCICEGatheringState gathering_state;
|
||||
|
||||
/* Filled by subclasses */
|
||||
GstElement *src;
|
||||
GstElement *sink;
|
||||
|
||||
gpointer _padding[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstWebRTCICETransportClass
|
||||
{
|
||||
GstObjectClass parent_class;
|
||||
|
||||
gboolean (*gather_candidates) (GstWebRTCICETransport * transport);
|
||||
|
||||
gpointer _padding[GST_PADDING];
|
||||
};
|
||||
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_connection_state_change (GstWebRTCICETransport * ice,
|
||||
GstWebRTCICEConnectionState new_state);
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_gathering_state_change (GstWebRTCICETransport * ice,
|
||||
GstWebRTCICEGatheringState new_state);
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_selected_pair_change (GstWebRTCICETransport * ice);
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_new_candidate (GstWebRTCICETransport * ice, guint stream_id, GstWebRTCICEComponent component, gchar * attr);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstWebRTCICETransport, gst_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -159,6 +159,47 @@ GST_WEBRTC_API
|
|||
GstWebRTCRTPReceiver * gst_webrtc_rtp_receiver_new (void);
|
||||
|
||||
|
||||
/**
|
||||
* GstWebRTCICETransport:
|
||||
*/
|
||||
struct _GstWebRTCICETransport
|
||||
{
|
||||
GstObject parent;
|
||||
|
||||
GstWebRTCICERole role;
|
||||
GstWebRTCICEComponent component;
|
||||
|
||||
GstWebRTCICEConnectionState state;
|
||||
GstWebRTCICEGatheringState gathering_state;
|
||||
|
||||
/* Filled by subclasses */
|
||||
GstElement *src;
|
||||
GstElement *sink;
|
||||
|
||||
gpointer _padding[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstWebRTCICETransportClass
|
||||
{
|
||||
GstObjectClass parent_class;
|
||||
|
||||
gboolean (*gather_candidates) (GstWebRTCICETransport * transport);
|
||||
|
||||
gpointer _padding[GST_PADDING];
|
||||
};
|
||||
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_connection_state_change (GstWebRTCICETransport * ice,
|
||||
GstWebRTCICEConnectionState new_state);
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_gathering_state_change (GstWebRTCICETransport * ice,
|
||||
GstWebRTCICEGatheringState new_state);
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_selected_pair_change (GstWebRTCICETransport * ice);
|
||||
GST_WEBRTC_API
|
||||
void gst_webrtc_ice_transport_new_candidate (GstWebRTCICETransport * ice, guint stream_id, GstWebRTCICEComponent component, gchar * attr);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_WEBRTC_PRIV_H__ */
|
||||
|
|
Loading…
Reference in a new issue