View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Sat Aug 11, 2007 10:43 pm Post subject: Stream next track |
|
|
hello,
i wrote my own source-client and i have a crazy problem. i stream my vorbis-files with the following code:
Code: |
if( stream_get_filebyid( &mysql, item->value, file ) == TRUE ) {
if( sprintf( trackpath, "../data/%s", file ) ) {
fd_file = fopen( trackpath, "r" );
while( item ) {
int retval = fread( buffer, 1, sizeof( buffer ), fd_file );
if( retval > 0 ) {
if( shout_send( this->shout, ( unsigned char* ) buffer, retval ) != SHOUTERR_SUCCESS )
break;
} else {
if( ( item = item->child ) == NULL ) {
if( this->repeat == TRUE )
item = playlist_get_rootitem( this->playlist );
else
break;
}
if( stream_get_filebyid( &mysql, item->value, file ) == FALSE )
break;
if( !sprintf( trackpath, "../data/%s", file ) )
break;
fd_file = freopen( trackpath, "r", fd_file );
}
shout_sync( this->shout );
}
}
} |
if the stream switches to an other track ( if the current track is at EOF ) many player ( like mplayer, rythembox, totem ) stop playing or play crazy noise. few player like vlc and xmms work fine with my stream. whats the problem? it is a bug on mplayer an the other players or is my code not ok?
blan |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Aug 11, 2007 11:18 pm Post subject: |
|
|
hard to to know 100% but the fact that icecast doesn't have a problem and you have seen at least 2 players that don't have an issue would indicate that those non-working players have some trouble with new headers.
karl. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Mon Aug 13, 2007 11:42 pm Post subject: |
|
|
okay, i have tested ezstreamer and ices2 and ezstreamer have the same problem like my application. i think the difference between these three applications is the method of send data. my application and ezstreamer use shout_send() and ices2 uses shout_send_raw(). so i have to use shout_send_raw() to solve this problem or whats your view? is there a better example application than ices2 because ices2 is very extensive as example. and what means raw - i have to send http-data too?
mfg blan |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Aug 14, 2007 12:05 am Post subject: |
|
|
The _raw function is for sending without libshout doing any verification or timing on it. For ices2, with multiple stream outputs having timing on the outgoing end was pointless, as the timing is controlled by the input engine.
Besides that, if using ices2 shows that those same players have the same problem then I don't see why changing to the _raw function will help. If the problem really is new headers then they are useless for streaming and the developers of those apps should be notified.
karl. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group subRebel style by ktauber
|