diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 01:46:46 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 01:50:55 +0200 |
commit | e74708f6194ef0af2bdf37e857ed232027fa46ba (patch) | |
tree | f7b53476abeb1cc8ccbe1c49113e9722c51b7800 /stream/stream_cddb.c | |
parent | 2ad00b5319603b22f9b0858bb14d016f673157cb (diff) | |
parent | cb8796857c8bd851e3b97d729af149e3f003b851 (diff) | |
download | mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.bz2 mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.xz |
Merge svn changes up to r30748
Diffstat (limited to 'stream/stream_cddb.c')
-rw-r--r-- | stream/stream_cddb.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index c83acfb633..d6fe4f1881 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -81,12 +81,10 @@ #define DEFAULT_FREEDB_SERVER "freedb.freedb.org" #define DEFAULT_CACHE_DIR "/.cddb/" -stream_t* open_cdda(char *dev, char *track); - static cd_toc_t cdtoc[100]; static int cdtoc_last_track; -int read_toc(const char *dev) +static int read_toc(const char *dev) { int first = 0, last = -1; int i; @@ -255,7 +253,7 @@ int cdd_identify(const char *dev) return cdtoc_last_track; } -unsigned int cddb_sum(int n) +static unsigned int cddb_sum(int n) { unsigned int ret; @@ -267,7 +265,7 @@ unsigned int cddb_sum(int n) return ret; } -unsigned long cddb_discid(int tot_trks) +static unsigned long cddb_discid(int tot_trks) { unsigned int i, t = 0, n = 0; @@ -283,7 +281,7 @@ unsigned long cddb_discid(int tot_trks) -int cddb_http_request(char *command, +static int cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*, cddb_data_t*), cddb_data_t *cddb_data) { @@ -338,7 +336,7 @@ int cddb_http_request(char *command, return ret; } -int cddb_read_cache(cddb_data_t *cddb_data) +static int cddb_read_cache(cddb_data_t *cddb_data) { char file_name[100]; struct stat stats; @@ -383,7 +381,7 @@ int cddb_read_cache(cddb_data_t *cddb_data) return 0; } -int cddb_write_cache(cddb_data_t *cddb_data) +static int cddb_write_cache(cddb_data_t *cddb_data) { // We have the file, save it for cache. struct stat file_stat; @@ -436,7 +434,7 @@ int cddb_write_cache(cddb_data_t *cddb_data) return 0; } -int cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) +static int cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { unsigned long disc_id; char category[100]; @@ -495,7 +493,7 @@ int cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) return 0; } -int cddb_request_titles(cddb_data_t *cddb_data) +static int cddb_request_titles(cddb_data_t *cddb_data) { char command[1024]; sprintf(command, "cddb+read+%s+%08lx", @@ -503,7 +501,7 @@ int cddb_request_titles(cddb_data_t *cddb_data) return cddb_http_request(command, cddb_read_parse, cddb_data); } -int cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) +static int cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { char album_title[100]; char *ptr = NULL; @@ -541,7 +539,7 @@ int cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) return 0; } -int cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) +static int cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { char album_title[100]; char *ptr = NULL; @@ -607,7 +605,7 @@ blues c711930d Santana / Supernatural return -1; } -int cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) +static int cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { int max; int ret, status; @@ -639,12 +637,12 @@ int cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) return -1; } -int cddb_get_proto_level(cddb_data_t *cddb_data) +static int cddb_get_proto_level(cddb_data_t *cddb_data) { return cddb_http_request("stat", cddb_proto_level_parse, cddb_data); } -int cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) +static int cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { int ret, status; @@ -668,12 +666,12 @@ int cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) return -1; } -int cddb_get_freedb_sites(cddb_data_t *cddb_data) +static int cddb_get_freedb_sites(cddb_data_t *cddb_data) { return cddb_http_request("sites", cddb_freedb_sites_parse, cddb_data); } -void cddb_create_hello(cddb_data_t *cddb_data) +static void cddb_create_hello(cddb_data_t *cddb_data) { char host_name[51]; char *user_name; @@ -696,7 +694,7 @@ void cddb_create_hello(cddb_data_t *cddb_data) user_name, host_name, "MPlayer", VERSION); } -int cddb_retrieve(cddb_data_t *cddb_data) +static int cddb_retrieve(cddb_data_t *cddb_data) { char offsets[1024], command[1024]; char *ptr; @@ -804,7 +802,7 @@ int cddb_resolve(const char *dev, char **xmcd_file) /*************** * xmcd parser * ***************/ -char *xmcd_parse_dtitle(cd_info_t *cd_info, char *line) +static char *xmcd_parse_dtitle(cd_info_t *cd_info, char *line) { char *ptr, *album; ptr = strstr(line, "DTITLE="); @@ -829,7 +827,7 @@ char *xmcd_parse_dtitle(cd_info_t *cd_info, char *line) return ptr; } -char *xmcd_parse_dgenre(cd_info_t *cd_info, char *line) +static char *xmcd_parse_dgenre(cd_info_t *cd_info, char *line) { char *ptr; ptr = strstr(line, "DGENRE="); @@ -844,7 +842,7 @@ char *xmcd_parse_dgenre(cd_info_t *cd_info, char *line) return ptr; } -char *xmcd_parse_ttitle(cd_info_t *cd_info, char *line) +static char *xmcd_parse_ttitle(cd_info_t *cd_info, char *line) { unsigned int track_nb; unsigned long sec, off; |