[xiph-cvs] cvs commit: libshout/examples example.c
Michael Smith
msmith at xiph.org
Sun Dec 29 00:48:08 PST 2002
msmith 02/12/29 03:48:08
Modified: examples example.c
Log:
Patch for example code from Pedro Corte-Real (typo at netcabo.pt)
Revision Changes Path
1.3 +21 -2 libshout/examples/example.c
Index: example.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/examples/example.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- example.c 23 Jan 2002 03:08:38 -0000 1.2
+++ example.c 29 Dec 2002 08:48:08 -0000 1.3
@@ -21,7 +21,17 @@
printf("Error setting hostname: %s\n", shout_get_error(shout));
return 1;
}
- shout_set_port(shout, 8000);
+
+ if (shout_set_protocol(shout, SHOUT_PROTOCOL_HTTP) != SHOUTERR_SUCCESS) {
+ printf("Error setting protocol: %s\n", shout_get_error(shout));
+ return 1;
+ }
+
+ if (shout_set_port(shout, 8000) != SHOUTERR_SUCCESS) {
+ printf("Error setting port: %s\n", shout_get_error(shout));
+ return 1;
+ }
+
if (shout_set_password(shout, "hackme") != SHOUTERR_SUCCESS) {
printf("Error setting password: %s\n", shout_get_error(shout));
return 1;
@@ -30,7 +40,16 @@
printf("Error setting mount: %s\n", shout_get_error(shout));
return 1;
}
- shout_set_format(shout, SHOUT_FORMAT_MP3);
+
+ if (shout_set_user(shout, "source") != SHOUTERR_SUCCESS) {
+ printf("Error setting user: %s\n", shout_get_error(shout));
+ return 1;
+ }
+
+ if (shout_set_format(shout, SHOUT_FORMAT_VORBIS) != SHOUTERR_SUCCESS) {
+ printf("Error setting user: %s\n", shout_get_error(shout));
+ return 1;
+ }
if (shout_open(shout) == SHOUTERR_SUCCESS) {
printf("Connected to server...\n");
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list