[MPlayer-dev-eng] streaming, rtp

Bertrand Baudet bertrand_baudet at yahoo.com
Mon Dec 24 17:47:54 CET 2001


On Sunday 23 December 2001 02:06 pm, you wrote:
> Hi,
>
> just merged an old patch for RTP support.
> i had to chaneg some things....

I was waiting to add quicktime support before merging this
patch. quicktime networking will share the same code and I wanted
to see how I could have share the code.
Nevermind, I will that later :p

> and run into this:
>
> int
> nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t
> *stream_ctr        int len=0;
> //printf("nop_streaming_read\n");
>         if( stream_ctrl->buffer_size!=0 ) {
>                 int buffer_len =
> stream_ctrl->buffer_size-stream_ctrl->buffer_poprintf("%d bytes in
> buffer\n", stream_ctrl->buffer_size);
>                 len = (size<buffer_len)?size:buffer_len;
>                 memcpy( buffer,
> (stream_ctrl->buffer)+(stream_ctrl->buffer_pos),
>
> ...
>
>         stream->streaming_ctrl->streaming_read = nop_streaming_read;
>         stream->streaming_ctrl->streaming_seek = nop_streaming_seek;
>         stream->streaming_ctrl->prebuffer_size = 180000;
> //      stream->streaming_ctrl->prebuffer_size = 0;
>         stream->streaming_ctrl->buffering = 1;
> //      stream->streaming_ctrl->buffering = 0;
>         stream->streaming_ctrl->status = streaming_playing_e;
>
> so, it seems it uses some kind of hidden buffering.
> is it neccessary ? why?
> or is it obsolete, just forgot to remove?

Yes, this is the a small buffer. I the case of an HTTP request the response 
can I some case contain a body that is the beginning of the stream.
I'm saving this part in a buffer and the first read will retreive it.
BTW I should removed the buffering variable since it's not used anymore.
For the prebuffering variable, I don't know! I think I should keep it and add
something to tell cache2 to prebuffer the size I set. It usefull in the case 
of ASF that provide the prebuffer "size" (in fact it's the time to bufferize
before playing)

> cache2 should do that, and it does.

If you can point me out how to push some data into the buffer of  cache2, I 
will change this.

Bertrand

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the MPlayer-dev-eng mailing list