summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-05-05 22:47:23 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2014-09-18 13:38:00 -0400
commit220236e6564486571b0e7eae079b9cb6a554b933 (patch)
tree31b6cdcc6924087f6a129a2d77b75b4b0abadfcd
parentdeb2be339b727b5fcdc7337c0c77a9202e7e4933 (diff)
downloadfarstream-220236e6564486571b0e7eae079b9cb6a554b933.tar.gz
Remove fsrtcpfilter
It's not useful in real life
-rw-r--r--configure.ac2
-rw-r--r--docs/plugins/farstream-plugins-sections.txt7
-rw-r--r--gst/fsrtcpfilter/Makefile.am18
-rw-r--r--gst/fsrtcpfilter/fs-rtcp-filter.c247
-rw-r--r--gst/fsrtcpfilter/fs-rtcp-filter.h65
-rw-r--r--gst/fsrtpconference/fs-rtp-session.c3
-rw-r--r--tests/check/Makefile.am5
-rw-r--r--tests/check/elements/rtcpfilter.c149
8 files changed, 0 insertions, 496 deletions
diff --git a/configure.ac b/configure.ac
index c60ae7cc..b5669401 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,7 +114,6 @@ FS_PLUGINS_ALL=" \
fsrawconference \
fsrtpconference \
fsmsnconference \
- fsrtcpfilter \
fsvideoanyrate \
fsrtpxdata \
"
@@ -382,7 +381,6 @@ gst/Makefile
gst/fsrawconference/Makefile
gst/fsrtpconference/Makefile
gst/fsmsnconference/Makefile
-gst/fsrtcpfilter/Makefile
gst/fsvideoanyrate/Makefile
gst/fsrtpxdata/Makefile
farstream/Makefile
diff --git a/docs/plugins/farstream-plugins-sections.txt b/docs/plugins/farstream-plugins-sections.txt
index 0564c134..b8590ce9 100644
--- a/docs/plugins/farstream-plugins-sections.txt
+++ b/docs/plugins/farstream-plugins-sections.txt
@@ -527,10 +527,3 @@ fs_raw_participant_get_type
<SUBSECTION Private>
fs_raw_participant_new
</SECTION>
-
-
-<SECTION>
-<FILE>element-fsrtcpfilter</FILE>
-<TITLE>FsRtcpFilter</TITLE>
-FsRtcpFilter
-</SECTION>
diff --git a/gst/fsrtcpfilter/Makefile.am b/gst/fsrtcpfilter/Makefile.am
deleted file mode 100644
index 96d1a403..00000000
--- a/gst/fsrtcpfilter/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-plugin_LTLIBRARIES = libfsrtcpfilter.la
-
-libfsrtcpfilter_la_SOURCES = fs-rtcp-filter.c
-
-noinst_HEADERS = fs-rtcp-filter.h
-
-libfsrtcpfilter_la_CFLAGS = \
- $(FS_CFLAGS) \
- $(GST_BASE_CFLAGS) \
- $(GST_PLUGINS_BASE_CFLAGS) \
- $(GST_CFLAGS)
-libfsrtcpfilter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libfsrtcpfilter_la_LIBADD = \
- $(FS_LIBS) \
- -lgstrtp-@GST_API_VERSION@ \
- $(GST_BASE_LIBS) \
- $(GST_PLUGINS_BASE_LIBS) \
- $(GST_LIBS)
diff --git a/gst/fsrtcpfilter/fs-rtcp-filter.c b/gst/fsrtcpfilter/fs-rtcp-filter.c
deleted file mode 100644
index b070f07a..00000000
--- a/gst/fsrtcpfilter/fs-rtcp-filter.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Farstream Voice+Video library
- *
- * Copyright 2008-2012 Collabora Ltd,
- * Copyright 2008 Nokia Corporation
- * @author: Olivier Crete <olivier.crete@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:element-fsrtcpfilter
- * @short_description: Removes the framerate from video caps
- *
- * This element will remove the framerate from video caps, it is a poor man's
- * videorate for live pipelines.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "fs-rtcp-filter.h"
-
-#include <gst/rtp/gstrtcpbuffer.h>
-
-#include <string.h>
-
-GST_DEBUG_CATEGORY (rtcp_filter_debug);
-#define GST_CAT_DEFAULT (rtcp_filter_debug)
-
-static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("application/x-rtcp"));
-
-static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
- GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("application/x-rtcp"));
-
-/* signals and args */
-enum
-{
- /* FILL ME */
- LAST_SIGNAL
-};
-
-enum
-{
- PROP_0,
- PROP_SENDING
-};
-
-static void fs_rtcp_filter_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void fs_rtcp_filter_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static GstFlowReturn
-fs_rtcp_filter_transform_ip (GstBaseTransform *transform, GstBuffer *buf);
-
-G_DEFINE_TYPE (FsRtcpFilter, fs_rtcp_filter, GST_TYPE_BASE_TRANSFORM);
-
-static void
-fs_rtcp_filter_class_init (FsRtcpFilterClass *klass)
-{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
- GstBaseTransformClass *gstbasetransform_class;
-
- gobject_class = (GObjectClass *) klass;
- gstbasetransform_class = (GstBaseTransformClass *) klass;
-
- GST_DEBUG_CATEGORY_INIT
- (rtcp_filter_debug, "fsrtcpfilter", 0, "fsrtcpfilter");
-
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&srctemplate));
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&sinktemplate));
-
- gst_element_class_set_metadata (gstelement_class,
- "RTCP Filter element",
- "Filter",
- "This element removes unneeded parts of rtcp buffers",
- "Olivier Crete <olivier.crete@collabora.com>");
-
- gobject_class->set_property = fs_rtcp_filter_set_property;
- gobject_class->get_property = fs_rtcp_filter_get_property;
-
- gstbasetransform_class->transform_ip = fs_rtcp_filter_transform_ip;
-
- g_object_class_install_property (gobject_class,
- PROP_SENDING,
- g_param_spec_boolean ("sending",
- "Sending RTP?",
- "If set to FALSE, it assumes that all RTP has been dropped",
- FALSE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-}
-
-static void
-fs_rtcp_filter_init (FsRtcpFilter *rtcpfilter)
-{
- rtcpfilter->sending = FALSE;
-}
-
-static void
-fs_rtcp_filter_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- FsRtcpFilter *filter = FS_RTCP_FILTER (object);
-
- switch (prop_id)
- {
- case PROP_SENDING:
- GST_OBJECT_LOCK (filter);
- g_value_set_boolean (value, filter->sending);
- GST_OBJECT_UNLOCK (filter);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-static void
-fs_rtcp_filter_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- FsRtcpFilter *filter = FS_RTCP_FILTER (object);
-
- switch (prop_id)
- {
- case PROP_SENDING:
- GST_OBJECT_LOCK (filter);
- filter->sending = g_value_get_boolean (value);
- GST_OBJECT_UNLOCK (filter);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static GstFlowReturn
-fs_rtcp_filter_transform_ip (GstBaseTransform *transform, GstBuffer *buf)
-{
- FsRtcpFilter *filter = FS_RTCP_FILTER (transform);
-
- if (!gst_rtcp_buffer_validate (buf))
- {
- GST_ERROR_OBJECT (transform, "Invalid RTCP buffer");
- return GST_FLOW_ERROR;
- }
-
- GST_OBJECT_LOCK (filter);
-
- if (!filter->sending)
- {
- GstRTCPBuffer rtcpbuffer = GST_RTCP_BUFFER_INIT;
- GstRTCPPacket packet;
-
- gst_rtcp_buffer_map (buf, GST_MAP_READWRITE, &rtcpbuffer);
-
- if (gst_rtcp_buffer_get_first_packet (&rtcpbuffer, &packet))
- {
- for (;;)
- {
- if (gst_rtcp_packet_get_type (&packet) == GST_RTCP_TYPE_SR)
- {
- GstRTCPPacket nextpacket = packet;
-
- if (gst_rtcp_packet_move_to_next (&nextpacket) &&
- gst_rtcp_packet_get_type (&nextpacket) == GST_RTCP_TYPE_RR)
- {
- if (!gst_rtcp_packet_remove (&packet))
- break;
- }
- else
- {
- guchar *data = rtcpbuffer.map.data + packet.offset;
-
- /* If there is no RR, lets add an empty one */
- data[0] = (GST_RTCP_VERSION << 6);
- data[1] = GST_RTCP_TYPE_RR;
- data[2] = 0;
- data[3] = 1;
- memmove (rtcpbuffer.map.data + packet.offset + 8,
- rtcpbuffer.map.data + nextpacket.offset,
- rtcpbuffer.map.size - nextpacket.offset);
-
- rtcpbuffer.map.size -= nextpacket.offset - packet.offset - 8 ;
-
- if (!gst_rtcp_buffer_get_first_packet (&rtcpbuffer, &packet))
- break;
- }
-
- }
- else
- {
- if (!gst_rtcp_packet_move_to_next (&packet))
- break;
- }
- }
- }
- gst_rtcp_buffer_unmap (&rtcpbuffer);
- }
-
- GST_OBJECT_UNLOCK (filter);
-
- return GST_FLOW_OK;
-}
-
-gboolean
-fs_rtcp_filter_plugin_init (GstPlugin *plugin)
-{
- return gst_element_register (plugin, "fsrtcpfilter",
- GST_RANK_MARGINAL, FS_TYPE_RTCP_FILTER);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- fsrtcpfilter,
- "RtcpFilter",
- fs_rtcp_filter_plugin_init, VERSION, "LGPL", "Farstream",
- "http://www.freedesktop.org/wiki/Software/Farstream")
diff --git a/gst/fsrtcpfilter/fs-rtcp-filter.h b/gst/fsrtcpfilter/fs-rtcp-filter.h
deleted file mode 100644
index f9ab55c3..00000000
--- a/gst/fsrtcpfilter/fs-rtcp-filter.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Farstream Voice+Video library
- *
- * Copyright 2008 Collabora Ltd,
- * Copyright 2008 Nokia Corporation
- * @author: Olivier Crete <olivier.crete@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __FS_RTCP_FILTER_H__
-#define __FS_RTCP_FILTER_H__
-
-#include <gst/gst.h>
-#include <gst/base/gstbasetransform.h>
-
-G_BEGIN_DECLS
-
-/* #define's don't like whitespacey bits */
-#define FS_TYPE_RTCP_FILTER \
- (fs_rtcp_filter_get_type())
-#define FS_RTCP_FILTER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), \
- FS_TYPE_RTCP_FILTER,FsRtcpFilter))
-#define FS_RTCP_FILTER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), \
- FS_TYPE_RTCP_FILTER,FsRtcpFilterClass))
-#define FS_IS_RTCP_FILTER(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTCP_FILTER))
-#define FS_IS_RTCP_FILTER_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTCP_FILTER))
-
-typedef struct _FsRtcpFilter FsRtcpFilter;
-typedef struct _FsRtcpFilterClass FsRtcpFilterClass;
-typedef struct _FsRtcpFilterPrivate FsRtcpFilterPrivate;
-
-struct _FsRtcpFilter
-{
- GstBaseTransform parent;
-
- gboolean sending;
-};
-
-struct _FsRtcpFilterClass
-{
- GstBaseTransformClass parent_class;
-};
-
-GType fs_rtcp_filter_get_type (void);
-
-G_END_DECLS
-
-#endif /* __FS_RTCP_FILTER_H__ */
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 6b529352..7acc7645 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -2300,9 +2300,6 @@ static GstElement *
_get_recvonly_filter (FsTransmitter *transmitter, guint component,
gpointer user_data)
{
- if (component == FS_COMPONENT_RTCP)
- return gst_element_factory_make ("fsrtcpfilter", NULL);
- else
return NULL;
}
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 78cd60d6..c911dbd5 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -50,7 +50,6 @@ check_PROGRAMS = \
transmitter/nice \
transmitter/shm \
raw/conference \
- elements/rtcpfilter \
rtp/codecs \
rtp/sendcodecs \
rtp/conference \
@@ -169,7 +168,3 @@ utils_binadded_SOURCES = \
testutils.c \
testutils.h \
utils/binadded.c
-
-elements_rtcpfilter_CFLAGS = $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
-elements_rtcpfilter_SOURCES = elements/rtcpfilter.c
-elements_rtcpfilter_LDADD = $(LDADD) -lgstrtp-@GST_API_VERSION@
diff --git a/tests/check/elements/rtcpfilter.c b/tests/check/elements/rtcpfilter.c
deleted file mode 100644
index 531c7d12..00000000
--- a/tests/check/elements/rtcpfilter.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Farstream unit tests for the fsrtcpfilter
- *
- * Copyright (C) 2008 Collabora, Nokia
- * @author: Olivier Crete <olivier.crete@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gst/check/gstcheck.h>
-
-#include <gst/rtp/gstrtcpbuffer.h>
-
-static GstBuffer *
-make_buffer (gboolean have_sr, gint rr_count,
- gboolean have_sdes, gboolean have_bye)
-{
- GstRTCPPacket packet;
- GstBuffer *buf = gst_rtcp_buffer_new (1024);
- gint i;
- GstRTCPBuffer rtcpbuffer = GST_RTCP_BUFFER_INIT;
-
- gst_rtcp_buffer_map (buf, GST_MAP_READWRITE, &rtcpbuffer);
-
- if (have_sr)
- {
- gst_rtcp_buffer_add_packet (&rtcpbuffer, GST_RTCP_TYPE_SR, &packet);
- gst_rtcp_packet_sr_set_sender_info (&packet, 132132, 12, 12, 12, 12);
- }
-
- if (rr_count >= 0 || !have_sr)
- {
- gst_rtcp_buffer_add_packet (&rtcpbuffer, GST_RTCP_TYPE_RR, &packet);
- gst_rtcp_packet_rr_set_ssrc (&packet, 132132);
- for (i = 0; i < rr_count; i++)
- gst_rtcp_packet_add_rb (&packet, 123124+i, 12, 12, 21, 31, 41, 12);
- }
-
- if (have_sdes)
- {
- gst_rtcp_buffer_add_packet (&rtcpbuffer, GST_RTCP_TYPE_SDES, &packet);
- gst_rtcp_packet_sdes_add_item (&packet, 123121);
- gst_rtcp_packet_sdes_add_entry (&packet, GST_RTCP_SDES_EMAIL,
- 10, (guint8 *) "aa@aaa.com");
- gst_rtcp_packet_sdes_add_entry (&packet, GST_RTCP_SDES_CNAME,
- 10, (guint8 *) "aa@bbb.com");
- gst_rtcp_packet_sdes_add_entry (&packet, GST_RTCP_SDES_PHONE,
- 10, (guint8 *) "11-21-2-11");
- }
-
- if (have_bye)
- {
- gst_rtcp_buffer_add_packet (&rtcpbuffer, GST_RTCP_TYPE_BYE, &packet);
- gst_rtcp_packet_bye_add_ssrc (&packet, 132123);
- gst_rtcp_packet_bye_set_reason (&packet, "allo");
- }
- gst_rtcp_buffer_unmap (&rtcpbuffer);
-
- return buf;
-}
-
-GST_START_TEST (test_rtcpfilter)
-{
- GList *in_buffers = NULL;
- GList *out_buffers = NULL;
- GstBuffer *buf = NULL;
- GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtcp");
- gint i;
-
- for (i = 0; i < 3; i++)
- {
- buf = make_buffer (FALSE, i, FALSE, FALSE);
- in_buffers = g_list_append (in_buffers, gst_buffer_ref (buf));
- out_buffers = g_list_append (out_buffers, buf);
-
- buf = make_buffer (FALSE, i, TRUE, FALSE);
- in_buffers = g_list_append (in_buffers, gst_buffer_ref (buf));
- out_buffers = g_list_append (out_buffers, buf);
-
- buf = make_buffer (FALSE, i, TRUE, TRUE);
- in_buffers = g_list_append (in_buffers, gst_buffer_ref (buf));
- out_buffers = g_list_append (out_buffers, buf);
- }
-
- for (i = -1; i < 3; i++)
- {
-
- in_buffers = g_list_append (in_buffers,
- make_buffer (TRUE, i, FALSE, FALSE));
- out_buffers = g_list_append (out_buffers,
- make_buffer (FALSE, i, FALSE, FALSE));
-
- in_buffers = g_list_append (in_buffers,
- make_buffer (TRUE, i, TRUE, FALSE));
- out_buffers = g_list_append (out_buffers,
- make_buffer (FALSE, i, TRUE, FALSE));
-
-
- in_buffers = g_list_append (in_buffers,
- make_buffer (TRUE, i, TRUE, TRUE));
- out_buffers = g_list_append (out_buffers,
- make_buffer (FALSE, i, TRUE, TRUE));
- }
-
-
-
- gst_check_element_push_buffer_list ("fsrtcpfilter", in_buffers, caps,
- out_buffers, caps, GST_FLOW_OK);
-
- gst_caps_unref (caps);
-}
-GST_END_TEST;
-
-static Suite *
-rtcpfilter_suite (void)
-{
- Suite *s = suite_create ("rtcpfilter");
- TCase *tc_chain;
- GLogLevelFlags fatal_mask;
-
- fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
- fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
- g_log_set_always_fatal (fatal_mask);
-
- tc_chain = tcase_create ("rtcpfilter");
- tcase_add_test (tc_chain, test_rtcpfilter);
- suite_add_tcase (s, tc_chain);
-
- return s;
-}
-
-GST_CHECK_MAIN (rtcpfilter);
-