Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
f940d5e2
Commit
f940d5e2
authored
Jul 31, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed playlist/video toggling and some memory leaks
parent
ae7db4e9
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
106 additions
and
96 deletions
+106
-96
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
...acosx/Resources/English.lproj/MainMenu.nib/designable.nib
+76
-66
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
...osx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+1
-1
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+1
-1
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+3
-13
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+4
-4
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+21
-11
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
View file @
f940d5e2
This diff is collapsed.
Click to expand it.
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
View file @
f940d5e2
No preview for this file type
modules/gui/macosx/MainMenu.m
View file @
f940d5e2
...
...
@@ -327,7 +327,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
o_mi_minimize
setTitle
:
_NS
(
"Minimize Window"
)];
[
o_mi_close_window
setTitle
:
_NS
(
"Close Window"
)];
[
o_mi_player
setTitle
:
_NS
(
"Player..."
)];
[
o_mi_controller
setTitle
:
_NS
(
"
Controller
..."
)];
[
o_mi_controller
setTitle
:
_NS
(
"
Main Window
..."
)];
[
o_mi_audioeffects
setTitle
:
_NS
(
"Audio Effects..."
)];
[
o_mi_videoeffects
setTitle
:
_NS
(
"Video Filters..."
)];
[
o_mi_bookmarks
setTitle
:
_NS
(
"Bookmarks..."
)];
...
...
modules/gui/macosx/MainWindow.h
View file @
f940d5e2
...
...
@@ -98,7 +98,7 @@
-
(
IBAction
)
fullscreen
:(
id
)
sender
;
-
(
id
)
videoView
;
-
(
void
)
setVideoplayEnabled
:(
BOOL
)
b_value
;
-
(
void
)
setVideoplayEnabled
;
-
(
void
)
updateTimeSlider
;
-
(
void
)
updateVolumeSlider
;
-
(
void
)
updateWindow
;
...
...
modules/gui/macosx/MainWindow.m
View file @
f940d5e2
...
...
@@ -304,8 +304,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
IBAction
)
togglePlaylist
:(
id
)
sender
{
NSLog
(
@"b_videoplayen %i"
,
b_video_playback_enabled
);
if
(
b_video_playback_enabled
&&
[
o_video_view
isHidden
])
{
if
([
o_video_view
isHidden
]
&&
[
o_playlist_btn
isEnabled
])
{
[
o_video_view
setHidden
:
NO
];
[
o_playlist_table
setHidden
:
YES
];
}
...
...
@@ -669,18 +668,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
return
o_video_view
;
}
-
(
void
)
setVideoplayEnabled
:(
BOOL
)
b_value
-
(
void
)
setVideoplayEnabled
{
NSLog
(
@"setVideoplayEnabled:%i"
,
b_value
);
if
(
b_value
)
{
b_video_playback_enabled
=
YES
;
[
o_playlist_btn
setEnabled
:
YES
];
}
else
{
b_video_playback_enabled
=
NO
;
[
o_playlist_btn
setEnabled
:
NO
];
}
[
o_playlist_btn
setEnabled
:
[[
VLCMain
sharedInstance
]
activeVideoPlayback
]];
}
@end
...
...
modules/gui/macosx/intf.h
View file @
f940d5e2
...
...
@@ -93,7 +93,7 @@ struct intf_sys_t
id
o_wizard
;
/* VLCWizard */
id
o_embedded_list
;
/* VLCEmbeddedList*/
id
o_coredialogs
;
/* VLCCoreDialogProvider */
VLCInformation
*
o_info
;
/* VLCInformation */
id
o_info
;
/* VLCInformation */
id
o_eyetv
;
/* VLCEyeTVController */
id
o_bookmarks
;
/* VLCBookmarks */
id
o_coreinteraction
;
/* VLCCoreInteraction */
...
...
@@ -105,6 +105,7 @@ struct intf_sys_t
BOOL
nib_info_loaded
;
/* information panel nibfile */
BOOL
nib_coredialogs_loaded
;
/* CoreDialogs nibfile */
BOOL
nib_bookmarks_loaded
;
/* Bookmarks nibfile */
BOOL
b_active_videoplayback
;
IBOutlet
id
o_mainwindow
;
/* VLCMainWindow */
...
...
@@ -163,6 +164,8 @@ struct intf_sys_t
-
(
id
)
coreDialogProvider
;
-
(
id
)
eyeTVController
;
-
(
id
)
appleRemoteController
;
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
;
-
(
BOOL
)
activeVideoPlayback
;
-
(
void
)
applicationWillTerminate
:(
NSNotification
*
)
notification
;
-
(
NSString
*
)
localizedString
:(
const
char
*
)
psz
;
-
(
char
*
)
delocalizeString
:(
NSString
*
)
psz
;
...
...
@@ -186,8 +189,6 @@ struct intf_sys_t
-
(
void
)
updateMessageDisplay
;
-
(
IBAction
)
showController
:(
id
)
sender
;
-
(
IBAction
)
crashReporterAction
:(
id
)
sender
;
-
(
IBAction
)
openCrashLog
:(
id
)
sender
;
-
(
IBAction
)
saveDebugLog
:(
id
)
sender
;
...
...
@@ -195,7 +196,6 @@ struct intf_sys_t
-
(
void
)
processReceivedlibvlcMessage
:(
const
msg_item_t
*
)
item
;
-
(
IBAction
)
togglePlaylist
:(
id
)
sender
;
-
(
void
)
updateTogglePlaylistState
;
-
(
void
)
windowDidBecomeKey
:(
NSNotification
*
)
o_notification
;
...
...
modules/gui/macosx/intf.m
View file @
f940d5e2
...
...
@@ -145,8 +145,7 @@ int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
return
VLC_EGENERIC
;
}
[[
VLCMainWindow
sharedInstance
]
setVideoplayEnabled
:
YES
];
[[
VLCMainWindow
sharedInstance
]
togglePlaylist
:
nil
];
[[
VLCMain
sharedInstance
]
setActiveVideoPlayback
:
YES
];
p_wnd
->
control
=
WindowControl
;
p_wnd
->
sys
=
(
vout_window_sys_t
*
)
VLCIntf
;
[
o_pool
release
];
...
...
@@ -170,7 +169,7 @@ static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
void
WindowClose
(
vout_window_t
*
p_wnd
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCMain
Window
sharedInstance
]
setVideoplayEnabled
:
NO
];
[[
VLCMain
sharedInstance
]
setActiveVideoPlayback
:
NO
];
NSLog
(
@"Window Close"
);
// tell the interface to get rid of the video, TODO
[
o_pool
release
];
...
...
@@ -234,6 +233,7 @@ static void MsgCallback( msg_cb_data_t *data, const msg_item_t *item )
static
int
InputEvent
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
switch
(
new_val
.
i_int
)
{
case
INPUT_EVENT_STATE
:
[[
VLCMain
sharedInstance
]
playbackStatusUpdated
];
...
...
@@ -301,38 +301,47 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
break
;
}
[
o_pool
release
];
return
VLC_SUCCESS
;
}
static
int
PLItemChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
PlaylistItemChanged
)
withObject
:
nil
waitUntilDone
:
NO
];
[
o_pool
release
];
return
VLC_SUCCESS
;
}
static
int
PlaylistUpdated
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
playlistUpdated
)
withObject
:
nil
waitUntilDone
:
NO
];
[
o_pool
release
];
return
VLC_SUCCESS
;
}
static
int
PlaybackModeUpdated
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCMain
sharedInstance
]
playbackModeUpdated
];
[
o_pool
release
];
return
VLC_SUCCESS
;
}
static
int
VolumeUpdated
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCMain
sharedInstance
]
updateVolume
];
[
o_pool
release
];
return
VLC_SUCCESS
;
}
...
...
@@ -1459,10 +1468,16 @@ unsigned int CocoaKeyToVLC( unichar i_key )
return
o_remote
;
}
-
(
IBAction
)
showController
:(
id
)
sender
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
{
b_active_videoplayback
=
b_value
;
[
o_mainwindow
setVideoplayEnabled
];
[
o_mainwindow
togglePlaylist
:
nil
];
}
-
(
BOOL
)
activeVideoPlayback
{
//FIXME: why is this function here?!
[
o_mainwindow
makeKeyAndOrderFront
:
sender
];
return
b_active_videoplayback
;
}
#pragma mark -
...
...
@@ -1755,11 +1770,6 @@ unsigned int CocoaKeyToVLC( unichar i_key )
#pragma mark -
#pragma mark Playlist toggling
-
(
IBAction
)
togglePlaylist
:(
id
)
sender
{
NSLog
(
@"needs to be re-implemented"
);
}
-
(
void
)
updateTogglePlaylistState
{
[[
self
playlist
]
outlineViewSelectionDidChange
:
NULL
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment