mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
rist: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
80e882d266
commit
b424fa6a6e
3 changed files with 13 additions and 13 deletions
|
@ -136,7 +136,7 @@ static void
|
|||
buffer_queue_item_free (BufferQueueItem * item)
|
||||
{
|
||||
gst_buffer_unref (item->buffer);
|
||||
g_slice_free (BufferQueueItem, item);
|
||||
g_free (item);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
|
@ -157,7 +157,7 @@ typedef struct
|
|||
static SSRCRtxData *
|
||||
ssrc_rtx_data_new (guint32 rtx_ssrc)
|
||||
{
|
||||
SSRCRtxData *data = g_slice_new0 (SSRCRtxData);
|
||||
SSRCRtxData *data = g_new0 (SSRCRtxData, 1);
|
||||
|
||||
data->rtx_ssrc = rtx_ssrc;
|
||||
data->next_seqnum = data->seqnum_base = g_random_int_range (0, G_MAXUINT16);
|
||||
|
@ -171,7 +171,7 @@ static void
|
|||
ssrc_rtx_data_free (SSRCRtxData * data)
|
||||
{
|
||||
g_sequence_free (data->queue);
|
||||
g_slice_free (SSRCRtxData, data);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -305,7 +305,7 @@ gst_rtp_rtx_data_queue_item_free (gpointer item)
|
|||
GstDataQueueItem *data = item;
|
||||
if (data->object)
|
||||
gst_mini_object_unref (data->object);
|
||||
g_slice_free (GstDataQueueItem, data);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -314,7 +314,7 @@ gst_rist_rtx_send_push_out (GstRistRtxSend * rtx, gpointer object)
|
|||
GstDataQueueItem *data;
|
||||
gboolean success;
|
||||
|
||||
data = g_slice_new0 (GstDataQueueItem);
|
||||
data = g_new0 (GstDataQueueItem, 1);
|
||||
data->object = GST_MINI_OBJECT (object);
|
||||
data->size = 1;
|
||||
data->duration = 1;
|
||||
|
@ -616,7 +616,7 @@ process_buffer (GstRistRtxSend * rtx, GstBuffer * buffer)
|
|||
extseqnum = gst_rist_rtp_ext_seq (&data->max_extseqnum, seqnum);
|
||||
|
||||
/* add current rtp buffer to queue history */
|
||||
item = g_slice_new0 (BufferQueueItem);
|
||||
item = g_new0 (BufferQueueItem, 1);
|
||||
item->extseqnum = extseqnum;
|
||||
item->timestamp = rtptime;
|
||||
item->buffer = gst_buffer_ref (buffer);
|
||||
|
|
|
@ -196,7 +196,7 @@ GQuark session_id_quark = 0;
|
|||
static RistSenderBond *
|
||||
gst_rist_sink_add_bond (GstRistSink * sink)
|
||||
{
|
||||
RistSenderBond *bond = g_slice_new0 (RistSenderBond);
|
||||
RistSenderBond *bond = g_new0 (RistSenderBond, 1);
|
||||
GstPad *pad, *gpad;
|
||||
gchar name[32];
|
||||
|
||||
|
@ -206,7 +206,7 @@ gst_rist_sink_add_bond (GstRistSink * sink)
|
|||
g_snprintf (name, 32, "rist_rtp_udpsink%u", bond->session);
|
||||
bond->rtp_sink = gst_element_factory_make ("udpsink", name);
|
||||
if (!bond->rtp_sink) {
|
||||
g_slice_free (RistSenderBond, bond);
|
||||
g_free (bond);
|
||||
sink->missing_plugin = "udp";
|
||||
return NULL;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ gst_rist_sink_add_bond (GstRistSink * sink)
|
|||
bond->rtx_send = gst_element_factory_make ("ristrtxsend", name);
|
||||
if (!bond->rtx_send) {
|
||||
sink->missing_plugin = "rtpmanager";
|
||||
g_slice_free (RistSenderBond, bond);
|
||||
g_free (bond);
|
||||
return NULL;
|
||||
}
|
||||
gst_bin_add (GST_BIN (sink->rtxbin), bond->rtx_send);
|
||||
|
@ -1314,7 +1314,7 @@ gst_rist_sink_finalize (GObject * object)
|
|||
RistSenderBond *bond = g_ptr_array_index (sink->bonds, i);
|
||||
g_free (bond->address);
|
||||
g_free (bond->multicast_iface);
|
||||
g_slice_free (RistSenderBond, bond);
|
||||
g_free (bond);
|
||||
}
|
||||
g_ptr_array_free (sink->bonds, TRUE);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ GST_ELEMENT_REGISTER_DEFINE (ristsrc, "ristsrc", GST_RANK_PRIMARY,
|
|||
static RistReceiverBond *
|
||||
gst_rist_src_add_bond (GstRistSrc * src)
|
||||
{
|
||||
RistReceiverBond *bond = g_slice_new0 (RistReceiverBond);
|
||||
RistReceiverBond *bond = g_new0 (RistReceiverBond, 1);
|
||||
GstPad *pad, *gpad;
|
||||
gchar name[32];
|
||||
|
||||
|
@ -200,7 +200,7 @@ gst_rist_src_add_bond (GstRistSrc * src)
|
|||
g_clear_object (&bond->rtp_src);
|
||||
g_clear_object (&bond->rtcp_src);
|
||||
g_clear_object (&bond->rtcp_sink);
|
||||
g_slice_free (RistReceiverBond, bond);
|
||||
g_free (bond);
|
||||
src->missing_plugin = "udp";
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1239,7 +1239,7 @@ gst_rist_src_finalize (GObject * object)
|
|||
g_free (bond->address);
|
||||
g_free (bond->multicast_iface);
|
||||
g_clear_object (&bond->rtcp_send_addr);
|
||||
g_slice_free (RistReceiverBond, bond);
|
||||
g_free (bond);
|
||||
}
|
||||
g_ptr_array_free (src->bonds, TRUE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue