[xiph-cvs] cvs commit: icecast/src admin.c format.h format_mp3.c format_vorbis.c
Karl Heyes
karl at xiph.org
Thu Feb 26 02:39:56 PST 2004
karl 04/02/26 05:39:56
Modified: src admin.c format.h format_mp3.c format_vorbis.c
Log:
revert previous patch, mike didn't want it...
Revision Changes Path
1.27 +11 -8 icecast/src/admin.c
Index: admin.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/admin.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- admin.c 25 Feb 2004 21:43:52 -0000 1.26
+++ admin.c 26 Feb 2004 10:39:56 -0000 1.27
@@ -34,6 +34,7 @@
#include "xslt.h"
#include "format.h"
+#include "format_mp3.h"
#include "logging.h"
#ifdef _WIN32
@@ -641,7 +642,7 @@
{
char *action;
char *value;
- format_plugin_t *format;
+ mp3_state *state;
#ifdef USE_YP
int i;
time_t current_time;
@@ -652,8 +653,7 @@
COMMAND_REQUIRE(client, "mode", action);
COMMAND_REQUIRE(client, "song", value);
- format = source->format;
- if (format->type != FORMAT_TYPE_MP3)
+ if (source->format->type != FORMAT_TYPE_MP3)
{
client_send_400 (client, "Not mp3, cannot update metadata");
return;
@@ -664,11 +664,14 @@
client_send_400 (client, "No such action");
return;
}
- if (format->set_tag)
- {
- if (value)
- format->set_tag (format, "title", value);
- }
+
+ state = source->format->_state;
+
+ thread_mutex_lock(&(state->lock));
+ free(state->metadata);
+ state->metadata = strdup(value);
+ state->metadata_age++;
+ thread_mutex_unlock(&(state->lock));
DEBUG2("Metadata on mountpoint %s changed to \"%s\"",
source->mount, value);
<p><p>1.16 +0 -1 icecast/src/format.h
Index: format.h
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/format.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- format.h 25 Feb 2004 20:23:07 -0000 1.15
+++ format.h 26 Feb 2004 10:39:56 -0000 1.16
@@ -54,7 +54,6 @@
struct source_tag *source, client_t *client);
void (*client_send_headers)(struct _format_plugin_tag *format,
struct source_tag *source, client_t *client);
- void (*set_tag)(struct _format_plugin_tag *plugin, char *tag, char *value);
void (*free_plugin)(struct _format_plugin_tag *self);
/* for internal state management */
<p><p>1.34 +0 -14 icecast/src/format_mp3.c
Index: format_mp3.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/format_mp3.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- format_mp3.c 25 Feb 2004 20:23:07 -0000 1.33
+++ format_mp3.c 26 Feb 2004 10:39:56 -0000 1.34
@@ -63,7 +63,6 @@
client_t *client, unsigned char *buf, int len);
static void format_mp3_send_headers(format_plugin_t *self,
source_t *source, client_t *client);
-static void mp3_set_tag (format_plugin_t *plugin, char *tag, char *value);
typedef struct {
int use_metadata;
@@ -89,7 +88,6 @@
plugin->create_client_data = format_mp3_create_client_data;
plugin->client_send_headers = format_mp3_send_headers;
plugin->free_plugin = format_mp3_free_plugin;
- plugin->set_tag = mp3_set_tag;
plugin->format_description = "MP3 audio";
plugin->_state = state;
@@ -106,18 +104,6 @@
}
-static void mp3_set_tag (format_plugin_t *plugin, char *tag, char *value)
-{
- mp3_state *state = plugin->_state;
-
- thread_mutex_lock(&(state->lock));
- free(state->metadata);
- state->metadata = strdup(value);
- state->metadata_age++;
- thread_mutex_unlock(&(state->lock));
-}
-
-
static int send_metadata(client_t *client, mp3_client_data *client_state,
mp3_state *source_state)
{
<p><p>1.19 +0 -1 icecast/src/format_vorbis.c
Index: format_vorbis.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/format_vorbis.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- format_vorbis.c 25 Feb 2004 20:23:07 -0000 1.18
+++ format_vorbis.c 26 Feb 2004 10:39:56 -0000 1.19
@@ -77,7 +77,6 @@
plugin->create_client_data = format_vorbis_create_client_data;
plugin->client_send_headers = format_vorbis_send_headers;
plugin->free_plugin = format_vorbis_free_plugin;
- plugin->set_tag = NULL;
plugin->format_description = "Ogg Vorbis";
state = (vstate_t *)calloc(1, sizeof(vstate_t));
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list