1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-09-15 04:08:07 -04:00

Revert all changes since release_0_5_6

The individual commits have been cherry-picked into develop. From
now on, master will always reflect the released state of the code
as per the Gitflow branching model.

See http://nvie.com/posts/a-successful-git-branching-model/ for more
information.
This commit is contained in:
Moritz Grimm 2015-01-01 23:44:22 +01:00
parent 4176545211
commit 47fc346294
9 changed files with 24 additions and 91 deletions

24
NEWS
View File

@ -1,13 +1,3 @@
Changes in 0.5.7, released on XXXX-XX-XX:
* various:
- [NEW] Add new <metadata_refreshinterval/> feature from Matthew Adams
(with minor changes plus documentation.) This allows for recurring
and custom metadata updates inbetween song changes via
<metadata_progname/>.
Changes in 0.5.6, released on 2009-08-31:
* ezstream-file.sh:
@ -187,7 +177,7 @@ Changes in 0.4.0, released on 2007-03-11:
program.
* src/compat.c:
- [NEW] Implement a basename() function for Windows that behaves like the
- [ADD] Implement a basename() function for Windows that behaves like the
ones used on Unix systems.
* win32/:
@ -195,19 +185,19 @@ Changes in 0.4.0, released on 2007-03-11:
distribution, and provide a much better PDF version instead.
* various:
- [NEW] Allow ezstream to use TagLib for reading metadata from media
- [ADD] Allow ezstream to use TagLib for reading metadata from media
files. TagLib (libtag_c) is now an optional dependency.
- [NEW] When built with TagLib support, include the song length in the
- [ADD] When built with TagLib support, include the song length in the
"real-time" information line, if available.
- [NEW] New <metadata_progname> configuration option, which causes
- [ADD] New <metadata_progname> configuration option, which causes
metadata to be read from the output of an external program or
script.
- [NEW] New runtime control via the SIGUSR2 signal, which triggers reading
- [ADD] New runtime control via the SIGUSR2 signal, which triggers reading
of fresh metadata information from <metadata_progname> (metadata
is always read at song changes.)
- [NEW] New <metadata_format> configuration option, to customize metadata
- [ADD] New <metadata_format> configuration option, to customize metadata
strings when used with the new <metadata_progname> feature.
- [NEW] New '@a@' and '@t@' placeholders for separate artist and title
- [ADD] New '@a@' and '@t@' placeholders for separate artist and title
metadata in de-/encoder commands.

View File

