Hi all: OK, this is one of those "why doesn't it work" type questions. I'm basically stumped. All the server info in the xml file and example.c seem to match, but it's coming back with an error 3 which is no login (as far as I can understand). There's nothing in the icecast2 logs to show that an attempt has been made. hmmm. It just occured to me that perhaps it's linking in the wrong version of libshout. I'm no C programmer so I don't know how to tell. My makefile looks like this: all: example example: example.c $(CC) -o example example.c -L../src -lshout -L../../log -logg -lvorbis The question being, is it getting libshout from ../src or from /usr/lib? Assuming that's all correct, the only thing I can think of is that either my config and example.c do not agree, and/or one contains some sort of syntax error. I include both below. A couple of other questions. I know there was some discussion as to the correct syntax for using the example program. Is it indeed `cat foo.ogg |./example` as posted on i.cantcode.com, or is this no longer correct? Also, I'm guessing that the mount has to be in the form "/foo.ogg" in order to work. Is this correct? Thanks, Geoff. My XML config: <icecast> <location>Linux-speakup.org</location> <admin>geoff@braille.uwo.ca</admin> <limits> <clients>50</clients> <sources>2</sources> <threadpool>5</threadpool> <client-timeout>15</client-timeout> </limits> <source-password>audio</source-password> <directory> <touch-freq>5</touch-freq> <server> <host>yp.icecast.org</host> <touch-freq>15</touch-freq> </server> </directory> <hostname>bumpy.braille.uwo.ca</hostname> <port>9000</port> <!--<bind-address>129.100.109.31</bind-address>--> <paths> <basedir>/usr/friends/geoff/ice2</basedir> <logdir>/usr/friends/geoff/ice2</logdir> </paths> <logging> <accesslog>access.log</accesslog> <errorlog>error.log</errorlog> </logging> </icecast> and here's example.c: #include <stdio.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <shout/shout.h> int main() { shout_conn_t conn; char buff[4096]; long read, ret, total; shout_init_connection(&conn); conn.ip = "129.100.109.31"; conn.port = 9000; conn.password = "audio"; conn.mount = "/test.ogg"; if (shout_connect(&conn)) { printf("Connected to server...\n"); total = 0; while (1) { read = fread(buff, 1, 4096, stdin); total = total + read; if (read > 0) { ret = shout_send_data(&conn, buff, read); if (!ret) { printf("DEBUG: Send error: %i...\n", conn.error); break; } } else { break; } shout_sleep(&conn); } } else { printf("Couldn't connect...%i\n", conn.error); } shout_disconnect(&conn); return 0; } ~ --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Wed, 6 Jun 2001, Michael Smith wrote:> > $(CC) -o example example.c -L../src -lshout -L../../log -logg -lvorbis > > > >The question being, is it getting libshout from ../src or from /usr/lib? > > Try linking it with an explicit library (like > gcc -o example example.c ../src/libshout.a (plus other arguments that it > needs) > > That'll at least ensure that it's statically linked with the right library, > which is enough for testing purposes.hmmmm..So you don't use -l for static libs (I really know next to nothing about this stuff). I'lll give it a shot.> Your config files look fine. Are you sure you're telling icecast to use > this file?Oh yes. If I'm sure of nothing else, I'm sure of this. Since I'm running as a user on someone else's system, it complains a lot if I don't (can't open /usr/local/icecast bla bla bla). And the XML is displayed by the server upon startup, or in my case, is written to nohup.out.> Nothing else comes to mind.Lets hope it's the libs then.> Once you get this working, you might also like to try ices2, which now > does most of what it needs to for an initial release (apart from some > more extension playlist stuff) - it works well (at least for me). It even > has an (untested) oss input module for live encoding from line-in.Cool. This is mainly to establish that the server works. I'll probably try ices on my own system, but the server needs to be where the bandwidth is. Where is ices2 living, is it icecast CVS or bitkeeper? Geoff. --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> OK, this is one of those "why doesn't it work" type questions. I'm > basically stumped.This type of feedback is good, and will help get rid of potential problems.> hmmm. It just occured to me that perhaps it's linking in the wrong version > of libshout. I'm no C programmer so I don't know how to tell. My > makefile looks like this:A quick way to tell is add some printf() to one of the libshout calls in ./src. Recompile. Run. Does it print? If not, it's finding some other version of libshout. Delete the libshout.so file from /usr/lib and recompile. It should work now. Or if you have redhat, rpm -e libshout-devel might work.> Assuming that's all correct, the only thing I can think of is that either > my config and example.c do not agree, and/or one contains some sort of > syntax error. I include both below.Try the above and let me know. jack. --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
At 06:05 PM 6/6/01 +1000, you wrote:>Hi all: > >OK, this is one of those "why doesn't it work" type questions. I'm >basically stumped. All the server info in the xml file and example.c seem >to match, but it's coming back with an error 3 which is no login (as far >as I can understand). There's nothing in the icecast2 logs to show that >an attempt has been made. > >hmmm. It just occured to me that perhaps it's linking in the wrong version >of libshout. I'm no C programmer so I don't know how to tell. My >makefile looks like this: > >all: example > >example: example.c > $(CC) -o example example.c -L../src -lshout -L../../log -logg -lvorbis > >The question being, is it getting libshout from ../src or from /usr/lib?Try linking it with an explicit library (like gcc -o example example.c ../src/libshout.a (plus other arguments that it needs) That'll at least ensure that it's statically linked with the right library, which is enough for testing purposes.> >Assuming that's all correct, the only thing I can think of is that either >my config and example.c do not agree, and/or one contains some sort of >syntax error. I include both below. > >A couple of other questions. I know there was some discussion as to the >correct syntax for using the example program. Is it indeed `cat foo.ogg >|./example` as posted on i.cantcode.com, or is this no longer correct? >Also, I'm guessing that the mount has to be in the form "/foo.ogg" in >order to work. Is this correct?Usage is correct. The mount can be whatever you want, but if it doesn't end with .ogg, many current players (xmms, winamp at least, probably others) won't play it (they try to decode it as mp3). Your config files look fine. Are you sure you're telling icecast to use this file? Nothing else comes to mind. Once you get this working, you might also like to try ices2, which now does most of what it needs to for an initial release (apart from some more extension playlist stuff) - it works well (at least for me). It even has an (untested) oss input module for live encoding from line-in. Michael --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Wed, 6 Jun 2001, Michael Smith wrote:> Try linking it with an explicit library (like > gcc -o example example.c ../src/libshout.a (plus other arguments that it > needs)I *really* don't know about this stuff. I don't have a libshout.a. I have libshout.la which it didn't recognise, and shout.lo which resulted in a host of undefined references. So I guess I don't have a static lib. So How do I compile one, and is this what I want anyway? Geoff. --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.