Commit beb1ae86 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* playlist.m:

  - Make sure cd/dvd's can be D&D and recognized. (cdda autodetection still fails)
  - Make sure disk names are retrieved when opening cd/dvd's
* macosx.m: Give the submodules proper descriptions.
parent 911c2d8d
...@@ -68,12 +68,13 @@ void E_(CloseVideoGL) ( vlc_object_t * ); ...@@ -68,12 +68,13 @@ void E_(CloseVideoGL) ( vlc_object_t * );
"borders (OpenGL only)." ) "borders (OpenGL only)." )
vlc_module_begin(); vlc_module_begin();
set_description( _("Mac OS X interface, sound and video") ); set_description( _("Mac OS X interface") );
set_capability( "interface", 100 ); set_capability( "interface", 100 );
set_callbacks( E_(OpenIntf), E_(CloseIntf) ); set_callbacks( E_(OpenIntf), E_(CloseIntf) );
set_category( CAT_INTERFACE ); set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_GENERAL ); set_subcategory( SUBCAT_INTERFACE_GENERAL );
add_submodule(); add_submodule();
set_description( _("Quartz video") );
set_capability( "video output", 100 ); set_capability( "video output", 100 );
set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) ); set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT, add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
...@@ -85,6 +86,7 @@ vlc_module_begin(); ...@@ -85,6 +86,7 @@ vlc_module_begin();
add_bool( "macosx-fill", 0, NULL, FILL_TEXT, FILL_LONGTEXT, add_bool( "macosx-fill", 0, NULL, FILL_TEXT, FILL_LONGTEXT,
VLC_TRUE ); VLC_TRUE );
add_submodule(); add_submodule();
set_description( _("Mac OS X OpenGL") );
set_capability( "opengl provider", 100 ); set_capability( "opengl provider", 100 );
set_callbacks( E_(OpenVideoGL), E_(CloseVideoGL) ); set_callbacks( E_(OpenVideoGL), E_(CloseVideoGL) );
vlc_module_end(); vlc_module_end();
......
...@@ -518,6 +518,29 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -518,6 +518,29 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
o_name = (NSString *)[o_one_item objectForKey: @"ITEM_NAME"]; o_name = (NSString *)[o_one_item objectForKey: @"ITEM_NAME"];
o_options = (NSArray *)[o_one_item objectForKey: @"ITEM_OPTIONS"]; o_options = (NSArray *)[o_one_item objectForKey: @"ITEM_OPTIONS"];
/* Find the name for a disc entry ( i know, can you believe the trouble?) */
if( ( !o_name || [o_name isEqualToString:@""] ) && [o_uri rangeOfString: @"/dev/"].location != NSNotFound )
{
int i_count, i_index;
struct statfs *mounts = NULL;
i_count = getmntinfo (&mounts, MNT_NOWAIT);
/* getmntinfo returns a pointer to static data. Do not free. */
for( i_index = 0 ; i_index < i_count; i_index++ )
{
NSMutableString *o_temp, *o_temp2;
o_temp = [NSMutableString stringWithString: o_uri];
o_temp2 = [NSMutableString stringWithCString: mounts[i_index].f_mntfromname];
[o_temp replaceOccurrencesOfString: @"/dev/rdisk" withString: @"/dev/disk" options:NULL range:NSMakeRange(0, [o_temp length]) ];
[o_temp2 replaceOccurrencesOfString: @"s0" withString: @"" options:NULL range:NSMakeRange(0, [o_temp2 length]) ];
[o_temp2 replaceOccurrencesOfString: @"s1" withString: @"" options:NULL range:NSMakeRange(0, [o_temp2 length]) ];
if( strstr( [o_temp fileSystemRepresentation], [o_temp2 fileSystemRepresentation] ) != NULL )
{
o_name = [[NSFileManager defaultManager] displayNameAtPath: [NSString stringWithCString:mounts[i_index].f_mntonname]];
}
}
}
/* If no name, then make a guess */ /* If no name, then make a guess */
if( !o_name) o_name = [[NSFileManager defaultManager] displayNameAtPath: o_uri]; if( !o_name) o_name = [[NSFileManager defaultManager] displayNameAtPath: o_uri];
...@@ -529,10 +552,16 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -529,10 +552,16 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* Converts mountpoint to a /dev file */ /* Converts mountpoint to a /dev file */
struct statfs *buf; struct statfs *buf;
char *psz_dev; char *psz_dev;
NSMutableString *o_temp;
buf = (struct statfs *) malloc (sizeof(struct statfs)); buf = (struct statfs *) malloc (sizeof(struct statfs));
statfs( [o_uri fileSystemRepresentation], buf ); statfs( [o_uri fileSystemRepresentation], buf );
psz_dev = strdup(buf->f_mntfromname); psz_dev = strdup(buf->f_mntfromname);
o_uri = [NSString stringWithCString: psz_dev ]; o_temp = [NSMutableString stringWithCString: psz_dev ];
[o_temp replaceOccurrencesOfString: @"/dev/disk" withString: @"/dev/rdisk" options:NULL range:NSMakeRange(0, [o_temp length]) ];
[o_temp replaceOccurrencesOfString: @"s0" withString: @"" options:NULL range:NSMakeRange(0, [o_temp length]) ];
[o_temp replaceOccurrencesOfString: @"s1" withString: @"" options:NULL range:NSMakeRange(0, [o_temp length]) ];
o_uri = o_temp;
} }
if( o_options && [o_options count] > 0 ) if( o_options && [o_options count] > 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment