rpms/gstreamer-plugins-good/F-12 0001-Add-user-id-and-user-pw-properties.patch, NONE, 1.1 gstreamer-plugins-good.spec, 1.111, 1.112
Bastien Nocera
hadess at fedoraproject.org
Mon Nov 30 15:08:38 UTC 2009
Author: hadess
Update of /cvs/pkgs/rpms/gstreamer-plugins-good/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20975
Modified Files:
gstreamer-plugins-good.spec
Added Files:
0001-Add-user-id-and-user-pw-properties.patch
Log Message:
* Mon Nov 30 2009 Bastien Nocera <bnocera at redhat.com> 0.10.17-2
- Add support for authenticating RTSP sources
0001-Add-user-id-and-user-pw-properties.patch:
gstrtspsrc.c | 38 +++++++++++++++++++++++++++++++++++++-
gstrtspsrc.h | 3 ++-
2 files changed, 39 insertions(+), 2 deletions(-)
--- NEW FILE 0001-Add-user-id-and-user-pw-properties.patch ---
>From efc611e42021de4ddfb603288b8eb3e8a3d5e66b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Thu, 12 Nov 2009 19:11:18 +0000
Subject: [PATCH 01/42] Add user-id and user-pw properties
So that one doesn't need to modify the URL to have access
to authenticated RTSP streams.
fixes #601728
---
gst/rtsp/gstrtspsrc.c | 38 +++++++++++++++++++++++++++++++++++++-
gst/rtsp/gstrtspsrc.h | 2 ++
2 files changed, 39 insertions(+), 1 deletions(-)
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 0ed3215..fb939b6 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -166,6 +166,8 @@ enum
PROP_DO_RTCP,
PROP_PROXY,
PROP_RTP_BLOCKSIZE,
+ PROP_USER_ID,
+ PROP_USER_PW,
PROP_LAST
};
@@ -387,6 +389,16 @@ gst_rtspsrc_class_init (GstRTSPSrcClass * klass)
0, 65536, DEFAULT_RTP_BLOCKSIZE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (gobject_class,
+ PROP_USER_ID,
+ g_param_spec_string ("user-id", "user-id",
+ "RTSP location URI user id for authentication", NULL,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class, PROP_USER_PW,
+ g_param_spec_string ("user-pw", "user-pw",
+ "RTSP location URI user password for authentication", NULL,
+ G_PARAM_READWRITE));
+
gstelement_class->change_state = gst_rtspsrc_change_state;
gstbin_class->handle_message = gst_rtspsrc_handle_message;
@@ -442,6 +454,8 @@ gst_rtspsrc_finalize (GObject * object)
g_free (rtspsrc->location);
g_free (rtspsrc->req_location);
gst_rtsp_url_free (rtspsrc->url);
+ g_free (rtspsrc->user_id);
+ g_free (rtspsrc->user_pw);
/* free locks */
g_static_rec_mutex_free (rtspsrc->stream_rec_lock);
@@ -565,6 +579,16 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value,
case PROP_RTP_BLOCKSIZE:
rtspsrc->rtp_blocksize = g_value_get_uint (value);
break;
+ case PROP_USER_ID:
+ if (rtspsrc->user_id)
+ g_free (rtspsrc->user_id);
+ rtspsrc->user_id = g_value_dup_string (value);
+ break;
+ case PROP_USER_PW:
+ if (rtspsrc->user_pw)
+ g_free (rtspsrc->user_pw);
+ rtspsrc->user_pw = g_value_dup_string (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -632,6 +656,12 @@ gst_rtspsrc_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_RTP_BLOCKSIZE:
g_value_set_uint (value, rtspsrc->rtp_blocksize);
break;
+ case PROP_USER_ID:
+ g_value_set_string (value, rtspsrc->user_id);
+ break;
+ case PROP_USER_PW:
+ g_value_set_string (value, rtspsrc->user_pw);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -3601,12 +3631,18 @@ gst_rtspsrc_setup_auth (GstRTSPSrc * src, GstRTSPMessage * response)
url = gst_rtsp_connection_get_url (src->connection);
/* Do we have username and password available? */
- if (url != NULL && !src->tried_url_auth) {
+ if (url != NULL && !src->tried_url_auth && url->user != NULL
+ && url->passwd != NULL) {
user = url->user;
pass = url->passwd;
src->tried_url_auth = TRUE;
GST_DEBUG_OBJECT (src,
"Attempting authentication using credentials from the URL");
+ } else {
+ user = src->user_id;
+ pass = src->user_pw;
+ GST_DEBUG_OBJECT (src,
+ "Attempting authentication using credentials from the properties");
}
/* FIXME: If the url didn't contain username and password or we tried them
diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h
index b4ed06b..18646c3 100644
--- a/gst/rtsp/gstrtspsrc.h
+++ b/gst/rtsp/gstrtspsrc.h
@@ -194,6 +194,8 @@ struct _GstRTSPSrc {
gchar *proxy_user;
gchar *proxy_passwd;
guint rtp_blocksize;
+ gchar *user_id;
+ gchar *user_pw;
/* state */
GstRTSPState state;
--
1.6.5.2
Index: gstreamer-plugins-good.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-good/F-12/gstreamer-plugins-good.spec,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -p -r1.111 -r1.112
--- gstreamer-plugins-good.spec 17 Nov 2009 10:44:01 -0000 1.111
+++ gstreamer-plugins-good.spec 30 Nov 2009 15:08:37 -0000 1.112
@@ -6,7 +6,7 @@
Name: %{gstreamer}-plugins-good
Version: 0.10.17
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GStreamer plug-ins with good code and licensing
Group: Applications/Multimedia
@@ -72,6 +72,9 @@ BuildRequires: automake autoconf libtool
Provides: gstreamer-plugins-farsight = 0.12.12-1
Obsoletes: gstreamer-plugins-farsight < 0.12.12
+# https://bugzilla.gnome.org/show_bug.cgi?id=601728
+Patch1: 0001-Add-user-id-and-user-pw-properties.patch
+
%description
GStreamer is a streaming media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
@@ -109,6 +112,7 @@ This is a dummy package to make gstreame
%patch0 -p1 -b .farsight
libtoolize -f
autoreconf
+%patch1 -p1 -b .rtsp-auth
%build
@@ -272,6 +276,9 @@ export GCONF_CONFIG_SOURCE=`gconftool-2
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gstreamer-%{majorminor}.schemas > /dev/null || :
%changelog
+* Mon Nov 30 2009 Bastien Nocera <bnocera at redhat.com> 0.10.17-2
+- Add support for authenticating RTSP sources
+
* Tue Nov 17 2009 Bastien Nocera <bnocera at redhat.com> 0.10.17-1
- Update to 0.10.17
More information about the scm-commits
mailing list