Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
e467f6e3
Commit
e467f6e3
authored
Jun 17, 2018
by
Philipp Schafft
🦁
Browse files
Cleanup: Make use of "icecasttypes.h" in format*.[ch]
parent
65f5eb97
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/format.h
View file @
e467f6e3
...
...
@@ -20,13 +20,11 @@
#include
<vorbis/codec.h>
#include
"icecasttypes.h"
#include
"client.h"
#include
"refbuf.h"
#include
"common/httpp/httpp.h"
struct
source_tag
;
struct
_mount_proxy
;
typedef
enum
_format_type_tag
{
FORMAT_ERROR
,
/* No format, source not processable */
...
...
@@ -47,13 +45,13 @@ typedef struct _format_plugin_tag
uint64_t
read_bytes
;
uint64_t
sent_bytes
;
refbuf_t
*
(
*
get_buffer
)(
struct
source_t
ag
*
);
refbuf_t
*
(
*
get_buffer
)(
source_t
*
);
int
(
*
write_buf_to_client
)(
client_t
*
client
);
void
(
*
write_buf_to_file
)(
struct
source_t
ag
*
source
,
refbuf_t
*
refbuf
);
int
(
*
create_client_data
)(
struct
source_t
ag
*
source
,
client_t
*
client
);
void
(
*
write_buf_to_file
)(
source_t
*
source
,
refbuf_t
*
refbuf
);
int
(
*
create_client_data
)(
source_t
*
source
,
client_t
*
client
);
void
(
*
set_tag
)(
struct
_format_plugin_tag
*
plugin
,
const
char
*
tag
,
const
char
*
value
,
const
char
*
charset
);
void
(
*
free_plugin
)(
struct
_format_plugin_tag
*
self
);
void
(
*
apply_settings
)(
client_t
*
client
,
struct
_format_plugin_tag
*
format
,
struct
_
mount_proxy
*
mount
);
void
(
*
apply_settings
)(
client_t
*
client
,
struct
_format_plugin_tag
*
format
,
mount_proxy
*
mount
);
/* meta data */
vorbis_comment
vc
;
...
...
@@ -64,16 +62,16 @@ typedef struct _format_plugin_tag
format_type_t
format_get_type
(
const
char
*
contenttype
);
char
*
format_get_mimetype
(
format_type_t
type
);
int
format_get_plugin
(
format_type_t
type
,
struct
source_t
ag
*
source
);
int
format_get_plugin
(
format_type_t
type
,
source_t
*
source
);
int
format_generic_write_to_client
(
client_t
*
client
);
int
format_advance_queue
(
struct
source_t
ag
*
source
,
client_t
*
client
);
int
format_check_http_buffer
(
struct
source_t
ag
*
source
,
client_t
*
client
);
int
format_check_file_buffer
(
struct
source_t
ag
*
source
,
client_t
*
client
);
int
format_advance_queue
(
source_t
*
source
,
client_t
*
client
);
int
format_check_http_buffer
(
source_t
*
source
,
client_t
*
client
);
int
format_check_file_buffer
(
source_t
*
source
,
client_t
*
client
);
void
format_send_general_headers
(
format_plugin_t
*
format
,
struct
source_t
ag
*
source
,
client_t
*
client
);
source_t
*
source
,
client_t
*
client
);
void
format_set_vorbiscomment
(
format_plugin_t
*
plugin
,
const
char
*
tag
,
const
char
*
value
);
...
...
src/format_mp3.c
View file @
e467f6e3
...
...
@@ -55,7 +55,7 @@ static refbuf_t *mp3_get_no_meta (source_t *source);
static
int
format_mp3_create_client_data
(
source_t
*
source
,
client_t
*
client
);
static
void
free_mp3_client_data
(
client_t
*
client
);
static
int
format_mp3_write_buf_to_client
(
client_t
*
client
);
static
void
write_mp3_to_file
(
struct
source_t
ag
*
source
,
refbuf_t
*
refbuf
);
static
void
write_mp3_to_file
(
source_t
*
source
,
refbuf_t
*
refbuf
);
static
void
mp3_set_tag
(
format_plugin_t
*
plugin
,
const
char
*
tag
,
const
char
*
in_value
,
const
char
*
charset
);
static
void
format_mp3_apply_settings
(
client_t
*
client
,
format_plugin_t
*
format
,
mount_proxy
*
mount
);
...
...
@@ -715,7 +715,7 @@ static void free_mp3_client_data (client_t *client)
}
static
void
write_mp3_to_file
(
struct
source_t
ag
*
source
,
refbuf_t
*
refbuf
)
static
void
write_mp3_to_file
(
source_t
*
source
,
refbuf_t
*
refbuf
)
{
if
(
refbuf
->
len
==
0
)
return
;
...
...
src/format_ogg.c
View file @
e467f6e3
...
...
@@ -60,7 +60,7 @@ static void format_ogg_free_plugin(format_plugin_t *plugin);
static
int
create_ogg_client_data
(
source_t
*
source
,
client_t
*
client
);
static
void
free_ogg_client_data
(
client_t
*
client
);
static
void
write_ogg_to_file
(
struct
source_t
ag
*
source
,
refbuf_t
*
refbuf
);
static
void
write_ogg_to_file
(
source_t
*
source
,
refbuf_t
*
refbuf
);
static
refbuf_t
*
ogg_get_buffer
(
source_t
*
source
);
static
int
write_buf_to_client
(
client_t
*
client
);
...
...
@@ -563,7 +563,7 @@ static int write_buf_to_client(client_t *client)
}
static
int
write_ogg_data
(
struct
source_t
ag
*
source
,
refbuf_t
*
refbuf
)
static
int
write_ogg_data
(
source_t
*
source
,
refbuf_t
*
refbuf
)
{
int
ret
=
1
;
...
...
@@ -578,7 +578,7 @@ static int write_ogg_data (struct source_tag *source, refbuf_t *refbuf)
}
static
void
write_ogg_to_file
(
struct
source_t
ag
*
source
,
refbuf_t
*
refbuf
)
static
void
write_ogg_to_file
(
source_t
*
source
,
refbuf_t
*
refbuf
)
{
ogg_state_t
*
ogg_info
=
source
->
format
->
_state
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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