mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-12-04 14:46:31 -05:00
Akos Veres suggested that ezstream should be able to set the login username,
and I concur. git-svn-id: https://svn.xiph.org/trunk/ezstream@16319 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
parent
d675de9782
commit
c6a686560e
3
NEWS
3
NEWS
@ -6,6 +6,9 @@ Changes in 0.5.5, released on XXXX-XX-XX:
|
|||||||
|
|
||||||
* various:
|
* various:
|
||||||
- [MISC] Further improvements and minor fixes in the build system.
|
- [MISC] Further improvements and minor fixes in the build system.
|
||||||
|
- [NEW] New optional <sourceuser/> configuration option, to change the
|
||||||
|
username used in authentication with Icecast. Suggested by
|
||||||
|
Akos Veres.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,6 +130,15 @@ The content must be of the form
|
|||||||
For example:
|
For example:
|
||||||
.Pp
|
.Pp
|
||||||
.Dl \&<url\&>http://example.com:8000/stream.ogg\&</url\&>
|
.Dl \&<url\&>http://example.com:8000/stream.ogg\&</url\&>
|
||||||
|
.It Sy \&<sourceuser\ /\&>
|
||||||
|
.Pq Optional.
|
||||||
|
Sets the source username for authentication with the Icecast server.
|
||||||
|
The default user
|
||||||
|
.Po
|
||||||
|
usually
|
||||||
|
.Dq Li source
|
||||||
|
.Pc
|
||||||
|
is used if this element is not provided.
|
||||||
.It Sy \&<sourcepassword\ /\&>
|
.It Sy \&<sourcepassword\ /\&>
|
||||||
.Pq Mandatory.
|
.Pq Mandatory.
|
||||||
Sets the source password for authentication with the Icecast server.
|
Sets the source password for authentication with the Icecast server.
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
-->
|
-->
|
||||||
<ezstream>
|
<ezstream>
|
||||||
<url>http://localhost:8000/stream</url>
|
<url>http://localhost:8000/stream</url>
|
||||||
|
<!--
|
||||||
|
If a different user name than "source" should be used, set it in
|
||||||
|
<sourceuser/>:
|
||||||
|
-->
|
||||||
|
<!-- <sourceuser>mr_stream</sourceuser> -->
|
||||||
<sourcepassword>hackme</sourcepassword>
|
<sourcepassword>hackme</sourcepassword>
|
||||||
<format>MP3</format>
|
<format>MP3</format>
|
||||||
<filename>playlist.m3u</filename>
|
<filename>playlist.m3u</filename>
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
-->
|
-->
|
||||||
<ezstream>
|
<ezstream>
|
||||||
<url>http://localhost:8000/vorbis.ogg</url>
|
<url>http://localhost:8000/vorbis.ogg</url>
|
||||||
|
<!--
|
||||||
|
If a different user name than "source" should be used, set it in
|
||||||
|
<sourceuser/>:
|
||||||
|
-->
|
||||||
|
<!-- <sourceuser>mr_stream</sourceuser> -->
|
||||||
<sourcepassword>hackme</sourcepassword>
|
<sourcepassword>hackme</sourcepassword>
|
||||||
<format>VORBIS</format>
|
<format>VORBIS</format>
|
||||||
<filename>playlist.m3u</filename>
|
<filename>playlist.m3u</filename>
|
||||||
|
@ -128,6 +128,19 @@ parseConfig(const char *fileName)
|
|||||||
xmlFree(ls_xmlContentPtr);
|
xmlFree(ls_xmlContentPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!xmlStrcmp(cur->name, (const xmlChar *)"sourceuser")) {
|
||||||
|
if (ezConfig.username != NULL) {
|
||||||
|
printf("%s[%ld]: Error: Cannot have multiple <sourceuser> elements\n",
|
||||||
|
fileName, xmlGetLineNo(cur));
|
||||||
|
config_error++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (cur->xmlChildrenNode != NULL) {
|
||||||
|
ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
|
||||||
|
ezConfig.username = xstrdup(ls_xmlContentPtr);
|
||||||
|
xmlFree(ls_xmlContentPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!xmlStrcmp(cur->name, (const xmlChar *)"sourcepassword")) {
|
if (!xmlStrcmp(cur->name, (const xmlChar *)"sourcepassword")) {
|
||||||
if (ezConfig.password != NULL) {
|
if (ezConfig.password != NULL) {
|
||||||
printf("%s[%ld]: Error: Cannot have multiple <sourcepassword> elements\n",
|
printf("%s[%ld]: Error: Cannot have multiple <sourcepassword> elements\n",
|
||||||
|
@ -44,6 +44,7 @@ typedef struct tag_FORMAT_ENCDEC {
|
|||||||
|
|
||||||
typedef struct tag_EZCONFIG {
|
typedef struct tag_EZCONFIG {
|
||||||
char *URL;
|
char *URL;
|
||||||
|
char *username;
|
||||||
char *password;
|
char *password;
|
||||||
char *format;
|
char *format;
|
||||||
char *fileName;
|
char *fileName;
|
||||||
|
@ -151,6 +151,13 @@ stream_setup(const char *host, unsigned short port, const char *mount)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pezConfig->username &&
|
||||||
|
shout_set_user(shout, pezConfig->username) != SHOUTERR_SUCCESS) {
|
||||||
|
printf("%s: shout_set_user(): %s\n",
|
||||||
|
__progname, shout_get_error(shout));
|
||||||
|
shout_free(shout);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
if (pezConfig->serverName &&
|
if (pezConfig->serverName &&
|
||||||
shout_set_name(shout, pezConfig->serverName) != SHOUTERR_SUCCESS) {
|
shout_set_name(shout, pezConfig->serverName) != SHOUTERR_SUCCESS) {
|
||||||
printf("%s: shout_set_name(): %s\n",
|
printf("%s: shout_set_name(): %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user