[vlc-devel] [PATCH] Basic MTP Support

Rafaël Carré funman at videolan.org
Sat Mar 29 03:05:21 CET 2008

Hash: SHA1

Le Thu, 27 Mar 2008 23:23:58 +0000,
"Fabio Ritrovato" <exsephiroth87 at gmail.com> a écrit :

> Ok, i've edited the patch with the suggestions from funman, and added
> configure.ac and modules.am (now with no random changes xD)
> The only thing left as it was is the device addiction...
> I thought about that, and i think that maybe the best way to manage
> that is using HAL, so for now i left things as they were, and in
> future maybe I'll add that thing...
> The patch is a brand new one, it's not to be applied after the old
> one...

For the configure.ac diff you should write default enabled, and use
MSG_ERR if the module was explicitely asked: 
if test "${enable_mtp}" = "yes"

About the access, please remove file-cat option
Also, use spaces instead of tabs

Instead of using getenv(HOME) you should use vlc custom functions to
retrieve the home dir (look in include/vlc_configuration.h)
You should remove b_stdin completely
If you copy file per file, you don't have to check if your target is a
You should also be sure that your file is a regular file
+		msg_Err( p_access, "Error deleting file %s, errno:
%d...", p_sys
You can use %m in msg_Err expressions, which will be replaced by a
human readable error message (strerror())

In AddTrack, instead of malloc() / sprintf() you can use asprintf()

Also what happens if someone has 2 MTP devices connected when he launch
the mtp services discovery ?

Thanks, and sorry for being late to comment your patch

- -- 
Rafaël Carré
Version: GnuPG v2.0.8 (FreeBSD)


More information about the vlc-devel mailing list