[Live-devel] Problem with socket buffer or not ?

balr0g at poczta.onet.pl balr0g at poczta.onet.pl
Thu Oct 19 03:00:04 PDT 2006


An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20061019/c021a046/attachment.html 
-------------- next part --------------
I've restructured code, as you said, but the problem hasn't disapeared. :(.
I'm still losing frames. Mayby you have some other idea?

 

>>while(1)
>>{
>> event = 0;
>> readSource->getNextFrame( buffer, buffer_size, StreamRead,
>>state, StreamClose, state);
>> env->taskScheduler().doEventLoop(&(event));
>>}
>>...
>>static void StreamRead(void *data, unsigned int i_size,
>> unsigned int i_truncated_bytes, struct timeval pts,
>> unsigned int duration)
>>{
>> env << i_size;
>> event = 0xff;
>>}
>
>This code is very strange, and might be the cause of your problems
>(although I'm not certain of this). Note that you don't need to call
>"doEventLoop()" within a loop, because it already *is* a loop.
>Instead, restructure your code as:
>
>readSource->getNextFrame( buffer, buffer_size, StreamRead, state,
>StreamClose, state);
>doEventLoop();
>...
>static void StreamRead(void *data, unsigned int i_size,
> unsigned int i_truncated_bytes, struct timeval pts,
> unsigned int duration)
>{
> env << i_size;
> readSource->getNextFrame( buffer, buffer_size, StreamRead, state,
>StreamClose, state);
>}
>--
>
>Ross Finlayson
>Live Networks, Inc.
>http://www.live555.com/
>_______________________________________________


More information about the live-devel mailing list