[MPlayer-dev-eng] .TiVo file support

Nico Sabbi nicola_sabbi at fastwebnet.it
Sun Dec 10 10:46:22 CET 2006


voroshil at gmail.com wrote:

>>It was suggested on IRC that perhaps the thing I needed to write was this:
>>rxt_: probably the easies way it the same used to handle stuff like mpeg
>>in mov or ogg in avi, that's making a tivo demuxer that sends its output
>>to the mpeg demuxer
>>
>>It was also suggested that I talk to nicodvb on this list.
>>
>>Thanks for your help, and I hope this message is somewhat sane, it is
>>mostly copied and pasted from what was said in IRC.  Please let me know if
>>there is any code around that would be a good starting place for me to
>>hack something like this together.  I do not know much of anything about
>>the internals of video software, or how to go about getting something put
>>together.  I would like to make a plugin for mplayer, whether an external
>>project or integrated in some way...
>>
> 
> I hope my knowledge will help you.
> In any case, getting serious developers (like nicodvb and others) opinions 
> will be a very good idea.
> Probably, i'm wrong and exist much simple (and/or correct) way.
> 
> 

if the output of your processing is a valid mpeg-[pt]s file than 
writing a linked demuxer is the only sane way to proceed.
It's quite easy:
in the open() function, after having assigned demuxer->video->id 
appropriately (depending on your code), add this block


{
     extern int audio_id, video_id, dvdsub_id;
     stream_t* s = new_ds_stream(demuxer->video);
     demuxer_t* od = demux_open(s, DEMUXER_TYPE_UNKNOWN,
                                audio_id, video_id, dvdsub_id, NULL);
     demuxer = new_demuxers_demuxer(od, od, od);
   }

and in the fill_buffer() function you just have to add the newly
created demux_packet() to demuxer->video with
ds_add_packet(demuxer->video, dp);

In this manner you pass real mpeg packets (audio and/or video)
to demuxer->video; you don't have to worry to initialize 
demuxer->audio in your code.
Remains to be decided if the existing demux_ty.c can be extended
to handle your streams (if not why?)

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



More information about the MPlayer-dev-eng mailing list