[MPlayer-dev-eng] [PATCH] Apple Remote support

? ? ulion2002 at msn.com
Sat Aug 11 02:22:39 CEST 2007


>
> > --- input/ar.c	(revision 0)
> > +++ input/ar.c	(revision 0)
> > @@ -0,0 +1,283 @@
> > +
> > +#include <math.h>
> > +#include <sysexits.h>
> > +#include <IOKit/IOCFPlugIn.h>
> > +#include <IOKit/hid/IOHIDLib.h>
>
>New files should have a proper license header.
all other files in the same directory 'input' has no license header, so I 
don't known what kind of license header should be use, can you give me a 
guide?

>
> > +static int FindHIDDevices(mach_port_t masterPort, io_iterator_t 
>*hidObjectIterator)
> > +{
> > +    CFMutableDictionaryRef hidMatchDictionary = NULL;
> > +    IOReturn ioReturnValue = kIOReturnSuccess;
> > +
> > +    // Set up a matching dictionary to search the I/O Registry by class
> > +	// name for all HID class devices
> > +	hidMatchDictionary = IOServiceMatching("AppleIRController");
> > +
> > + 	// Now search I/O Registry for matching devices.
> > + 	ioReturnValue = IOServiceGetMatchingServices(masterPort, 
>hidMatchDictionary, hidObjectIterator);
> > +
> > +	//If search is unsuccessful, print message and hang.
> > +	if ((ioReturnValue != kIOReturnSuccess) | (*hidObjectIterator == 
>NULL)) {
> > +		return -1;
> > +	}
> > +	return 0;
> > +}
>
>Mixed tabs and spaces.  I prefer spaces.
since original author of this file ar.c (first post is here: 
http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-July/053076.html ) 
almost all use tabs in the source except this little part, I will fix this 
all into tabs, I think it's also acceptable.

>
> > --- input/ar.h	(revision 0)
> > +++ input/ar.h	(revision 0)
> > @@ -0,0 +1,21 @@
> > +
> > +#ifndef __INPUT_AR_H_
> > +#define __INPUT_AR_H_
>
>same here, no license header
>
> > --- input/Makefile	(revision 24045)
> > +++ input/Makefile	(working copy)
> > @@ -2,8 +2,9 @@
> >
> > -SRCS_MPLAYER              = input.c
> > -SRCS_MPLAYER-$(JOYSTICK) += joystick.c
> > -SRCS_MPLAYER-$(LIRC)     += lirc.c
> > +SRCS_MPLAYER                  = input.c
> > +SRCS_MPLAYER-$(JOYSTICK)     += joystick.c
> > +SRCS_MPLAYER-$(LIRC)         += lirc.c
> > +SRCS_MPLAYER-$(APPLE_REMOTE) += ar.c
>
>cosmetics
it's for align to the right equal, all spaces, should I remove it?

above are my questions, other format stuff I will fix them, thank you.





More information about the MPlayer-dev-eng mailing list