Commit 7614e4ee authored by Felix Paul Kühne's avatar Felix Paul Kühne

* the remaining compilation fixes plus a bit of clean up here and there....

* the remaining compilation fixes plus a bit of clean up here and there. vout.m needs further fixing and everything needs quite some testing
parent 45e123dc
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#import "bookmarks.h" #import "bookmarks.h"
#import "intf.h" #import "intf.h"
#import "wizard.h" #import "wizard.h"
#import <vlc/intf.h> #import <vlc_interface.h>
/***************************************************************************** /*****************************************************************************
* VLCExtended implementation * VLCExtended implementation
...@@ -171,10 +171,6 @@ static VLCBookmarks *_o_sharedInstance = nil; ...@@ -171,10 +171,6 @@ static VLCBookmarks *_o_sharedInstance = nil;
VLC_OBJECT_INPUT, FIND_ANYWHERE ); VLC_OBJECT_INPUT, FIND_ANYWHERE );
seekpoint_t **pp_bookmarks; seekpoint_t **pp_bookmarks;
int i_bookmarks; int i_bookmarks;
char * toBeReturned;
toBeReturned = "";
int i_toBeReturned;
i_toBeReturned = 0;
int row; int row;
row = [o_tbl_dataTable selectedRow]; row = [o_tbl_dataTable selectedRow];
...@@ -346,7 +342,7 @@ static VLCBookmarks *_o_sharedInstance = nil; ...@@ -346,7 +342,7 @@ static VLCBookmarks *_o_sharedInstance = nil;
to: [[NSNumber numberWithInt: to: [[NSNumber numberWithInt:
(pp_bookmarks[i_second]->i_time_offset/1000000)] stringValue] (pp_bookmarks[i_second]->i_time_offset/1000000)] stringValue]
ofItem: [NSString stringWithUTF8String: ofItem: [NSString stringWithUTF8String:
p_input->input.p_item->psz_uri]]; input_GetItem(p_input)->psz_uri]];
vlc_object_release( p_input ); vlc_object_release( p_input );
msg_Dbg(p_intf, "released input"); msg_Dbg(p_intf, "released input");
} }
...@@ -436,10 +432,8 @@ static VLCBookmarks *_o_sharedInstance = nil; ...@@ -436,10 +432,8 @@ static VLCBookmarks *_o_sharedInstance = nil;
VLC_OBJECT_INPUT, FIND_ANYWHERE ); VLC_OBJECT_INPUT, FIND_ANYWHERE );
seekpoint_t **pp_bookmarks; seekpoint_t **pp_bookmarks;
int i_bookmarks; int i_bookmarks;
char * toBeReturned; char *toBeReturned;
toBeReturned = ""; int i_toBeReturned = 0;
int i_toBeReturned;
i_toBeReturned = 0;
if( !p_input ) if( !p_input )
{ {
......
...@@ -39,10 +39,9 @@ ...@@ -39,10 +39,9 @@
#import "extended.h" #import "extended.h"
#import "intf.h" #import "intf.h"
#import "vout.h" #import "vout.h"
#import <vlc/aout.h> #import <vlc_aout.h>
#import <aout_internal.h> #import <vlc_vout.h>
#import <vlc/vout.h> #import <vlc_interface.h>
#import <vlc/intf.h>
/***************************************************************************** /*****************************************************************************
* VLCExtended implementation * VLCExtended implementation
......
...@@ -296,7 +296,6 @@ ...@@ -296,7 +296,6 @@
id view = [super initWithFrame:frameRect]; id view = [super initWithFrame:frameRect];
fillColor = [[NSColor clearColor] retain]; fillColor = [[NSColor clearColor] retain];
NSRect s_rc = [self frame]; NSRect s_rc = [self frame];
NSImage * image;
addButton( o_prev, @"fs_skip_previous" , @"fs_skip_previous_highlight", 174, 15, prev ); addButton( o_prev, @"fs_skip_previous" , @"fs_skip_previous_highlight", 174, 15, prev );
addButton( o_slow, @"fs_rewind" , @"fs_rewind_highlight" , 211, 14, slower ); addButton( o_slow, @"fs_rewind" , @"fs_rewind_highlight" , 211, 14, slower );
addButton( o_play, @"fs_play" , @"fs_play_highlight" , 267, 10, play ); addButton( o_play, @"fs_play" , @"fs_play_highlight" , 267, 10, play );
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "playlist.h" #include "playlist.h"
#include "open.h" #include "open.h"
#include "output.h" #include "output.h"
#import <vlc/intf.h> #import <vlc_interface.h>
/***************************************************************************** /*****************************************************************************
* GetEjectableMediaOfClass * GetEjectableMediaOfClass
......
...@@ -242,7 +242,6 @@ NSLog( @"expandable" ); ...@@ -242,7 +242,6 @@ NSLog( @"expandable" );
- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)o_tc byItem:(id)item - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)o_tc byItem:(id)item
{ {
id o_value = nil; id o_value = nil;
intf_thread_t *p_intf = VLCIntf;
playlist_item_t *p_item; playlist_item_t *p_item;
if( item == nil || ![item isKindOfClass: [NSValue class]] ) return( @"error" ); if( item == nil || ![item isKindOfClass: [NSValue class]] ) return( @"error" );
...@@ -380,7 +379,7 @@ NSLog( @"expandable" ); ...@@ -380,7 +379,7 @@ NSLog( @"expandable" );
while( p_parser->pp_shortcuts[++i] != NULL ); i--; while( p_parser->pp_shortcuts[++i] != NULL ); i--;
/* Check whether to enable these menuitems */ /* Check whether to enable these menuitems */
objectname = i>=0 ? p_parser->pp_shortcuts[i] : p_parser->psz_object_name; objectname = i>=0 ? (char *)p_parser->pp_shortcuts[i] : (char *)p_parser->psz_object_name;
b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, objectname ); b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, objectname );
/* Create the menu entries used in the playlist menu */ /* Create the menu entries used in the playlist menu */
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <vlc_interface.h> #import <vlc/vlc.h>
@interface VLCsFilters : NSObject @interface VLCsFilters : NSObject
{ {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#import "sfilters.h" #import "sfilters.h"
#import "intf.h" #import "intf.h"
#import <vlc/vout.h> #import <vlc_vout.h>
/* TODO: /* TODO:
- check for memory leaks - check for memory leaks
...@@ -298,13 +298,24 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -298,13 +298,24 @@ static VLCsFilters *_o_sharedInstance = nil;
psz_subfilters = config_GetPsz( p_intf, "sub-filter" ); psz_subfilters = config_GetPsz( p_intf, "sub-filter" );
if( psz_subfilters ) if( psz_subfilters )
{ {
[o_marq_enabled_ckb setState: (bool)strstr( psz_subfilters, "marq")]; if( strstr( psz_subfilters, "marq") )
[o_logo_enabled_ckb setState: (bool)strstr( psz_subfilters, "logo")]; [o_marq_enabled_ckb setState: YES];
[o_time_enabled_ckb setState: (bool)strstr( psz_subfilters, "time")]; else
[o_marq_enabled_ckb setState: NO];
if( strstr( psz_subfilters, "logo") )
[o_logo_enabled_ckb setState: YES];
else
[o_logo_enabled_ckb setState: NO];
if( strstr( psz_subfilters, "time") )
[o_time_enabled_ckb setState: YES];
else
[o_time_enabled_ckb setState: NO];
} }
[self enableMarq]; [self enableMarq];
[self enableLogo]; [self enableLogo];
[self enableTime]; [self enableTime];
} }
- (IBAction)logo_selectFile:(id)sender - (IBAction)logo_selectFile:(id)sender
...@@ -344,7 +355,7 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -344,7 +355,7 @@ static VLCsFilters *_o_sharedInstance = nil;
{ {
if( [[o_marq_marq_fld stringValue] length] == 0 ) if( [[o_marq_marq_fld stringValue] length] == 0 )
{ {
val.psz_string = ""; val.psz_string = (char *)"";
} }
else else
{ {
...@@ -414,7 +425,7 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -414,7 +425,7 @@ static VLCsFilters *_o_sharedInstance = nil;
{ {
if( [[o_time_stamp_fld stringValue] length] == 0 ) if( [[o_time_stamp_fld stringValue] length] == 0 )
{ {
val.psz_string = ""; val.psz_string = (char *)"";
} }
else else
{ {
...@@ -508,11 +519,11 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -508,11 +519,11 @@ static VLCsFilters *_o_sharedInstance = nil;
{ {
if( [o_marq_enabled_ckb state] == NSOnState ) if( [o_marq_enabled_ckb state] == NSOnState )
{ {
[self changeFiltersString:"marq" onOrOff:VLC_TRUE]; [self changeFiltersString:(char *)"marq" onOrOff:VLC_TRUE];
} }
else else
{ {
[self changeFiltersString:"marq" onOrOff:VLC_FALSE]; [self changeFiltersString:(char *)"marq" onOrOff:VLC_FALSE];
} }
[self enableMarq]; [self enableMarq];
} }
...@@ -520,11 +531,11 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -520,11 +531,11 @@ static VLCsFilters *_o_sharedInstance = nil;
{ {
if( [o_logo_enabled_ckb state] == NSOnState ) if( [o_logo_enabled_ckb state] == NSOnState )
{ {
[self changeFiltersString:"logo" onOrOff:VLC_TRUE]; [self changeFiltersString:(char *)"logo" onOrOff:VLC_TRUE];
} }
else else
{ {
[self changeFiltersString:"logo" onOrOff:VLC_FALSE]; [self changeFiltersString:(char *)"logo" onOrOff:VLC_FALSE];
} }
[self enableLogo]; [self enableLogo];
} }
...@@ -532,11 +543,11 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -532,11 +543,11 @@ static VLCsFilters *_o_sharedInstance = nil;
{ {
if( [o_time_enabled_ckb state] == NSOnState ) if( [o_time_enabled_ckb state] == NSOnState )
{ {
[self changeFiltersString:"time" onOrOff:VLC_TRUE]; [self changeFiltersString:(char *)"time" onOrOff:VLC_TRUE];
} }
else else
{ {
[self changeFiltersString:"time" onOrOff:VLC_FALSE]; [self changeFiltersString:(char *)"time" onOrOff:VLC_FALSE];
} }
[self enableTime]; [self enableTime];
} }
......
...@@ -273,17 +273,19 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -273,17 +273,19 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return; return;
} }
if( p_input->input.p_item->psz_name != NULL ) if( input_GetItem(p_input)->psz_name != NULL )
o_title = [NSMutableString stringWithUTF8String: o_title = [NSMutableString stringWithUTF8String:
p_input->input.p_item->psz_name]; input_GetItem(p_input)->psz_name];
if( p_input->input.p_item->psz_uri != NULL ) if( input_GetItem(p_input)->psz_uri != NULL )
o_mrl = [NSMutableString stringWithUTF8String: o_mrl = [NSMutableString stringWithUTF8String:
p_input->input.p_item->psz_uri]; input_GetItem(p_input)->psz_uri];
if( o_title == nil ) if( o_title == nil )
o_title = o_mrl; o_title = o_mrl;
if( o_mrl != nil ) if( o_mrl != nil )
{ {
/* FIXME once psz_access is exported, since that syntax is no longer valid */
#if 0
if( p_input->input.p_access && !strcmp( p_input->input.p_access->p_module->psz_shortname, "File" ) ) if( p_input->input.p_access && !strcmp( p_input->input.p_access->p_module->psz_shortname, "File" ) )
{ {
NSRange prefix_range = [o_mrl rangeOfString: @"file:"]; NSRange prefix_range = [o_mrl rangeOfString: @"file:"];
...@@ -291,6 +293,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -291,6 +293,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[o_mrl deleteCharactersInRange: prefix_range]; [o_mrl deleteCharactersInRange: prefix_range];
[o_window setRepresentedFilename: o_mrl]; [o_window setRepresentedFilename: o_mrl];
} }
#endif
[o_window setTitle: o_title]; [o_window setTitle: o_title];
} }
else else
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
NSArray * o_strmgMthds; NSArray * o_strmgMthds;
NSString * o_opts; NSString * o_opts;
BOOL * keepSettingsOrNot; BOOL b_keepSettingsOrNot;
} }
- (IBAction)cancelRun:(id)sender; - (IBAction)cancelRun:(id)sender;
- (IBAction)nextTab:(id)sender; - (IBAction)nextTab:(id)sender;
......
...@@ -33,9 +33,8 @@ ...@@ -33,9 +33,8 @@
*****************************************************************************/ *****************************************************************************/
#import "wizard.h" #import "wizard.h"
#import "intf.h" #import "intf.h"
#import "network.h"
#import "playlist.h" #import "playlist.h"
#import <vlc/intf.h> #import <vlc_interface.h>
/***************************************************************************** /*****************************************************************************
* VLCWizard implementation * VLCWizard implementation
...@@ -306,7 +305,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -306,7 +305,7 @@ static VLCWizard *_o_sharedInstance = nil;
- (void)resetWizard - (void)resetWizard
{ {
/* get the current state of our setting to keep the selections or not */ /* get the current state of our setting to keep the selections or not */
keepSettingsOrNot = (BOOL *)config_GetInt( VLCIntf, "macosx-wizard-keep" ); b_keepSettingsOrNot = (BOOL)config_GetInt( VLCIntf, "macosx-wizard-keep" );
/* go to the front page and clean up a bit */ /* go to the front page and clean up a bit */
[o_userSelections removeAllObjects]; [o_userSelections removeAllObjects];
...@@ -314,7 +313,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -314,7 +313,7 @@ static VLCWizard *_o_sharedInstance = nil;
[o_tab_pageHolder selectFirstTabViewItem:self]; [o_tab_pageHolder selectFirstTabViewItem:self];
if( keepSettingsOrNot ) if( b_keepSettingsOrNot )
return; return;
/* reset the wizard-window to its default values if wanted */ /* reset the wizard-window to its default values if wanted */
...@@ -1198,10 +1197,10 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1198,10 +1197,10 @@ static VLCWizard *_o_sharedInstance = nil;
/* check whether the extension is hidden or not. /* check whether the extension is hidden or not.
* if not, remove it * if not, remove it
* we need the casting to make GCC4 happy */ * we need the casting to make GCC4 happy */
if( (int)[[[NSFileManager defaultManager] fileAttributesAtPath: \ if( [[[NSFileManager defaultManager] fileAttributesAtPath: \
[[o_userSelections objectForKey:@"pathToStrm"] \ [[o_userSelections objectForKey:@"pathToStrm"] \
objectAtIndex: x] traverseLink: NO] objectForKey: \ objectAtIndex: x] traverseLink: NO] objectForKey: \
NSFileExtensionHidden] == YES ) NSFileExtensionHidden] )
fileNameToUse = [NSString stringWithString: fileNameToUse = [NSString stringWithString:
[[NSFileManager defaultManager] displayNameAtPath: [[NSFileManager defaultManager] displayNameAtPath:
[[o_userSelections objectForKey:@"pathToStrm"] [[o_userSelections objectForKey:@"pathToStrm"]
...@@ -1321,7 +1320,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1321,7 +1320,7 @@ static VLCWizard *_o_sharedInstance = nil;
{ {
/* play the first item and add the others afterwards */ /* play the first item and add the others afterwards */
playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE ); playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE );
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, NULL, playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, NULL,
p_item ); p_item );
} }
...@@ -1348,7 +1347,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1348,7 +1347,7 @@ static VLCWizard *_o_sharedInstance = nil;
objectAtIndex:0]]; objectAtIndex:0]];
x += 1; x += 1;
} }
if( keepSettingsOrNot && savePreviousSel >= 0 ) if( b_keepSettingsOrNot && savePreviousSel >= 0 )
[o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel]; [o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel];
savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem]; savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem];
...@@ -1360,7 +1359,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1360,7 +1359,7 @@ static VLCWizard *_o_sharedInstance = nil;
objectAtIndex:0]]; objectAtIndex:0]];
x += 1; x += 1;
} }
if( keepSettingsOrNot && savePreviousSel >= 0 ) if( b_keepSettingsOrNot && savePreviousSel >= 0 )
[o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel]; [o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel];
} }
......
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