mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
update for changed base classes
This commit is contained in:
parent
00d3f3a454
commit
fbaf216d25
35 changed files with 128 additions and 151 deletions
|
@ -140,7 +140,7 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
else
|
||||
order = NULL;
|
||||
|
||||
gst_basertppayload_set_options (basepayload, "audio", TRUE, "L16", rate);
|
||||
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "L16", rate);
|
||||
params = g_strdup_printf ("%d", channels);
|
||||
|
||||
if (!order && channels > 2) {
|
||||
|
@ -149,11 +149,11 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
}
|
||||
|
||||
if (order && order->name) {
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
|
||||
channels, "channel-order", G_TYPE_STRING, order->name, NULL);
|
||||
} else {
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
|
||||
channels, NULL);
|
||||
}
|
||||
|
|
|
@ -136,8 +136,8 @@ gst_rtp_ac3_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
if (!gst_structure_get_int (structure, "rate", &rate))
|
||||
rate = 90000; /* default */
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", TRUE, "AC3", rate);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", TRUE, "AC3", rate);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
|
|||
GST_BUFFER_TIMESTAMP (outbuf) = rtpac3pay->first_ts;
|
||||
GST_BUFFER_DURATION (outbuf) = rtpac3pay->duration;
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpac3pay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpac3pay), outbuf);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -385,7 +385,7 @@ gst_rtp_ac3_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
/* if this buffer is going to overflow the packet, flush what we
|
||||
* have. */
|
||||
if (gst_basertppayload_is_filled (basepayload,
|
||||
if (gst_base_rtp_payload_is_filled (basepayload,
|
||||
packet_len, rtpac3pay->duration + duration)) {
|
||||
ret = gst_rtp_ac3_pay_flush (rtpac3pay);
|
||||
avail = 0;
|
||||
|
|
|
@ -160,12 +160,12 @@ gst_rtp_amr_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
goto wrong_type;
|
||||
|
||||
if (rtpamrpay->mode == GST_RTP_AMR_P_MODE_NB)
|
||||
gst_basertppayload_set_options (basepayload, "audio", TRUE, "AMR", 8000);
|
||||
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "AMR", 8000);
|
||||
else
|
||||
gst_basertppayload_set_options (basepayload, "audio", TRUE, "AMR-WB",
|
||||
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "AMR-WB",
|
||||
16000);
|
||||
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"encoding-params", G_TYPE_STRING, "1", "octet-align", G_TYPE_STRING, "1",
|
||||
/* don't set the defaults
|
||||
*
|
||||
|
@ -376,7 +376,7 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -125,11 +125,11 @@ gst_rtp_bv_pay_sink_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
|
|||
goto wrong_mode;
|
||||
|
||||
if (mode == 16) {
|
||||
gst_basertppayload_set_options (basertppayload, "audio", TRUE, "BV16",
|
||||
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "BV16",
|
||||
8000);
|
||||
basertppayload->clock_rate = 8000;
|
||||
} else {
|
||||
gst_basertppayload_set_options (basertppayload, "audio", TRUE, "BV32",
|
||||
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "BV32",
|
||||
16000);
|
||||
basertppayload->clock_rate = 16000;
|
||||
}
|
||||
|
|
|
@ -251,10 +251,10 @@ gst_rtp_celt_pay_parse_ident (GstRtpCELTPay * rtpceltpay,
|
|||
|
||||
payload = GST_BASE_RTP_PAYLOAD (rtpceltpay);
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "CELT", rate);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "CELT", rate);
|
||||
cstr = g_strdup_printf ("%d", nb_channels);
|
||||
fsstr = g_strdup_printf ("%d", frame_size);
|
||||
res = gst_basertppayload_set_outcaps (payload, "encoding-params",
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, "encoding-params",
|
||||
G_TYPE_STRING, cstr, "frame-size", G_TYPE_STRING, fsstr, NULL);
|
||||
g_free (cstr);
|
||||
g_free (fsstr);
|
||||
|
@ -354,7 +354,7 @@ gst_rtp_celt_pay_flush_queued (GstRtpCELTPay * rtpceltpay)
|
|||
rtpceltpay->sbytes = 0;
|
||||
rtpceltpay->qduration = 0;
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpceltpay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpceltpay), outbuf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ gst_rtp_celt_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0);
|
||||
|
||||
if (gst_basertppayload_is_filled (basepayload, packet_len, packet_dur)) {
|
||||
if (gst_base_rtp_payload_is_filled (basepayload, packet_len, packet_dur)) {
|
||||
/* size or duration would overflow the packet, flush the queued data */
|
||||
ret = gst_rtp_celt_pay_flush_queued (rtpceltpay);
|
||||
}
|
||||
|
|
|
@ -221,15 +221,15 @@ gst_dv_pay_negotiate (GstRTPDVPay * rtpdvpay, guint8 * data, gsize size)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
gst_basertppayload_set_options (GST_BASE_RTP_PAYLOAD (rtpdvpay), media, TRUE,
|
||||
"DV", 90000);
|
||||
gst_base_rtp_payload_set_options (GST_BASE_RTP_PAYLOAD (rtpdvpay), media,
|
||||
TRUE, "DV", 90000);
|
||||
|
||||
if (audio_bundled) {
|
||||
res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
|
||||
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
|
||||
"encode", G_TYPE_STRING, encode,
|
||||
"audio", G_TYPE_STRING, "bundled", NULL);
|
||||
} else {
|
||||
res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
|
||||
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
|
||||
"encode", G_TYPE_STRING, encode, NULL);
|
||||
}
|
||||
return res;
|
||||
|
@ -360,7 +360,7 @@ gst_rtp_dv_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
/* Push out the created piece, and check for errors. */
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
break;
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
* RFC 3551 although the sampling rate is 16000 Hz */
|
||||
clock_rate = 8000;
|
||||
|
||||
gst_basertppayload_set_options (basepayload, "audio", TRUE, "G722",
|
||||
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "G722",
|
||||
clock_rate);
|
||||
params = g_strdup_printf ("%d", channels);
|
||||
|
||||
|
@ -142,11 +142,11 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
}
|
||||
|
||||
if (order && order->name) {
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
|
||||
channels, "channel-order", G_TYPE_STRING, order->name, NULL);
|
||||
} else {
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
|
||||
channels, NULL);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ gst_rtp_g723_pay_init (GstRTPG723Pay * pay)
|
|||
pay->adapter = gst_adapter_new ();
|
||||
|
||||
payload->pt = GST_RTP_PAYLOAD_G723;
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "G723", 8000);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "G723", 8000);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -138,7 +138,7 @@ gst_rtp_g723_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
payload->pt = pt;
|
||||
payload->dynamic = pt != GST_RTP_PAYLOAD_G723;
|
||||
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ gst_rtp_g723_pay_flush (GstRTPG723Pay * pay)
|
|||
}
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (pay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (pay), outbuf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ gst_rtp_g723_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buf)
|
|||
packet_dur = pay->duration + G723_FRAME_DURATION;
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0);
|
||||
|
||||
if (gst_basertppayload_is_filled (payload, packet_len, packet_dur)) {
|
||||
if (gst_base_rtp_payload_is_filled (payload, packet_len, packet_dur)) {
|
||||
/* size or duration would overflow the packet, flush the queued data */
|
||||
ret = gst_rtp_g723_pay_flush (pay);
|
||||
}
|
||||
|
|
|
@ -237,8 +237,9 @@ gst_rtp_g726_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
GST_DEBUG_OBJECT (payload, "no peer caps, AAL2 %d", pay->aal2);
|
||||
}
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", TRUE, encoding_name, 8000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", TRUE, encoding_name,
|
||||
8000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
g_free (encoding_name);
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ gst_rtp_g729_pay_init (GstRTPG729Pay * pay)
|
|||
GstBaseRTPPayload *payload = GST_BASE_RTP_PAYLOAD (pay);
|
||||
|
||||
payload->pt = GST_RTP_PAYLOAD_G729;
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "G729", 8000);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "G729", 8000);
|
||||
|
||||
pay->adapter = gst_adapter_new ();
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ gst_rtp_g729_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
payload->pt = pt;
|
||||
payload->dynamic = pt != GST_RTP_PAYLOAD_G729;
|
||||
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay,
|
|||
}
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -107,8 +107,8 @@ gst_rtp_gsm_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
if (strcmp ("audio/x-gsm", stname))
|
||||
goto invalid_type;
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "GSM", 8000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "GSM", 8000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
|
||||
|
@ -168,7 +168,7 @@ gst_rtp_gsm_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
GST_DEBUG ("gst_rtp_gsm_pay_chain: pushing buffer of size %d",
|
||||
gst_buffer_get_size (outbuf));
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -111,9 +111,10 @@ gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
capsenc = g_base64_encode ((guchar *) capsstr, strlen (capsstr));
|
||||
g_free (capsstr);
|
||||
|
||||
gst_basertppayload_set_options (payload, "application", TRUE, "X-GST", 90000);
|
||||
gst_base_rtp_payload_set_options (payload, "application", TRUE, "X-GST",
|
||||
90000);
|
||||
res =
|
||||
gst_basertppayload_set_outcaps (payload, "caps", G_TYPE_STRING, capsenc,
|
||||
gst_base_rtp_payload_set_outcaps (payload, "caps", G_TYPE_STRING, capsenc,
|
||||
NULL);
|
||||
g_free (capsenc);
|
||||
|
||||
|
@ -203,7 +204,7 @@ gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
}
|
||||
gst_buffer_unmap (buffer, data, size);
|
||||
gst_buffer_unref (buffer);
|
||||
|
|
|
@ -253,7 +253,7 @@ gst_rtp_h263_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
if (!F && payload_len > 4 && (GST_READ_UINT32_BE (payload) >> 10 == 0x20)) {
|
||||
GST_DEBUG ("Mode A with PSC => frame start");
|
||||
rtph263depay->start = TRUE;
|
||||
if (!!(payload[4] & 0x02) != I) {
|
||||
if (! !(payload[4] & 0x02) != I) {
|
||||
GST_DEBUG ("Wrong Picture Coding Type Flag in rtp header");
|
||||
I = !I;
|
||||
}
|
||||
|
@ -307,7 +307,6 @@ skip:
|
|||
if (rtph263depay->start) {
|
||||
/* frame is completed */
|
||||
guint avail;
|
||||
guint32 timestamp;
|
||||
|
||||
if (rtph263depay->offset) {
|
||||
/* push in the leftover */
|
||||
|
@ -326,8 +325,7 @@ skip:
|
|||
|
||||
GST_DEBUG ("Pushing out a buffer of %d bytes", avail);
|
||||
|
||||
timestamp = gst_rtp_buffer_get_timestamp (&rtp);
|
||||
gst_base_rtp_depayload_push_ts (depayload, timestamp, outbuf);
|
||||
gst_base_rtp_depayload_push (depayload, outbuf);
|
||||
rtph263depay->offset = 0;
|
||||
rtph263depay->leftover = 0;
|
||||
rtph263depay->start = FALSE;
|
||||
|
|
|
@ -464,8 +464,8 @@ gst_rtp_h263_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
gboolean res;
|
||||
|
||||
payload->pt = GST_RTP_PAYLOAD_H263;
|
||||
gst_basertppayload_set_options (payload, "video", TRUE, "H263", 90000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "video", TRUE, "H263", 90000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -1279,7 +1279,7 @@ gst_rtp_h263_pay_push (GstRtpH263Pay * rtph263pay,
|
|||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret =
|
||||
gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtph263pay),
|
||||
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtph263pay),
|
||||
package->outbuf);
|
||||
GST_DEBUG ("Package pushed, returning");
|
||||
|
||||
|
|
|
@ -198,9 +198,9 @@ gst_rtp_h263p_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
if (!encoding_name)
|
||||
encoding_name = g_strdup ("H263-1998");
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE,
|
||||
gst_base_rtp_payload_set_options (payload, "video", TRUE,
|
||||
(gchar *) encoding_name, 90000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
g_free (encoding_name);
|
||||
|
||||
return res;
|
||||
|
@ -719,7 +719,8 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
|
|||
|
||||
gst_adapter_flush (rtph263ppay->adapter, towrite);
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtph263ppay), outbuf);
|
||||
ret =
|
||||
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtph263ppay), outbuf);
|
||||
|
||||
avail -= towrite;
|
||||
fragmented = TRUE;
|
||||
|
|
|
@ -118,7 +118,7 @@ static GstFlowReturn gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * pad,
|
|||
GstBuffer * buffer);
|
||||
static gboolean gst_rtp_h264_pay_handle_event (GstBaseRTPPayload * payload,
|
||||
GstEvent * event);
|
||||
static GstStateChangeReturn gst_basertppayload_change_state (GstElement *
|
||||
static GstStateChangeReturn gst_rtp_h264_pay_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
|
||||
#define gst_rtp_h264_pay_parent_class parent_class
|
||||
|
@ -188,7 +188,7 @@ gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass)
|
|||
"Laurent Glayal <spglegle@yahoo.fr>");
|
||||
|
||||
gstelement_class->change_state =
|
||||
GST_DEBUG_FUNCPTR (gst_basertppayload_change_state);
|
||||
GST_DEBUG_FUNCPTR (gst_rtp_h264_pay_change_state);
|
||||
|
||||
gstbasertppayload_class->get_caps = gst_rtp_h264_pay_getcaps;
|
||||
gstbasertppayload_class->set_caps = gst_rtp_h264_pay_setcaps;
|
||||
|
@ -406,7 +406,7 @@ gst_rtp_h264_pay_set_sps_pps (GstBaseRTPPayload * basepayload)
|
|||
/* profile is 24 bit. Force it to respect the limit */
|
||||
profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff);
|
||||
/* combine into output caps */
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL);
|
||||
g_string_free (sprops, TRUE);
|
||||
g_free (profile);
|
||||
|
@ -431,7 +431,7 @@ gst_rtp_h264_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
|
||||
/* we can only set the output caps when we found the sprops and profile
|
||||
* NALs */
|
||||
gst_basertppayload_set_options (basepayload, "video", TRUE, "H264", 90000);
|
||||
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "H264", 90000);
|
||||
|
||||
alignment = gst_structure_get_string (str, "alignment");
|
||||
if (alignment && !strcmp (alignment, "au"))
|
||||
|
@ -944,7 +944,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
|
|||
gst_buffer_list_add (list, paybuf);
|
||||
|
||||
/* push the list to the next element in the pipe */
|
||||
ret = gst_basertppayload_push_list (basepayload, list);
|
||||
ret = gst_base_rtp_payload_push_list (basepayload, list);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
@ -953,7 +953,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
|
|||
memcpy (payload, data, size);
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
}
|
||||
} else {
|
||||
/* fragmentation Units FU-A */
|
||||
|
@ -1052,7 +1052,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
|
|||
"recorded %d payload bytes into packet iteration=%d",
|
||||
limitedSize + 2, ii);
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
break;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
|
|||
if (rtph264pay->buffer_list) {
|
||||
/* free iterator and push the whole buffer list at once */
|
||||
gst_buffer_list_iterator_free (it);
|
||||
ret = gst_basertppayload_push_list (basepayload, list);
|
||||
ret = gst_base_rtp_payload_push_list (basepayload, list);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1218,7 +1218,7 @@ gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
if (rtph264pay->sprop_parameter_sets != NULL) {
|
||||
/* explicitly set profile and sprop, use those */
|
||||
if (rtph264pay->update_caps) {
|
||||
if (!gst_basertppayload_set_outcaps (basepayload,
|
||||
if (!gst_base_rtp_payload_set_outcaps (basepayload,
|
||||
"sprop-parameter-sets", G_TYPE_STRING,
|
||||
rtph264pay->sprop_parameter_sets, NULL))
|
||||
goto caps_rejected;
|
||||
|
@ -1352,8 +1352,7 @@ gst_rtp_h264_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event)
|
|||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_basertppayload_change_state (GstElement * element,
|
||||
GstStateChange transition)
|
||||
gst_rtp_h264_pay_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn ret;
|
||||
GstRtpH264Pay *rtph264pay = GST_RTP_H264_PAY (element);
|
||||
|
|
|
@ -129,14 +129,15 @@ gst_rtp_ilbc_pay_sink_setcaps (GstBaseRTPPayload * basertppayload,
|
|||
if (mode != 20 && mode != 30)
|
||||
goto wrong_mode;
|
||||
|
||||
gst_basertppayload_set_options (basertppayload, "audio", TRUE, "ILBC", 8000);
|
||||
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "ILBC",
|
||||
8000);
|
||||
/* set options for this frame based audio codec */
|
||||
gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload,
|
||||
mode, mode == 30 ? 50 : 38);
|
||||
|
||||
mode_str = g_strdup_printf ("%d", mode);
|
||||
ret =
|
||||
gst_basertppayload_set_outcaps (basertppayload, "mode", G_TYPE_STRING,
|
||||
gst_base_rtp_payload_set_outcaps (basertppayload, "mode", G_TYPE_STRING,
|
||||
mode_str, NULL);
|
||||
g_free (mode_str);
|
||||
|
||||
|
|
|
@ -174,9 +174,9 @@ gst_rtp_j2k_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
pay->width = width;
|
||||
}
|
||||
|
||||
gst_basertppayload_set_options (basepayload, "video", TRUE, "JPEG2000",
|
||||
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "JPEG2000",
|
||||
90000);
|
||||
res = gst_basertppayload_set_outcaps (basepayload, NULL);
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
memcpy (header + HEADER_SIZE, &data[offset], data_size);
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto done;
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ done:
|
|||
if (pay->buffer_list) {
|
||||
/* free iterator and push the whole buffer list at once */
|
||||
gst_buffer_list_iterator_free (it);
|
||||
ret = gst_basertppayload_push_list (basepayload, list);
|
||||
ret = gst_base_rtp_payload_push_list (basepayload, list);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -318,8 +318,8 @@ gst_rtp_jpeg_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
|
|||
}
|
||||
pay->width = width / 8;
|
||||
|
||||
gst_basertppayload_set_options (basepayload, "video", TRUE, "JPEG", 90000);
|
||||
res = gst_basertppayload_set_outcaps (basepayload, NULL);
|
||||
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "JPEG", 90000);
|
||||
res = gst_base_rtp_payload_set_outcaps (basepayload, NULL);
|
||||
|
||||
return res;
|
||||
|
||||
|
@ -819,7 +819,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
/* and add to list */
|
||||
gst_buffer_list_insert (list, -1, outbuf);
|
||||
} else {
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
break;
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
if (pay->buffer_list) {
|
||||
/* push the whole buffer list at once */
|
||||
ret = gst_basertppayload_push_list (basepayload, list);
|
||||
ret = gst_base_rtp_payload_push_list (basepayload, list);
|
||||
}
|
||||
|
||||
gst_buffer_unmap (buffer, bdata, -1);
|
||||
|
|
|
@ -108,8 +108,8 @@ gst_rtp_mp2t_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
{
|
||||
gboolean res;
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE, "MP2T", 90000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "video", TRUE, "MP2T", 90000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
|
|||
GST_DEBUG_OBJECT (rtpmp2tpay, "pushing buffer of size %d",
|
||||
gst_buffer_get_size (outbuf));
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmp2tpay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp2tpay), outbuf);
|
||||
|
||||
/* flush the adapter content */
|
||||
gst_adapter_flush (rtpmp2tpay->adapter, avail);
|
||||
|
@ -178,7 +178,7 @@ gst_rtp_mp2t_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
/* if this buffer is going to overflow the packet, flush what we
|
||||
* have. */
|
||||
if (gst_basertppayload_is_filled (basepayload,
|
||||
if (gst_base_rtp_payload_is_filled (basepayload,
|
||||
packet_len, rtpmp2tpay->duration + duration)) {
|
||||
ret = gst_rtp_mp2t_pay_flush (rtpmp2tpay);
|
||||
rtpmp2tpay->first_ts = timestamp;
|
||||
|
|
|
@ -228,7 +228,7 @@ gst_rtp_mp4a_pay_new_caps (GstRtpMP4APay * rtpmp4apay)
|
|||
gst_value_set_buffer (&v, rtpmp4apay->config);
|
||||
config = gst_value_serialize (&v);
|
||||
|
||||
res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4apay),
|
||||
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4apay),
|
||||
"cpresent", G_TYPE_STRING, "0", "config", G_TYPE_STRING, config, NULL);
|
||||
|
||||
g_value_unset (&v);
|
||||
|
@ -321,7 +321,7 @@ gst_rtp_mp4a_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
GST_WARNING_OBJECT (payload, "Need framed AAC data as input!");
|
||||
}
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", TRUE, "MP4A-LATM",
|
||||
gst_base_rtp_payload_set_options (payload, "audio", TRUE, "MP4A-LATM",
|
||||
rtpmp4apay->rate);
|
||||
|
||||
res = gst_rtp_mp4a_pay_new_caps (rtpmp4apay);
|
||||
|
@ -423,7 +423,7 @@ gst_rtp_mp4a_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
/* copy incomming timestamp (if any) to outgoing buffers */
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmp4apay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp4apay), outbuf);
|
||||
|
||||
fragmented = TRUE;
|
||||
}
|
||||
|
|
|
@ -370,10 +370,10 @@ gst_rtp_mp4g_pay_new_caps (GstRtpMP4GPay * rtpmp4gpay)
|
|||
|
||||
/* hmm, silly */
|
||||
if (rtpmp4gpay->params) {
|
||||
res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4gpay),
|
||||
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4gpay),
|
||||
"encoding-params", G_TYPE_STRING, rtpmp4gpay->params, MP4GCAPS);
|
||||
} else {
|
||||
res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4gpay),
|
||||
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4gpay),
|
||||
MP4GCAPS);
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ gst_rtp_mp4g_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
if (media_type == NULL)
|
||||
goto config_failed;
|
||||
|
||||
gst_basertppayload_set_options (payload, media_type, TRUE, "MPEG4-GENERIC",
|
||||
gst_base_rtp_payload_set_options (payload, media_type, TRUE, "MPEG4-GENERIC",
|
||||
rtpmp4gpay->rate);
|
||||
|
||||
res = gst_rtp_mp4g_pay_new_caps (rtpmp4gpay);
|
||||
|
@ -545,7 +545,7 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
|
|||
rtpmp4gpay->offset += rtpmp4gpay->frame_len;
|
||||
}
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmp4gpay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp4gpay), outbuf);
|
||||
|
||||
avail -= payload_len;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ gst_rtp_mp4v_pay_new_caps (GstRtpMP4VPay * rtpmp4vpay)
|
|||
gst_value_set_buffer (&v, rtpmp4vpay->config);
|
||||
config = gst_value_serialize (&v);
|
||||
|
||||
res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4vpay),
|
||||
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4vpay),
|
||||
"profile-level-id", G_TYPE_STRING, profile,
|
||||
"config", G_TYPE_STRING, config, NULL);
|
||||
|
||||
|
@ -202,7 +202,7 @@ gst_rtp_mp4v_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
|
||||
rtpmp4vpay = GST_RTP_MP4V_PAY (payload);
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE, "MP4V-ES",
|
||||
gst_base_rtp_payload_set_options (payload, "video", TRUE, "MP4V-ES",
|
||||
rtpmp4vpay->rate);
|
||||
|
||||
res = TRUE;
|
||||
|
@ -310,14 +310,16 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
|
|||
/* add to list */
|
||||
gst_buffer_list_insert (list, -1, outbuf);
|
||||
} else {
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmp4vpay), outbuf);
|
||||
ret =
|
||||
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp4vpay), outbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if (rtpmp4vpay->buffer_list) {
|
||||
/* push the whole buffer list at once */
|
||||
ret =
|
||||
gst_basertppayload_push_list (GST_BASE_RTP_PAYLOAD (rtpmp4vpay), list);
|
||||
gst_base_rtp_payload_push_list (GST_BASE_RTP_PAYLOAD (rtpmp4vpay),
|
||||
list);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -561,7 +563,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
/* get packet length of data and see if we exceeded MTU. */
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (avail + size, 0, 0);
|
||||
|
||||
if (gst_basertppayload_is_filled (basepayload,
|
||||
if (gst_base_rtp_payload_is_filled (basepayload,
|
||||
packet_len, rtpmp4vpay->duration + duration)) {
|
||||
ret = gst_rtp_mp4v_pay_flush (rtpmp4vpay);
|
||||
rtpmp4vpay->first_timestamp = timestamp;
|
||||
|
|
|
@ -133,8 +133,8 @@ gst_rtp_mpa_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
{
|
||||
gboolean res;
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", TRUE, "MPA", 90000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", TRUE, "MPA", 90000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay)
|
|||
GST_BUFFER_TIMESTAMP (outbuf) = rtpmpapay->first_ts;
|
||||
GST_BUFFER_DURATION (outbuf) = rtpmpapay->duration;
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmpapay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmpapay), outbuf);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -271,7 +271,7 @@ gst_rtp_mpa_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
/* if this buffer is going to overflow the packet, flush what we
|
||||
* have. */
|
||||
if (gst_basertppayload_is_filled (basepayload,
|
||||
if (gst_base_rtp_payload_is_filled (basepayload,
|
||||
packet_len, rtpmpapay->duration + duration)) {
|
||||
ret = gst_rtp_mpa_pay_flush (rtpmpapay);
|
||||
avail = 0;
|
||||
|
|
|
@ -131,8 +131,8 @@ gst_rtp_mpv_pay_reset (GstRTPMPVPay * pay)
|
|||
static gboolean
|
||||
gst_rtp_mpv_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||
{
|
||||
gst_basertppayload_set_options (payload, "video", FALSE, "MPV", 90000);
|
||||
return gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "video", FALSE, "MPV", 90000);
|
||||
return gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -216,7 +216,7 @@ gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay)
|
|||
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = rtpmpvpay->first_ts;
|
||||
|
||||
ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpmpvpay), outbuf);
|
||||
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmpvpay), outbuf);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -264,7 +264,7 @@ gst_rtp_mpv_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
GST_LOG_OBJECT (rtpmpvpay, "available %d, rtp packet length %d", avail,
|
||||
packet_len);
|
||||
|
||||
if (gst_basertppayload_is_filled (basepayload,
|
||||
if (gst_base_rtp_payload_is_filled (basepayload,
|
||||
packet_len, rtpmpvpay->duration)) {
|
||||
ret = gst_rtp_mpv_pay_flush (rtpmpvpay);
|
||||
} else {
|
||||
|
|
|
@ -102,8 +102,8 @@ gst_rtp_pcma_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
|
||||
payload->pt = GST_RTP_PAYLOAD_PCMA;
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "PCMA", 8000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "PCMA", 8000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -102,8 +102,8 @@ gst_rtp_pcmu_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
|
||||
payload->pt = GST_RTP_PAYLOAD_PCMU;
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "PCMU", 8000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "PCMU", 8000);
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -117,12 +117,12 @@ gst_rtp_siren_pay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
|
|||
if (g_ascii_strcasecmp ("audio/x-siren", payload_name))
|
||||
goto wrong_caps;
|
||||
|
||||
gst_basertppayload_set_options (basertppayload, "audio", TRUE, "SIREN",
|
||||
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "SIREN",
|
||||
16000);
|
||||
/* set options for this frame based audio codec */
|
||||
gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload, 20, 40);
|
||||
|
||||
return gst_basertppayload_set_outcaps (basertppayload, NULL);
|
||||
return gst_base_rtp_payload_set_outcaps (basertppayload, NULL);
|
||||
|
||||
/* ERRORS */
|
||||
wrong_dct:
|
||||
|
|
|
@ -184,9 +184,9 @@ gst_rtp_speex_pay_parse_ident (GstRtpSPEEXPay * rtpspeexpay,
|
|||
|
||||
payload = GST_BASE_RTP_PAYLOAD (rtpspeexpay);
|
||||
|
||||
gst_basertppayload_set_options (payload, "audio", FALSE, "SPEEX", rate);
|
||||
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "SPEEX", rate);
|
||||
cstr = g_strdup_printf ("%d", nb_channels);
|
||||
res = gst_basertppayload_set_outcaps (payload, "encoding-params",
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, "encoding-params",
|
||||
G_TYPE_STRING, cstr, NULL);
|
||||
g_free (cstr);
|
||||
|
||||
|
@ -290,7 +290,7 @@ gst_rtp_speex_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
gst_rtp_buffer_unmap (&rtp);
|
||||
|
||||
ret = gst_basertppayload_push (basepayload, outbuf);
|
||||
ret = gst_base_rtp_payload_push (basepayload, outbuf);
|
||||
|
||||
done:
|
||||
gst_buffer_unmap (buffer, data, -1);
|
||||
|
|
|
@ -404,7 +404,6 @@ gst_rtp_theora_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
GstFlowReturn ret;
|
||||
gint payload_len;
|
||||
guint8 *payload, *to_free = NULL;
|
||||
guint32 timestamp;
|
||||
guint32 header, ident;
|
||||
guint8 F, TDT, packets;
|
||||
GstRTPBuffer rtp;
|
||||
|
@ -525,8 +524,6 @@ gst_rtp_theora_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* .. theora data |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*
|
||||
*/
|
||||
timestamp = gst_rtp_buffer_get_timestamp (&rtp);
|
||||
|
||||
while (payload_len >= 2) {
|
||||
guint16 length;
|
||||
|
||||
|
@ -572,18 +569,9 @@ gst_rtp_theora_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
payload += length;
|
||||
payload_len -= length;
|
||||
|
||||
if (timestamp != -1)
|
||||
/* push with timestamp of the last packet, which is the same timestamp that
|
||||
* should apply to the first assembled packet. */
|
||||
ret = gst_base_rtp_depayload_push_ts (depayload, timestamp, outbuf);
|
||||
else
|
||||
ret = gst_base_rtp_depayload_push (depayload, outbuf);
|
||||
|
||||
ret = gst_base_rtp_depayload_push (depayload, outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
break;
|
||||
|
||||
/* make sure we don't set a timestamp on next buffers */
|
||||
timestamp = -1;
|
||||
}
|
||||
|
||||
g_free (to_free);
|
||||
|
|
|
@ -259,7 +259,7 @@ gst_rtp_theora_pay_flush_packet (GstRtpTheoraPay * rtptheorapay)
|
|||
|
||||
/* push, this gives away our ref to the packet, so clear it. */
|
||||
ret =
|
||||
gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtptheorapay),
|
||||
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtptheorapay),
|
||||
rtptheorapay->packet);
|
||||
rtptheorapay->packet = NULL;
|
||||
|
||||
|
@ -445,13 +445,13 @@ gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload)
|
|||
/* configure payloader settings */
|
||||
wstr = g_strdup_printf ("%d", rtptheorapay->width);
|
||||
hstr = g_strdup_printf ("%d", rtptheorapay->height);
|
||||
gst_basertppayload_set_options (basepayload, "video", TRUE, "THEORA", 90000);
|
||||
res = gst_basertppayload_set_outcaps (basepayload,
|
||||
"sampling", G_TYPE_STRING, "YCbCr-4:2:0",
|
||||
"width", G_TYPE_STRING, wstr,
|
||||
"height", G_TYPE_STRING, hstr,
|
||||
"configuration", G_TYPE_STRING, configuration,
|
||||
"delivery-method", G_TYPE_STRING, "inline",
|
||||
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "THEORA",
|
||||
90000);
|
||||
res =
|
||||
gst_base_rtp_payload_set_outcaps (basepayload, "sampling", G_TYPE_STRING,
|
||||
"YCbCr-4:2:0", "width", G_TYPE_STRING, wstr, "height", G_TYPE_STRING,
|
||||
hstr, "configuration", G_TYPE_STRING, configuration, "delivery-method",
|
||||
G_TYPE_STRING, "inline",
|
||||
/* don't set the other defaults
|
||||
*/
|
||||
NULL);
|
||||
|
@ -550,7 +550,7 @@ gst_rtp_theora_pay_payload_buffer (GstRtpTheoraPay * rtptheorapay, guint8 TDT,
|
|||
packet_len = gst_rtp_buffer_calc_packet_len (newsize, 0, 0);
|
||||
|
||||
/* check buffer filled against length and max latency */
|
||||
flush = gst_basertppayload_is_filled (GST_BASE_RTP_PAYLOAD (rtptheorapay),
|
||||
flush = gst_base_rtp_payload_is_filled (GST_BASE_RTP_PAYLOAD (rtptheorapay),
|
||||
packet_len, newduration);
|
||||
/* we can store up to 15 theora packets in one RTP packet. */
|
||||
flush |= (rtptheorapay->payload_pkts == 15);
|
||||
|
|
|
@ -440,7 +440,6 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
GstFlowReturn ret;
|
||||
gint payload_len;
|
||||
guint8 *payload, *to_free = NULL;
|
||||
guint32 timestamp;
|
||||
guint32 header, ident;
|
||||
guint8 F, VDT, packets;
|
||||
GstRTPBuffer rtp;
|
||||
|
@ -564,8 +563,6 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* .. vorbis data |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*
|
||||
*/
|
||||
timestamp = gst_rtp_buffer_get_timestamp (&rtp);
|
||||
|
||||
while (payload_len > 2) {
|
||||
guint16 length;
|
||||
|
||||
|
@ -608,18 +605,9 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
payload += length;
|
||||
payload_len -= length;
|
||||
|
||||
if (timestamp != -1)
|
||||
/* push with timestamp of the last packet, which is the same timestamp that
|
||||
* should apply to the first assembled packet. */
|
||||
ret = gst_base_rtp_depayload_push_ts (depayload, timestamp, outbuf);
|
||||
else
|
||||
ret = gst_base_rtp_depayload_push (depayload, outbuf);
|
||||
|
||||
ret = gst_base_rtp_depayload_push (depayload, outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
break;
|
||||
|
||||
/* make sure we don't set a timestamp on next buffers */
|
||||
timestamp = -1;
|
||||
}
|
||||
|
||||
g_free (to_free);
|
||||
|
|
|
@ -218,7 +218,7 @@ gst_rtp_vorbis_pay_flush_packet (GstRtpVorbisPay * rtpvorbispay)
|
|||
|
||||
/* push, this gives away our ref to the packet, so clear it. */
|
||||
ret =
|
||||
gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtpvorbispay),
|
||||
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpvorbispay),
|
||||
rtpvorbispay->packet);
|
||||
rtpvorbispay->packet = NULL;
|
||||
|
||||
|
@ -385,10 +385,10 @@ gst_rtp_vorbis_pay_finish_headers (GstBaseRTPPayload * basepayload)
|
|||
|
||||
/* configure payloader settings */
|
||||
cstr = g_strdup_printf ("%d", rtpvorbispay->channels);
|
||||
gst_basertppayload_set_options (basepayload, "audio", TRUE, "VORBIS",
|
||||
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "VORBIS",
|
||||
rtpvorbispay->rate);
|
||||
res =
|
||||
gst_basertppayload_set_outcaps (basepayload, "encoding-params",
|
||||
gst_base_rtp_payload_set_outcaps (basepayload, "encoding-params",
|
||||
G_TYPE_STRING, cstr, "configuration", G_TYPE_STRING, configuration, NULL);
|
||||
g_free (cstr);
|
||||
g_free (configuration);
|
||||
|
@ -543,7 +543,7 @@ gst_rtp_vorbis_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
packet_len = gst_rtp_buffer_calc_packet_len (newsize, 0, 0);
|
||||
|
||||
/* check buffer filled against length and max latency */
|
||||
flush = gst_basertppayload_is_filled (basepayload, packet_len, newduration);
|
||||
flush = gst_base_rtp_payload_is_filled (basepayload, packet_len, newduration);
|
||||
/* we can store up to 15 vorbis packets in one RTP packet. */
|
||||
flush |= (rtpvorbispay->payload_pkts == 15);
|
||||
/* flush if we have a new VDT */
|
||||
|
|
|
@ -312,8 +312,7 @@ gst_rtp_vraw_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
GST_LOG_OBJECT (depayload, "new frame with timestamp %u", timestamp);
|
||||
/* new timestamp, flush old buffer and create new output buffer */
|
||||
if (rtpvrawdepay->outbuf) {
|
||||
gst_base_rtp_depayload_push_ts (depayload, rtpvrawdepay->timestamp,
|
||||
rtpvrawdepay->outbuf);
|
||||
gst_base_rtp_depayload_push (depayload, rtpvrawdepay->outbuf);
|
||||
rtpvrawdepay->outbuf = NULL;
|
||||
}
|
||||
|
||||
|
@ -526,8 +525,7 @@ gst_rtp_vraw_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
if (gst_rtp_buffer_get_marker (&rtp)) {
|
||||
GST_LOG_OBJECT (depayload, "marker, flushing frame");
|
||||
if (rtpvrawdepay->outbuf) {
|
||||
gst_base_rtp_depayload_push_ts (depayload, timestamp,
|
||||
rtpvrawdepay->outbuf);
|
||||
gst_base_rtp_depayload_push (depayload, rtpvrawdepay->outbuf);
|
||||
rtpvrawdepay->outbuf = NULL;
|
||||
}
|
||||
rtpvrawdepay->timestamp = -1;
|
||||
|
|
|
@ -203,14 +203,14 @@ gst_rtp_vraw_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
|||
wstr = g_strdup_printf ("%d", GST_VIDEO_INFO_WIDTH (&info));
|
||||
hstr = g_strdup_printf ("%d", GST_VIDEO_INFO_HEIGHT (&info));
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE, "RAW", 90000);
|
||||
gst_base_rtp_payload_set_options (payload, "video", TRUE, "RAW", 90000);
|
||||
if (info.flags & GST_VIDEO_FLAG_INTERLACED) {
|
||||
res = gst_basertppayload_set_outcaps (payload, "sampling", G_TYPE_STRING,
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, "sampling", G_TYPE_STRING,
|
||||
samplingstr, "depth", G_TYPE_STRING, depthstr, "width", G_TYPE_STRING,
|
||||
wstr, "height", G_TYPE_STRING, hstr, "colorimetry", G_TYPE_STRING,
|
||||
colorimetrystr, "interlace", G_TYPE_STRING, "true", NULL);
|
||||
} else {
|
||||
res = gst_basertppayload_set_outcaps (payload, "sampling", G_TYPE_STRING,
|
||||
res = gst_base_rtp_payload_set_outcaps (payload, "sampling", G_TYPE_STRING,
|
||||
samplingstr, "depth", G_TYPE_STRING, depthstr, "width", G_TYPE_STRING,
|
||||
wstr, "height", G_TYPE_STRING, hstr, "colorimetry", G_TYPE_STRING,
|
||||
colorimetrystr, NULL);
|
||||
|
@ -494,7 +494,7 @@ gst_rtp_vraw_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
/* push buffer */
|
||||
ret = gst_basertppayload_push (payload, out);
|
||||
ret = gst_base_rtp_payload_push (payload, out);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue