Commit 825cf238 authored by Jan Schmidt's avatar Jan Schmidt

gst/rtsp/: g_base64_encode is a GLib 2.12 function. Use an equivalent taken...

gst/rtsp/: g_base64_encode is a GLib 2.12 function. Use an equivalent taken from icecast to replace it. Relicensed fr...

Original commit message from CVS:
* gst/rtsp/Makefile.am:
* gst/rtsp/rtspconnection.c: (append_auth_header),
(rtsp_connection_send), (rtsp_connection_set_auth):
g_base64_encode is a GLib 2.12 function. Use an equivalent taken
from icecast to replace it. Relicensed from GPL courtesy of Mike
Smith.
parent 66df66da
2007-02-23 Jan Schmidt <thaytan@mad.scientist.com>
* gst/rtsp/Makefile.am:
* gst/rtsp/rtspconnection.c: (append_auth_header),
(rtsp_connection_send), (rtsp_connection_set_auth):
g_base64_encode is a GLib 2.12 function. Use an equivalent taken
from icecast to replace it. Relicensed from GPL courtesy of Mike
Smith.
2007-02-23 Jan Schmidt <thaytan@mad.scientist.com> 2007-02-23 Jan Schmidt <thaytan@mad.scientist.com>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_finalize), * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_finalize),
......
...@@ -8,7 +8,8 @@ libgstrtsp_la_SOURCES = gstrtsp.c gstrtspsrc.c \ ...@@ -8,7 +8,8 @@ libgstrtsp_la_SOURCES = gstrtsp.c gstrtspsrc.c \
rtspmessage.c \ rtspmessage.c \
rtsptransport.c \ rtsptransport.c \
rtspurl.c \ rtspurl.c \
sdpmessage.c sdpmessage.c \
base64.c
libgstrtsp_la_CFLAGS = $(GST_CFLAGS) libgstrtsp_la_CFLAGS = $(GST_CFLAGS)
libgstrtsp_la_LIBADD = $(GST_LIBS) $(WIN32_LIBS) libgstrtsp_la_LIBADD = $(GST_LIBS) $(WIN32_LIBS)
...@@ -20,4 +21,4 @@ test_SOURCES = test.c rtspdefs.c rtspurl.c rtspconnection.c rtspmessage.c rtsptr ...@@ -20,4 +21,4 @@ test_SOURCES = test.c rtspdefs.c rtspurl.c rtspconnection.c rtspmessage.c rtsptr
test_CFLAGS = $(GST_CFLAGS) test_CFLAGS = $(GST_CFLAGS)
test_LDFLAGS = $(GST_LIBS) $(WIN32_LIBS) test_LDFLAGS = $(GST_LIBS) $(WIN32_LIBS)
noinst_HEADERS = gstrtspsrc.h gstrtsp.h gstrtpdec.h rtsptransport.h rtsp.h rtspurl.h rtspconnection.h rtspdefs.h rtspmessage.h sdp.h sdpmessage.h rtspextwms.h rtspext.h noinst_HEADERS = gstrtspsrc.h gstrtsp.h gstrtpdec.h rtsptransport.h rtsp.h rtspurl.h rtspconnection.h rtspdefs.h rtspmessage.h sdp.h sdpmessage.h rtspextwms.h rtspext.h base64.h
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#endif #endif
#include "rtspconnection.h" #include "rtspconnection.h"
#include "base64.h"
/* the select call is also performed on the control sockets, that way /* the select call is also performed on the control sockets, that way
* we can send special commands to unlock or restart the select call */ * we can send special commands to unlock or restart the select call */
...@@ -242,8 +243,7 @@ append_auth_header (RTSPConnection * conn, RTSPMessage * message, GString * str) ...@@ -242,8 +243,7 @@ append_auth_header (RTSPConnection * conn, RTSPMessage * message, GString * str)
case RTSP_AUTH_BASIC:{ case RTSP_AUTH_BASIC:{
gchar *user_pass = gchar *user_pass =
g_strdup_printf ("%s:%s", conn->username, conn->passwd); g_strdup_printf ("%s:%s", conn->username, conn->passwd);
gchar *user_pass64 = gchar *user_pass64 = util_base64_encode (user_pass, strlen (user_pass));
g_base64_encode ((guchar *) user_pass, strlen (user_pass));
gchar *auth_string = g_strdup_printf ("Basic %s", user_pass64); gchar *auth_string = g_strdup_printf ("Basic %s", user_pass64);
append_header (RTSP_HDR_AUTHORIZATION, auth_string, str); append_header (RTSP_HDR_AUTHORIZATION, auth_string, str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment