[MPlayer-dev-eng] Synchronization of players in LAN

J.A. Gutierrez spd at shiva.cps.unizar.es
Fri Nov 28 09:00:33 CET 2003


On Thu, Nov 27, 2003 at 10:13:24AM +0100, Arpi wrote:

> 
> of course. it never used system clocks for syncro, when audio is
> available, video is synced to soundcard's timer only.
> system clock is used only for nosound case.
> 

	I don't need to use sound by now...


	I have some questions:


	* Why "total_frame_cnt" is incremented only when there is audio
	to play?

	* I'm trying to enable frame dropping just before
	"decode_video" module, so I calculate the difference
	current_time_usage - expected_time_usage; where

	current_time_usage=GetTimer();
	expected_time_usage =
                total_time_start +
                total_frame_cnt * ( 1000000 / sh_video->fps );
	
	total_time_start is the result of GetTimer() at the start of
	"PAY AUDIO" code.

	(I have moved the "++total_frame_cnt" outside the "audio" block;
	and, yes, this is not right when users pauses mplayer, but I don't
	need pauses)


	If the difference is greater than a frame; I set

	drop_frame=frame_dropping;
	frame_time_remaining=0;
	++drop_frame_cnt;
	++dropped_frames;

	and whith this code, when some of the players is late, it
	just stop at that frame forever; so I'm missing something.
	(I do use -framedrop and -nosound switches in mplayer invocation)


-- 
finger spd at shiva.cps.unizar.es for PGP      /
.mailcap tip of the day:                   /             La vida es una carcel
application/ms-tnef; cat '%s' > /dev/null /           con las puertas abiertas
text/x-vcard; cat '%s' > /dev/null       /            (A. Calamaro)



More information about the MPlayer-dev-eng mailing list