logo       

Re: [PATCH] Small streams and file input plugin: msg#00098

video.xine.devel

Subject: Re: [PATCH] Small streams and file input plugin

Hi xine team,
Hi Miguel,

On Po, 2003-08-04 at 05:15, Miguel Freitas wrote:
>
> we should separate demuxers that use block read into 3 categories:
>
> 1) demuxers made to work with block only devices. dvd and cdda should
> fall into that category, they cannot ask data in smaller units because
> the input plugin does not support it.
>

I agree with this category. Some demuxers have its primary input plugin.

> 2) demuxers that use block read as a convenient way to not have to
> allocate a buf when they know the size to read. in that case, if read
> fails then we probably have an invalid/incomplete file.
>

Yes, it's reasonable. Demuxers can be simpler - they test only buf == NULL.

> 3) dumb demuxers that know nothing about the stream and are using
> block_read to get something to pass to decoders. i think we only have
> mpeg_elem and mpgaudio here.
>
> i guess you are trying to fix some problem related to one of demuxers in
> (3), right?.
>

Yes, you exactly explain me the problem :-).

> ...so what do you think of reworking mpeg_elem and mpgaudio a bit so
> they don't use block read anymore? :)

Done, finally. See 'block.diff'. I send also patch for gnome_vfs, because it
should have the same behaviur on end of stream as other input plugins.

There are also problems with non-seekable inputs. In demux_mpgaudio it's send
some preview data into decoder. For non-seekable input this data aren't played
and it takes cca 4 seconds! So I recommend change constant NUM_PREVIEW_BUFFERS
from 10 to 1 (the quickest fix). Is it OK? See 'mp3preview.diff'.
demux_elem crash (SIGFPE) with non-seekable inputs, also due to preview.

> (hint: you can read up to buf->max_size on every call)
>

Good idea. I used this:

blocksize = input_plugin->get_blocksize(...);
.
.
blocksize = (blocksize ? blocksize : buf->max_size);

> regards,
>
> Miguel
>
>
>

Thanks for advices.
Frantisek





________________________________________________________________________________
Stydím se ho vytáhnout! A jaký je váš důvod vyměnit svůj telefon za nový?
Nokia 6610 již od 6577 Kč. http://www.atlas.cz/clickAD.asp?ad=34223

Attachment: block.diff
Description: block.diff

Attachment: gnome_vfs_read.diff
Description: gnome_vfs_read.diff

Attachment: mp3preview.diff
Description: mp3preview.diff

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise