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 @@
#import "bookmarks.h"
#import "intf.h"
#import "wizard.h"
#import <vlc/intf.h>
#import <vlc_interface.h>
/*****************************************************************************
* VLCExtended implementation
......@@ -171,10 +171,6 @@ static VLCBookmarks *_o_sharedInstance = nil;
VLC_OBJECT_INPUT, FIND_ANYWHERE );
seekpoint_t **pp_bookmarks;
int i_bookmarks;
char * toBeReturned;
toBeReturned = "";
int i_toBeReturned;
i_toBeReturned = 0;
int row;
row = [o_tbl_dataTable selectedRow];
......@@ -346,7 +342,7 @@ static VLCBookmarks *_o_sharedInstance = nil;
to: [[NSNumber numberWithInt:
(pp_bookmarks[i_second]->i_time_offset/1000000)] stringValue]
ofItem: [NSString stringWithUTF8String:
p_input->input.p_item->psz_uri]];
input_GetItem(p_input)->psz_uri]];
vlc_object_release( p_input );
msg_Dbg(p_intf, "released input");
}
......@@ -436,10 +432,8 @@ static VLCBookmarks *_o_sharedInstance = nil;
VLC_OBJECT_INPUT, FIND_ANYWHERE );
seekpoint_t **pp_bookmarks;
int i_bookmarks;
char * toBeReturned;
toBeReturned = "";
int i_toBeReturned;
i_toBeReturned = 0;
char *toBeReturned;
int i_toBeReturned = 0;
if( !p_input )
{
......
......@@ -39,10 +39,9 @@
#import "extended.h"
#import "intf.h"
#import "vout.h"
#import <vlc/aout.h>
#import <aout_internal.h>
#import <vlc/vout.h>
#import <vlc/intf.h>
#import <vlc_aout.h>
#import <vlc_vout.h>
#import <vlc_interface.h>
/*****************************************************************************
* VLCExtended implementation
......
......@@ -296,7 +296,6 @@
id view = [super initWithFrame:frameRect];
fillColor = [[NSColor clearColor] retain];
NSRect s_rc = [self frame];
NSImage * image;
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_play, @"fs_play" , @"fs_play_highlight" , 267, 10, play );
......
......@@ -43,7 +43,7 @@
#include "playlist.h"
#include "open.h"
#include "output.h"
#import <vlc/intf.h>
#import <vlc_interface.h>
/*****************************************************************************
* GetEjectableMediaOfClass
......
......@@ -242,7 +242,6 @@ NSLog( @"expandable" );
- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)o_tc byItem:(id)item
{
id o_value = nil;
intf_thread_t *p_intf = VLCIntf;
playlist_item_t *p_item;
if( item == nil || ![item isKindOfClass: [NSValue class]] ) return( @"error" );
......@@ -380,7 +379,7 @@ NSLog( @"expandable" );
while( p_parser->pp_shortcuts[++i] != NULL ); i--;
/* 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 );
/* Create the menu entries used in the playlist menu */
......
......@@ -22,7 +22,7 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <vlc_interface.h>
#import <vlc/vlc.h>
@interface VLCsFilters : NSObject
{
......
......@@ -31,7 +31,7 @@
#import "sfilters.h"
#import "intf.h"
#import <vlc/vout.h>
#import <vlc_vout.h>
/* TODO:
- check for memory leaks
......@@ -298,13 +298,24 @@ static VLCsFilters *_o_sharedInstance = nil;
psz_subfilters = config_GetPsz( p_intf, "sub-filter" );
if( psz_subfilters )
{
[o_marq_enabled_ckb setState: (bool)strstr( psz_subfilters, "marq")];
[o_logo_enabled_ckb setState: (bool)strstr( psz_subfilters, "logo")];
[o_time_enabled_ckb setState: (bool)strstr( psz_subfilters, "time")];
if( strstr( psz_subfilters, "marq") )
[o_marq_enabled_ckb setState: YES];
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 enableLogo];
[self enableTime];
[self enableMarq];
[self enableLogo];
[self enableTime];
}
- (IBAction)logo_selectFile:(id)sender
......@@ -344,7 +355,7 @@ static VLCsFilters *_o_sharedInstance = nil;
{
if( [[o_marq_marq_fld stringValue] length] == 0 )
{
val.psz_string = "";
val.psz_string = (char *)"";
}
else
{
......@@ -414,7 +425,7 @@ static VLCsFilters *_o_sharedInstance = nil;
{
if( [[o_time_stamp_fld stringValue] length] == 0 )
{
val.psz_string = "";
val.psz_string = (char *)"";
}
else
{
......@@ -508,11 +519,11 @@ static VLCsFilters *_o_sharedInstance = nil;
{
if( [o_marq_enabled_ckb state] == NSOnState )
{
[self changeFiltersString:"marq" onOrOff:VLC_TRUE];
[self changeFiltersString:(char *)"marq" onOrOff:VLC_TRUE];
}
else
{
[self changeFiltersString:"marq" onOrOff:VLC_FALSE];
[self changeFiltersString:(char *)"marq" onOrOff:VLC_FALSE];
}
[self enableMarq];
}
......@@ -520,11 +531,11 @@ static VLCsFilters *_o_sharedInstance = nil;
{
if( [o_logo_enabled_ckb state] == NSOnState )
{
[self changeFiltersString:"logo" onOrOff:VLC_TRUE];
[self changeFiltersString:(char *)"logo" onOrOff:VLC_TRUE];
}
else
{
[self changeFiltersString:"logo" onOrOff:VLC_FALSE];
[self changeFiltersString:(char *)"logo" onOrOff:VLC_FALSE];
}
[self enableLogo];
}
......@@ -532,11 +543,11 @@ static VLCsFilters *_o_sharedInstance = nil;
{
if( [o_time_enabled_ckb state] == NSOnState )
{
[self changeFiltersString:"time" onOrOff:VLC_TRUE];
[self changeFiltersString:(char *)"time" onOrOff:VLC_TRUE];
}
else
{
[self changeFiltersString:"time" onOrOff:VLC_FALSE];
[self changeFiltersString:(char *)"time" onOrOff:VLC_FALSE];
}
[self enableTime];
}
......
......@@ -273,17 +273,19 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return;
}
if( p_input->input.p_item->psz_name != NULL )
if( input_GetItem(p_input)->psz_name != NULL )
o_title = [NSMutableString stringWithUTF8String:
p_input->input.p_item->psz_name];
if( p_input->input.p_item->psz_uri != NULL )
input_GetItem(p_input)->psz_name];
if( input_GetItem(p_input)->psz_uri != NULL )
o_mrl = [NSMutableString stringWithUTF8String:
p_input->input.p_item->psz_uri];
input_GetItem(p_input)->psz_uri];
if( o_title == nil )
o_title = o_mrl;
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" ) )
{
NSRange prefix_range = [o_mrl rangeOfString: @"file:"];
......@@ -291,6 +293,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[o_mrl deleteCharactersInRange: prefix_range];
[o_window setRepresentedFilename: o_mrl];
}
#endif
[o_window setTitle: o_title];
}
else
......
......@@ -148,7 +148,7 @@
NSArray * o_strmgMthds;
NSString * o_opts;
BOOL * keepSettingsOrNot;
BOOL b_keepSettingsOrNot;
}
- (IBAction)cancelRun:(id)sender;
- (IBAction)nextTab:(id)sender;
......
......@@ -33,9 +33,8 @@
*****************************************************************************/
#import "wizard.h"
#import "intf.h"
#import "network.h"
#import "playlist.h"
#import <vlc/intf.h>
#import <vlc_interface.h>
/*****************************************************************************
* VLCWizard implementation
......@@ -306,7 +305,7 @@ static VLCWizard *_o_sharedInstance = nil;
- (void)resetWizard
{
/* 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 */
[o_userSelections removeAllObjects];
......@@ -314,7 +313,7 @@ static VLCWizard *_o_sharedInstance = nil;
[o_tab_pageHolder selectFirstTabViewItem:self];
if( keepSettingsOrNot )
if( b_keepSettingsOrNot )
return;
/* reset the wizard-window to its default values if wanted */
......@@ -1198,10 +1197,10 @@ static VLCWizard *_o_sharedInstance = nil;
/* check whether the extension is hidden or not.
* if not, remove it
* we need the casting to make GCC4 happy */
if( (int)[[[NSFileManager defaultManager] fileAttributesAtPath: \
if( [[[NSFileManager defaultManager] fileAttributesAtPath: \
[[o_userSelections objectForKey:@"pathToStrm"] \
objectAtIndex: x] traverseLink: NO] objectForKey: \
NSFileExtensionHidden] == YES )
NSFileExtensionHidden] )
fileNameToUse = [NSString stringWithString:
[[NSFileManager defaultManager] displayNameAtPath:
[[o_userSelections objectForKey:@"pathToStrm"]
......@@ -1321,7 +1320,7 @@ static VLCWizard *_o_sharedInstance = nil;
{
/* play the first item and add the others afterwards */
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 );
}
......@@ -1348,7 +1347,7 @@ static VLCWizard *_o_sharedInstance = nil;
objectAtIndex:0]];
x += 1;
}
if( keepSettingsOrNot && savePreviousSel >= 0 )
if( b_keepSettingsOrNot && savePreviousSel >= 0 )
[o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel];
savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem];
......@@ -1360,7 +1359,7 @@ static VLCWizard *_o_sharedInstance = nil;
objectAtIndex:0]];
x += 1;
}
if( keepSettingsOrNot && savePreviousSel >= 0 )
if( b_keepSettingsOrNot && savePreviousSel >= 0 )
[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