[MPlayer-G2-dev] DVDnavigation (was [PATCH] ported mms from main)

Dmitry Baryshkov lumag at qnc.ru
Mon May 26 19:35:59 CEST 2003


Hello!
В ?? 26.05.2003, в 05:22, Fabian Franz пишет:
[skipped]
> >
> > i'm not sure but maybe even dvd navigation should be handled here?
> > (as it's really a stream and not a demuxer, but dunno)
> 
> hm, its both a stream and a demuxer ... perhaps it should be really BOTH ...
This was discussed (if it can be called that) in other thread, but:
IMHO how it's organized in hardware player:
1) DVD-ROM provides raw DVD stream (mostly it's MPEG stream, and
	sometimes IFO files with commands for VM).
2) VM (or even special CPU) 'navigates' - gets user events, processes
	them, executes internal commands (from IFO files). At the end,
	if produces MPEG stream, which goes to demuxer (or something
	like that) and tells demuxer, which streams (Audio/SPU) to use.
3) Demuxer - demuxes, and gives audio, video and SPU streams
	to hardware decoders/etc.

So navigation really lays between stream and demuxer.
The main question is, where it will be easier to implement.
1. In stream layer. Then there must be API to pass events to/from
	stream layer. Moreover, (when using cache2.c) to/from caching
	process! Also, there is another problem. The main part of
	cache, is precache(IIUC), which means, that navigation will
	be _ALWAYS_ ahead of playing by some seconds.
2. In separate layer between stream layer and demuxer.
	Why we must add extra layer specifically for _DVD_ navigation VM?
	(I mean, that VM's for other navigations (NUT,MOV,etc) don't
	belong to such place, do they?)
3. In demuxer layer. Suppose, it's a best choice:
Look, how dvdnav_get_next_cache_block looks (from libdvdnav) (using
metalanguage):

{
	exec_one_vm_instruction();
	if (some_conditions)
		return EVENT_HAPPENED;
	if(next_is_nav_packet)
	{
		process_it_and_store_pci_and_dsi(&pci, &dsi);
		return NAV_PACKET;
	}
	return BLOCK_OK;
}

I really suppose, that this fits to the demuxer well (moreover, if
there will be special demuxer for dvdnav, all if(dvdnav) can be
ommited):

{
	if (dvanav)
	{
		exec_one_vm)instruction();
		if (some_conditions)
			process_event();
		/*
		 * This means change outputting Audio/SPU stream,
		 * set still_frame flag, etc.
		 */
		if(next_is_nav_packet)
		{
			process_it_and_store_pci_and_dsi(&pci, &dsi);
			return MUST_REREAD;
			/*Or we can restart this function from beginning*/
		}
	}
	demux_block_as_usual();
}

[skipped]
-- 
With best wishes
Dmitry Baryshkov <lumag at qnc.ru>



More information about the MPlayer-G2-dev mailing list