[MPlayer-dev-eng] [PATCH] Network synchronized playback using UDP

Diego Biurrun diego at biurrun.de
Fri Apr 10 14:44:00 CEST 2009


On Thu, Apr 09, 2009 at 06:45:38PM -0700, Jason Holt wrote:
> On Wed, Apr 8, 2009 at 5:03 AM, Diego Biurrun <diego at biurrun.de> wrote:
> 
> > On Tue, Apr 07, 2009 at 11:13:16AM -0700, Jason Holt wrote:
> > > I also fixed a little bug in the configure script example at the top.
> >
> > Such things need to be different patches.  Never mind now, I extracted
> > and applied it.
> 
> Thanks.  I think you missed the "fi":

No, I applied it already, dunno what's wrong on your side.

> --- DOCS/man/en/mplayer.1	(revision 29160)
> +++ DOCS/man/en/mplayer.1	(working copy)
> @@ -1149,8 +1149,40 @@
>  The normal framerate of the movie is kept, so playback is accelerated.
>  Since MPlayer can only seek to the next keyframe this may be inexact.
>  .
> +.TP
> +.B \-udp\-master
> +The \-udp\-* options allow multiple instances of mplayer to synchronize playback
> +over a network.

MPlayer and just describe -udp-master.

> +.TP
> +.B \-udp\-slave
> +If \-udp\-slave is given, mplayer listens on \-udp\-port and matches the master's
> +position.

You are speaking about -udp-slave, no need to repeat that, same in other
places.

> +.B \-udp\-ip <ip>
> +Sets the destination address for datagrams sent by the \-udp\-master.
> +Setting -udp-ip to a broadcast address allows multiple slaves having the same

missing \-escapes

> --- mplayer.c	(revision 29160)
> +++ mplayer.c	(working copy)
> @@ -679,8 +696,14 @@
>  
> +void send_udp(char *send_to_ip, int port, char *mesg);

This is ugly, please just reorder the functions sensibly.

Also, I wonder if this has to be in mplayer.c, which is already big
enough.

> @@ -743,6 +766,168 @@
>  
> +  sendto(sockfd,
> +         mesg,
> +         strlen(mesg),
> +         0,
> +         (struct sockaddr *) &socketinfo,
> +         sizeof(socketinfo));

This is ugly.

> +void udp_slave_sync() {

(void)

Diego



More information about the MPlayer-dev-eng mailing list