@ -2,7 +2,7 @@ dnl ###########
dnl ## SETUP ###########################################################
dnl ###########
AC_INIT([ezstream], [0.5.7],
AC_INIT([ezstream], [0.5.6],
[https://trac.xiph.org/newticket?component=ezstream])
AC_REVISION([$Id$])
AC_PREREQ([2.61])

View File

@ -275,17 +275,6 @@ See the
.Sy METADATA
section for details on how metadata is handled by
.Nm .
.It Sy \&<metadata_refreshinterval\ /\&>
.Pq Optional.
Configures the time
.Pq in seconds
inbetween additional metadata updates via
.Li \&<metadata_progname/\&> .
A value of 0
.Pq zero
triggers updates as fast as possible, while a value of \&-1
.Pq minus one
or the absence of this configuration element disables this feature.
.It Sy \&<stream_once\ /\&>
Set to
.Sy 1

View File

@ -18,11 +18,6 @@
configuration must be as follows:
-->
<filename>%FILENAME%</filename>
<!--
If the generated playlist should not loop forever, set <stream_once />
to 1.
-->
<stream_once>0</stream_once>
<!--
The usual, remaining configuration statements follow. See the other
examples and the documentation for details.

View File

@ -20,8 +20,6 @@
<metadata_progname>meta.sh</metadata_progname>
<!-- Set the metadata string according to this format: -->
<metadata_format>@s@: @a@ - @t@</metadata_format>
<!-- Update metadata from meta.sh at least once every 10 seconds: -->
<metadata_refreshinterval>10</metadata_refreshinterval>
<!--
The following settings are used to describe your stream to the server.
It's up to you to make sure that the bitrate/quality/samplerate/channels

View File

@ -89,8 +89,7 @@ parseConfig(const char *fileName)
xmlNodePtr cur;
char *ls_xmlContentPtr;
int program_set, reconnect_set, shuffle_set,
streamOnce_set, svrinfopublic_set,
refresh_set;
streamOnce_set, svrinfopublic_set;
unsigned int config_error;
xmlLineNumbersDefault(1);
@ -107,17 +106,14 @@ parseConfig(const char *fileName)
return (0);
}
memset(&ezConfig, 0, sizeof(ezConfig));
ezConfig.metadataRefreshInterval = -1;
memset(&ezConfig, '\000', sizeof(ezConfig));
config_error = 0;
program_set = 0;
reconnect_set = 0;
refresh_set = 0;
shuffle_set = 0;
streamOnce_set = 0;
svrinfopublic_set = 0;
for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
if (!xmlStrcmp(cur->name, (const xmlChar *)"url")) {
if (ezConfig.URL != NULL) {
@ -234,27 +230,6 @@ parseConfig(const char *fileName)
}
}
}
if (!xmlStrcmp(cur->name, (const xmlChar *)"metadata_refreshinterval")) {
if (refresh_set) {
printf("%s[%ld]: Error: Cannot have multiple <metadata_refreshinterval> elements\n",
fileName, xmlGetLineNo(cur));
config_error++;
continue;
}
if (cur->xmlChildrenNode != NULL) {
const char *errstr;
ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
ezConfig.metadataRefreshInterval = (unsigned int)strtonum(ls_xmlContentPtr, -1LL, (long long)INT_MAX, &errstr);
if (errstr) {
printf("%s[%ld]: Error: In <metadata_refreshinterval>: '%s' is %s\n",
fileName, xmlGetLineNo(cur), ls_xmlContentPtr, errstr);
config_error++;
continue;
}
xmlFree(ls_xmlContentPtr);
refresh_set = 1;
}
}
if (!xmlStrcmp(cur->name, (const xmlChar *)"playlist_program")) {
if (program_set) {
printf("%s[%ld]: Error: Cannot have multiple <playlist_program> elements\n",

View File

@ -66,7 +66,6 @@ typedef struct tag_EZCONFIG {
int fileNameIsProgram;
int streamOnce;
unsigned int reconnectAttempts;
int metadataRefreshInterval;
} EZCONFIG;
EZCONFIG * getEZConfig(void);

View File

@ -750,7 +750,6 @@ sendStream(shout_t *shout, FILE *filepstream, const char *fileName,
int ret;
double kbps = -1.0;
struct timeval timeStamp, *startTime = tv;
struct timeval callTime, currentTime;
if (startTime == NULL) {
printf("%s: sendStream(): Internal error: startTime is NULL\n",
@ -758,8 +757,6 @@ sendStream(shout_t *shout, FILE *filepstream, const char *fileName,
abort();
}
ez_gettimeofday((void *)&callTime);
timeStamp.tv_sec = startTime->tv_sec;
timeStamp.tv_usec = startTime->tv_usec;
@ -798,15 +795,7 @@ sendStream(shout_t *shout, FILE *filepstream, const char *fileName,
ret = STREAM_SKIP;
break;
}
ez_gettimeofday((void *)&currentTime);
if (queryMetadata ||
(pezConfig->metadataRefreshInterval != -1
&& (currentTime.tv_sec - callTime.tv_sec
>= pezConfig->metadataRefreshInterval)
)
) {
if (queryMetadata) {
queryMetadata = 0;
if (metadataFromProgram) {
ret = STREAM_UPDMDATA;
@ -816,7 +805,8 @@ sendStream(shout_t *shout, FILE *filepstream, const char *fileName,
total += bytes_read;
if (qFlag && vFlag) {
double oldTime, newTime;
struct timeval tval;
double oldTime, newTime;
if (!isStdin && playlistMode) {
if (pezConfig->fileNameIsProgram) {
@ -832,22 +822,20 @@ sendStream(shout_t *shout, FILE *filepstream, const char *fileName,
oldTime = (double)timeStamp.tv_sec
+ (double)timeStamp.tv_usec / 1000000.0;
newTime = (double)currentTime.tv_sec
+ (double)currentTime.tv_usec / 1000000.0;
ez_gettimeofday((void *)&tval);
newTime = (double)tval.tv_sec
+ (double)tval.tv_usec / 1000000.0;
if (songLenStr == NULL)
printf(" [ %s]",
getTimeString(currentTime.tv_sec -
startTime->tv_sec));
getTimeString(tval.tv_sec - startTime->tv_sec));
else
printf(" [ %s/%s]",
getTimeString(currentTime.tv_sec -
startTime->tv_sec),
getTimeString(tval.tv_sec - startTime->tv_sec),
songLenStr);
if (newTime - oldTime >= 1.0) {
kbps = (((double)(total - oldTotal)
/ (newTime - oldTime)) * 8.0) / 1000.0;
timeStamp.tv_sec = currentTime.tv_sec;
timeStamp.tv_usec = currentTime.tv_usec;
kbps = (((double)(total - oldTotal) / (newTime - oldTime)) * 8.0) / 1000.0;
timeStamp.tv_sec = tval.tv_sec;
timeStamp.tv_usec = tval.tv_usec;
oldTotal = total;
}
if (kbps < 0)
@ -966,9 +954,8 @@ streamFile(shout_t *shout, const char *fileName)
continue;
}
metadata_free(&prog_mdata);
if (vFlag > 1)
printf("%s: New metadata: ``%s''\n",
__progname, mdataStr);
printf("%s: New metadata: ``%s''\n",
__progname, mdataStr);
xfree(mdataStr);
}
}

View File

@ -1,7 +1,7 @@
#ifndef __WIN32_CONFIG_H__
#define __WIN32_CONFIG_H__
#define PACKAGE_STRING "ezstream 0.5.7"
#define PACKAGE_STRING "ezstream 0.5.6"
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1