Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
102
Issues
102
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
b7fbcef1
Commit
b7fbcef1
authored
Feb 26, 2004
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert previous patch, mike didn't want it...
svn path=/trunk/icecast/; revision=5866
parent
450d4484
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
24 deletions
+11
-24
src/admin.c
src/admin.c
+11
-8
src/format.h
src/format.h
+0
-1
src/format_mp3.c
src/format_mp3.c
+0
-14
src/format_vorbis.c
src/format_vorbis.c
+0
-1
No files found.
src/admin.c
View file @
b7fbcef1
...
...
@@ -34,6 +34,7 @@
#include "xslt.h"
#include "format.h"
#include "format_mp3.h"
#include "logging.h"
#ifdef _WIN32
...
...
@@ -641,7 +642,7 @@ static void command_metadata(client_t *client, source_t *source)
{
char
*
action
;
char
*
value
;
format_plugin_t
*
format
;
mp3_state
*
state
;
#ifdef USE_YP
int
i
;
time_t
current_time
;
...
...
@@ -652,8 +653,7 @@ static void command_metadata(client_t *client, source_t *source)
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 @@ static void command_metadata(client_t *client, source_t *source)
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
);
...
...
src/format.h
View file @
b7fbcef1
...
...
@@ -54,7 +54,6 @@ typedef struct _format_plugin_tag
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 */
...
...
src/format_mp3.c
View file @
b7fbcef1
...
...
@@ -63,7 +63,6 @@ static int format_mp3_write_buf_to_client(format_plugin_t *self,
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 @@ format_plugin_t *format_mp3_get_plugin(http_parser_t *parser)
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 @@ format_plugin_t *format_mp3_get_plugin(http_parser_t *parser)
}
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
)
{
...
...
src/format_vorbis.c
View file @
b7fbcef1
...
...
@@ -77,7 +77,6 @@ format_plugin_t *format_vorbis_get_plugin(void)
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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment