Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR developer version 1.1.6
Andreas Schultz wrote:
> On Monday 05 August 2002 19:27, Klaus Schmidinger wrote:
> > Andreas Schultz wrote:
> > > ...
> > > The main problem is not the processing time or the requirement to parse
> > > and assemble frame, the problem is the time it might take to send the
> > > processed data to the device. To do it non-blocking a two stage approach
> > > is need (1st prepare a larger datablock, 2nd stuff it in small pieces
> > > into the device). You currently have excactly that implemented in
> > > cDvbPlayer. All i suggest is to move parts of that two stage process into
> > > the device class.
> > Why can't you do that in PlayVideo() as it is right now?
> > Your PlayVideo() could look something like this:
> > - if there is data to be sent to the actual device, do so until the
> > device would block
> > - if there is no more data, process the collected data to form new
> > data for the device
> so far, you're right
> > - in any case copy any amount of the offered data into you local
> > processing buffer
> the model is based on some assumtions:
> 1. data is mostly offered in larger chunks (arround 2048 bytes)
> 2. small blocks of data are rather rare
> 3. for most datablocks no collection of additional chunks is required
> when those assumtions hold, only minimal copying would be required.
> And IMHO they hold with all current player.
> > That way you would return as soon as possible, while still sending data
> > to your device in small chunks. There is no need for your device to accept
> > _any_ data in a particular call to PlayVideo(). It may well let several
> > PlayVideo() calls run by without accepting any data, but rather just
> > sending data to the hardware.
> BTW: I know that most of my proposed scheme can be implemented with the
> current API with some small tricks. I only would prefer to have a clean
> interface instead of play hide and seek with those tricks.
So basicly what you want is to process only part of the buffer that's
presented by PlayVideo(). That's already possible: simply process as
much of the block as you want, and then return the number of bytes
processed. I'm really sorry, but maybe I'm too blind to see the
"hide and seek" tricks involved with this...
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: email@example.com
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
Main Index |