1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Add cfg_get_stream_format_str()

This commit is contained in:
Moritz Grimm 2015-06-02 23:45:10 +02:00
parent c396866de6
commit b0eda7b48c
3 changed files with 10 additions and 0 deletions

View File

@ -724,6 +724,12 @@ cfg_get_stream_format(void)
return (cfg.stream.format);
}
const char *
cfg_get_stream_format_str(void)
{
return (cfg_stream_fmt2str(cfg.stream.format));
}
const char *
cfg_get_stream_encoder(void)
{

View File

@ -170,6 +170,8 @@ const char *
int cfg_get_stream_server_public(void);
enum cfg_stream_format
cfg_get_stream_format(void);
const char *
cfg_get_stream_format_str(void);
const char *
cfg_get_stream_encoder(void);

View File

@ -347,6 +347,8 @@ START_TEST(test_stream_format)
ck_assert_int_eq(cfg_set_stream_format(CFG_SFMT_VORBIS, NULL), 0);
ck_assert_int_eq(cfg_get_stream_format(), CFG_STREAM_VORBIS);
ck_assert_str_eq(cfg_get_stream_format_str(),
cfg_stream_fmt2str(CFG_STREAM_VORBIS));
}
END_TEST