From: Wim Taymans Date: Thu, 10 Nov 2011 16:23:47 +0000 (+0100) Subject: update for changed base classes X-Git-Tag: 1.19.3~509^2~7550 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbaf216d2554897b09f00420cb8cb6a107ffc2b3;p=platform%2Fupstream%2Fgstreamer.git update for changed base classes --- diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c index e13e135..7259931 100644 --- a/gst/rtp/gstrtpL16pay.c +++ b/gst/rtp/gstrtpL16pay.c @@ -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); } diff --git a/gst/rtp/gstrtpac3pay.c b/gst/rtp/gstrtpac3pay.c index 851b92d..d561455 100644 --- a/gst/rtp/gstrtpac3pay.c +++ b/gst/rtp/gstrtpac3pay.c @@ -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; diff --git a/gst/rtp/gstrtpamrpay.c b/gst/rtp/gstrtpamrpay.c index 5454b69..930779c 100644 --- a/gst/rtp/gstrtpamrpay.c +++ b/gst/rtp/gstrtpamrpay.c @@ -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; diff --git a/gst/rtp/gstrtpbvpay.c b/gst/rtp/gstrtpbvpay.c index 2066d9c..6388653 100644 --- a/gst/rtp/gstrtpbvpay.c +++ b/gst/rtp/gstrtpbvpay.c @@ -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; } diff --git a/gst/rtp/gstrtpceltpay.c b/gst/rtp/gstrtpceltpay.c index 176de7e..096b1a9 100644 --- a/gst/rtp/gstrtpceltpay.c +++ b/gst/rtp/gstrtpceltpay.c @@ -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); } diff --git a/gst/rtp/gstrtpdvpay.c b/gst/rtp/gstrtpdvpay.c index 10690ab..0d0cc18 100644 --- a/gst/rtp/gstrtpdvpay.c +++ b/gst/rtp/gstrtpdvpay.c @@ -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; diff --git a/gst/rtp/gstrtpg722pay.c b/gst/rtp/gstrtpg722pay.c index d07abfe..bc19a5d 100644 --- a/gst/rtp/gstrtpg722pay.c +++ b/gst/rtp/gstrtpg722pay.c @@ -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); } diff --git a/gst/rtp/gstrtpg723pay.c b/gst/rtp/gstrtpg723pay.c index 2621c55..e870ab5 100644 --- a/gst/rtp/gstrtpg723pay.c +++ b/gst/rtp/gstrtpg723pay.c @@ -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); } diff --git a/gst/rtp/gstrtpg726pay.c b/gst/rtp/gstrtpg726pay.c index 12b772f..db76d03 100644 --- a/gst/rtp/gstrtpg726pay.c +++ b/gst/rtp/gstrtpg726pay.c @@ -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); diff --git a/gst/rtp/gstrtpg729pay.c b/gst/rtp/gstrtpg729pay.c index 746b2f9..c827c31 100644 --- a/gst/rtp/gstrtpg729pay.c +++ b/gst/rtp/gstrtpg729pay.c @@ -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; } diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c index 5a8061f..1fbe424 100644 --- a/gst/rtp/gstrtpgsmpay.c +++ b/gst/rtp/gstrtpgsmpay.c @@ -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; diff --git a/gst/rtp/gstrtpgstpay.c b/gst/rtp/gstrtpgstpay.c index 571a7a8..3d405d9 100644 --- a/gst/rtp/gstrtpgstpay.c +++ b/gst/rtp/gstrtpgstpay.c @@ -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); diff --git a/gst/rtp/gstrtph263depay.c b/gst/rtp/gstrtph263depay.c index 13a2cca..239a654 100644 --- a/gst/rtp/gstrtph263depay.c +++ b/gst/rtp/gstrtph263depay.c @@ -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; diff --git a/gst/rtp/gstrtph263pay.c b/gst/rtp/gstrtph263pay.c index 8bb5efe..1efbb2d 100644 --- a/gst/rtp/gstrtph263pay.c +++ b/gst/rtp/gstrtph263pay.c @@ -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"); diff --git a/gst/rtp/gstrtph263ppay.c b/gst/rtp/gstrtph263ppay.c index 73f1a33..4ddfbb6 100644 --- a/gst/rtp/gstrtph263ppay.c +++ b/gst/rtp/gstrtph263ppay.c @@ -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; diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c index 8ee8bf8..d300e9a 100644 --- a/gst/rtp/gstrtph264pay.c +++ b/gst/rtp/gstrtph264pay.c @@ -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 "); 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); diff --git a/gst/rtp/gstrtpilbcpay.c b/gst/rtp/gstrtpilbcpay.c index 3460e7f..5914f99 100644 --- a/gst/rtp/gstrtpilbcpay.c +++ b/gst/rtp/gstrtpilbcpay.c @@ -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); diff --git a/gst/rtp/gstrtpj2kpay.c b/gst/rtp/gstrtpj2kpay.c index d615ea9..48a58c8 100644 --- a/gst/rtp/gstrtpj2kpay.c +++ b/gst/rtp/gstrtpj2kpay.c @@ -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 diff --git a/gst/rtp/gstrtpjpegpay.c b/gst/rtp/gstrtpjpegpay.c index 3c8ca57..4a8a202 100644 --- a/gst/rtp/gstrtpjpegpay.c +++ b/gst/rtp/gstrtpjpegpay.c @@ -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); diff --git a/gst/rtp/gstrtpmp2tpay.c b/gst/rtp/gstrtpmp2tpay.c index 8fc2c89..f38394b 100644 --- a/gst/rtp/gstrtpmp2tpay.c +++ b/gst/rtp/gstrtpmp2tpay.c @@ -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; diff --git a/gst/rtp/gstrtpmp4apay.c b/gst/rtp/gstrtpmp4apay.c index 59c7e60..d7a42c1 100644 --- a/gst/rtp/gstrtpmp4apay.c +++ b/gst/rtp/gstrtpmp4apay.c @@ -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; } diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c index 1514911..5b81c1c 100644 --- a/gst/rtp/gstrtpmp4gpay.c +++ b/gst/rtp/gstrtpmp4gpay.c @@ -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; } diff --git a/gst/rtp/gstrtpmp4vpay.c b/gst/rtp/gstrtpmp4vpay.c index 21b8d0d..be64144 100644 --- a/gst/rtp/gstrtpmp4vpay.c +++ b/gst/rtp/gstrtpmp4vpay.c @@ -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; diff --git a/gst/rtp/gstrtpmpapay.c b/gst/rtp/gstrtpmpapay.c index d4ab883..3962154 100644 --- a/gst/rtp/gstrtpmpapay.c +++ b/gst/rtp/gstrtpmpapay.c @@ -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; diff --git a/gst/rtp/gstrtpmpvpay.c b/gst/rtp/gstrtpmpvpay.c index 1d32e9a..5b7eee0 100644 --- a/gst/rtp/gstrtpmpvpay.c +++ b/gst/rtp/gstrtpmpvpay.c @@ -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 { diff --git a/gst/rtp/gstrtppcmapay.c b/gst/rtp/gstrtppcmapay.c index 75d12e8..aac1b57 100644 --- a/gst/rtp/gstrtppcmapay.c +++ b/gst/rtp/gstrtppcmapay.c @@ -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; } diff --git a/gst/rtp/gstrtppcmupay.c b/gst/rtp/gstrtppcmupay.c index 665fba7..f076ecc 100644 --- a/gst/rtp/gstrtppcmupay.c +++ b/gst/rtp/gstrtppcmupay.c @@ -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; } diff --git a/gst/rtp/gstrtpsirenpay.c b/gst/rtp/gstrtpsirenpay.c index 2aca54a..5a9fc59 100644 --- a/gst/rtp/gstrtpsirenpay.c +++ b/gst/rtp/gstrtpsirenpay.c @@ -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: diff --git a/gst/rtp/gstrtpspeexpay.c b/gst/rtp/gstrtpspeexpay.c index d65f81e..152d4ae 100644 --- a/gst/rtp/gstrtpspeexpay.c +++ b/gst/rtp/gstrtpspeexpay.c @@ -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); diff --git a/gst/rtp/gstrtptheoradepay.c b/gst/rtp/gstrtptheoradepay.c index a4b98ed..23c6c4e 100644 --- a/gst/rtp/gstrtptheoradepay.c +++ b/gst/rtp/gstrtptheoradepay.c @@ -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); diff --git a/gst/rtp/gstrtptheorapay.c b/gst/rtp/gstrtptheorapay.c index 496f57c..1dca934 100644 --- a/gst/rtp/gstrtptheorapay.c +++ b/gst/rtp/gstrtptheorapay.c @@ -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); diff --git a/gst/rtp/gstrtpvorbisdepay.c b/gst/rtp/gstrtpvorbisdepay.c index e6a2b5b..da4e730 100644 --- a/gst/rtp/gstrtpvorbisdepay.c +++ b/gst/rtp/gstrtpvorbisdepay.c @@ -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); diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 09f71e6..cacaaf1 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -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 */ diff --git a/gst/rtp/gstrtpvrawdepay.c b/gst/rtp/gstrtpvrawdepay.c index aff0a1b..c3e79ca 100644 --- a/gst/rtp/gstrtpvrawdepay.c +++ b/gst/rtp/gstrtpvrawdepay.c @@ -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; diff --git a/gst/rtp/gstrtpvrawpay.c b/gst/rtp/gstrtpvrawpay.c index ae6dc83..c2b46af 100644 --- a/gst/rtp/gstrtpvrawpay.c +++ b/gst/rtp/gstrtpvrawpay.c @@ -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); } }