[MPlayer-dev-eng] .TiVo file support

Nico Sabbi nicola_sabbi at fastwebnet.it
Thu Dec 14 22:20:39 CET 2006


Jeremy Drake wrote:
> I put my current work in the tivodecode cvs
> (http://tivodecode.cvs.sourceforge.net/tivodecode/mplayer_demuxer/).  It
> can be checked out through the normal sourceforge method.
> 
> On Wed, 13 Dec 2006, Nico Sabbi wrote:
> 
> 
>>too weak and prone to false positives
> 
> 
> Any suggestions as to what to do instead?

search at least 4 of them in not much space

> 
> 
>>>		demux_packet_t * dp = new_demux_packet (1);
>>
>>rather than resizing the packet every time, create it at least 2048 bytes long
> 
> 
> Changed to default to STREAM_BUFFER_SIZE.  This correct usage?

acceptable

> 
> 
>>>			ret = process_frame(byte, (turing_state
>>>*)(demuxer->priv), stream_tell(demuxer->stream), demuxer->stream,
>>>&mp_stream_read_wrapper, dp, &mp_packet_add_wrapper);
>>
>>why do you need stream_tell()?
> 
> 
> Just for an optional verbose message.  I changed it to not call
> stream_tell twice, but to call it for dp->pos and then pass that to this
> function.

uhm, we'll see in the final version

> 
> 
> 
>>>			else if (ret == 0)
>>>			{
>>>				mp_packet_add_wrapper(&byte, 1, dp);
>>>				ds_add_packet(ds, dp);
>>>			}
>>>		}
>>>		else
>>>		{
>>>			mp_packet_add_wrapper(&byte, 1, dp);
>>>			ds_add_packet(ds, dp);
>>>		}
> 
> 
> This seems to suck to me, adding 1-byte packets here.  I could use some
> help with an alternative, as it was giving me a headache trying to come up
> with one.

I didn't notice this 1-byte stuff. It sucks indeed.
buffer the byte read in dp->buf+dp->pos until you don't have
any more space

> 
> 
>>>		if (stream_read(demuxer->stream, &byte, 1) == 0)
>>
>>byte=stream_read_char(demuxer->stream)
> 
> 
> Changed.
> 
> 
> 
>>The rest looks pretty good
> 
> 
> Good.  Now I need some help with the seek and control functions.  They
> should be able to behave like the MPEG ones, at least at first.
> 
> 

seek() should already work with piped demuxers, but control() ones 
don't. It needs to be implemented from scratch, but you can leave them
alone for the time being

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list