Mercurial > mplayer.hg
comparison stream/stream_cddb.c @ 31511:13ca93203358
Factorize MPlayer/MEncoder version string handling.
The string now resides in a central object file instead of
being duplicated in every file that requires a version string.
author | diego |
---|---|
date | Mon, 28 Jun 2010 08:26:14 +0000 |
parents | 80a4a25c24c5 |
children | b39155e98ac3 |
comparison
equal
deleted
inserted
replaced
31510:06d3aac894e8 | 31511:13ca93203358 |
---|---|
69 #endif | 69 #endif |
70 | 70 |
71 #include "osdep/osdep.h" | 71 #include "osdep/osdep.h" |
72 | 72 |
73 #include "cdd.h" | 73 #include "cdd.h" |
74 #include "version.h" | 74 #include "mpcommon.h" |
75 #include "stream.h" | 75 #include "stream.h" |
76 #include "network.h" | 76 #include "network.h" |
77 #include "libavutil/common.h" | 77 #include "libavutil/common.h" |
78 | 78 |
79 #define DEFAULT_FREEDB_SERVER "freedb.freedb.org" | 79 #define DEFAULT_FREEDB_SERVER "freedb.freedb.org" |
754 if (gethostname(host_name, 50) < 0) { | 754 if (gethostname(host_name, 50) < 0) { |
755 strcpy(host_name, "localhost"); | 755 strcpy(host_name, "localhost"); |
756 } | 756 } |
757 user_name = getenv("LOGNAME"); | 757 user_name = getenv("LOGNAME"); |
758 } | 758 } |
759 sprintf(cddb_data->cddb_hello, "&hello=%s+%s+%s+%s", | 759 sprintf(cddb_data->cddb_hello, "&hello=%s+%s+%s", |
760 user_name, host_name, "MPlayer", VERSION); | 760 user_name, host_name, mplayer_version); |
761 } | 761 } |
762 | 762 |
763 static int cddb_retrieve(cddb_data_t *cddb_data) | 763 static int cddb_retrieve(cddb_data_t *cddb_data) |
764 { | 764 { |
765 char offsets[1024], command[1024]; | 765 char offsets[1024], command[1024]; |