diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-05-05 22:47:23 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2014-09-18 13:38:00 -0400 |
commit | 220236e6564486571b0e7eae079b9cb6a554b933 (patch) | |
tree | 31b6cdcc6924087f6a129a2d77b75b4b0abadfcd /gst | |
parent | deb2be339b727b5fcdc7337c0c77a9202e7e4933 (diff) | |
download | farstream-220236e6564486571b0e7eae079b9cb6a554b933.tar.gz |
Remove fsrtcpfilter
It's not useful in real life
Diffstat (limited to 'gst')
-rw-r--r-- | gst/fsrtcpfilter/Makefile.am | 18 | ||||
-rw-r--r-- | gst/fsrtcpfilter/fs-rtcp-filter.c | 247 | ||||
-rw-r--r-- | gst/fsrtcpfilter/fs-rtcp-filter.h | 65 | ||||
-rw-r--r-- | gst/fsrtpconference/fs-rtp-session.c | 3 |
4 files changed, 0 insertions, 333 deletions
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; } |