Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
69da2065
Commit
69da2065
authored
Jul 18, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: vlc object handling improvements (refs #6883)
This should solve a few problems on termination.
parent
ed8f436a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
20 deletions
+24
-20
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+5
-8
modules/gui/macosx/VideoView.m
modules/gui/macosx/VideoView.m
+4
-2
modules/gui/macosx/bookmarks.m
modules/gui/macosx/bookmarks.m
+10
-1
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+5
-9
No files found.
modules/gui/macosx/MainMenu.m
View file @
69da2065
...
@@ -462,15 +462,13 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -462,15 +462,13 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
self
setupVarMenuItem
:
o_mi_visual
target
:
(
vlc_object_t
*
)
p_aout
[
self
setupVarMenuItem
:
o_mi_visual
target
:
(
vlc_object_t
*
)
p_aout
var:
"visual"
selector
:
@selector
(
toggleVar
:
)];
var:
"visual"
selector
:
@selector
(
toggleVar
:
)];
vlc_object_release
(
(
vlc_object_t
*
)
p_aout
);
vlc_object_release
(
p_aout
);
}
}
vout_thread_t
*
p_vout
=
input_GetVout
(
p_input
);
vout_thread_t
*
p_vout
=
input_GetVout
(
p_input
);
if
(
p_vout
!=
NULL
)
if
(
p_vout
!=
NULL
)
{
{
vlc_object_t
*
p_dec_obj
;
[
self
setupVarMenuItem
:
o_mi_aspect_ratio
target
:
(
vlc_object_t
*
)
p_vout
[
self
setupVarMenuItem
:
o_mi_aspect_ratio
target
:
(
vlc_object_t
*
)
p_vout
var:
"aspect-ratio"
selector
:
@selector
(
toggleVar
:
)];
var:
"aspect-ratio"
selector
:
@selector
(
toggleVar
:
)];
...
@@ -488,7 +486,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -488,7 +486,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
(
vlc_object_t
*
)
p_vout
var
:
"postprocess"
selector
:
(
vlc_object_t
*
)
p_vout
var
:
"postprocess"
selector
:
@selector
(
toggleVar
:
)];
@selector
(
toggleVar
:
)];
#endif
#endif
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
vlc_object_release
(
p_vout
);
[
self
refreshVoutDeviceMenu
:
nil
];
[
self
refreshVoutDeviceMenu
:
nil
];
[
self
setSubmenusEnabled
:
YES
];
[
self
setSubmenusEnabled
:
YES
];
...
@@ -1335,13 +1333,11 @@ static VLCMainMenu *_o_sharedInstance = nil;
...
@@ -1335,13 +1333,11 @@ static VLCMainMenu *_o_sharedInstance = nil;
if
(
p_vout
!=
NULL
)
if
(
p_vout
!=
NULL
)
{
{
if
(
[
o_title
isEqualToString
:
_NS
(
"Float on Top"
)]
)
if
(
[
o_title
isEqualToString
:
_NS
(
"Float on Top"
)]
)
{
[
o_mi
setState
:
var_GetBool
(
p_vout
,
"video-on-top"
)];
[
o_mi
setState
:
var_GetBool
(
p_vout
,
"video-on-top"
)];
}
bEnabled
=
TRUE
;
bEnabled
=
TRUE
;
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
vlc_object_release
(
p_vout
);
}
}
}
}
if
(
[
o_title
isEqualToString
:
_NS
(
"Fullscreen"
)]
)
if
(
[
o_title
isEqualToString
:
_NS
(
"Fullscreen"
)]
)
...
@@ -1403,7 +1399,8 @@ bool b_telx = p_input && var_GetInteger( p_input, "teletext-es" ) >= 0;
...
@@ -1403,7 +1399,8 @@ bool b_telx = p_input && var_GetInteger( p_input, "teletext-es" ) >= 0;
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
vlc_object_release
(
_vlc_object
);
if
(
_vlc_object
)
vlc_object_release
(
_vlc_object
);
if
(
(
i_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
if
(
(
i_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
free
(
value
.
psz_string
);
free
(
value
.
psz_string
);
free
(
psz_name
);
free
(
psz_name
);
...
...
modules/gui/macosx/VideoView.m
View file @
69da2065
...
@@ -111,7 +111,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -111,7 +111,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
-
(
void
)
closeVout
-
(
void
)
closeVout
{
{
vout_thread_t
*
p_vout
=
getVout
();
vout_thread_t
*
p_vout
=
getVout
();
if
(
!
p_vout
)
if
(
p_vout
)
{
{
var_DelCallback
(
p_vout
,
"video-device"
,
DeviceCallback
,
NULL
);
var_DelCallback
(
p_vout
,
"video-device"
,
DeviceCallback
,
NULL
);
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
...
@@ -168,10 +168,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -168,10 +168,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
val
.
i_int
|=
(
int
)
CocoaKeyToVLC
(
key
);
val
.
i_int
|=
(
int
)
CocoaKeyToVLC
(
key
);
var_Set
(
p_vout
->
p_libvlc
,
"key-pressed"
,
val
);
var_Set
(
p_vout
->
p_libvlc
,
"key-pressed"
,
val
);
}
}
vlc_object_release
(
p_vout
);
}
}
else
else
msg_Dbg
(
VLCIntf
,
"could not send keyevent to VLC core"
);
msg_Dbg
(
VLCIntf
,
"could not send keyevent to VLC core"
);
if
(
p_vout
)
vlc_object_release
(
p_vout
);
}
}
else
else
[
super
keyDown
:
o_event
];
[
super
keyDown
:
o_event
];
...
...
modules/gui/macosx/bookmarks.m
View file @
69da2065
...
@@ -73,6 +73,9 @@ static VLCBookmarks *_o_sharedInstance = nil;
...
@@ -73,6 +73,9 @@ static VLCBookmarks *_o_sharedInstance = nil;
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
if
(
p_old_input
)
vlc_object_release
(
p_old_input
);
[
super
dealloc
];
[
super
dealloc
];
}
}
...
@@ -155,9 +158,15 @@ static VLCBookmarks *_o_sharedInstance = nil;
...
@@ -155,9 +158,15 @@ static VLCBookmarks *_o_sharedInstance = nil;
int
row
;
int
row
;
row
=
[
o_tbl_dataTable
selectedRow
];
row
=
[
o_tbl_dataTable
selectedRow
];
if
(
!
p_input
&&
row
<
0
)
if
(
!
p_input
)
return
;
return
;
if
(
row
<
0
)
{
vlc_object_release
(
p_input
);
return
;
}
if
(
input_Control
(
p_input
,
INPUT_GET_BOOKMARKS
,
&
pp_bookmarks
,
if
(
input_Control
(
p_input
,
INPUT_GET_BOOKMARKS
,
&
pp_bookmarks
,
&
i_bookmarks
)
!=
VLC_SUCCESS
)
&
i_bookmarks
)
!=
VLC_SUCCESS
)
{
{
...
...
modules/gui/macosx/controls.m
View file @
69da2065
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
if
(
p_vout
!=
NULL
)
if
(
p_vout
!=
NULL
)
{
{
var_SetInteger
(
VLCIntf
->
p_libvlc
,
"key-action"
,
ACTIONID_POSITION
);
var_SetInteger
(
VLCIntf
->
p_libvlc
,
"key-action"
,
ACTIONID_POSITION
);
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
vlc_object_release
(
p_vout
);
}
}
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
}
}
...
@@ -359,14 +359,10 @@
...
@@ -359,14 +359,10 @@
/* Escape */
/* Escape */
if
(
key
==
(
unichar
)
0x1b
)
if
(
key
==
(
unichar
)
0x1b
)
{
{
vout_thread_t
*
p_vout
=
getVout
();
if
(
var_GetBool
(
p_vout
,
"fullscreen"
))
if
(
p_vout
)
{
{
if
(
var_GetBool
(
p_vout
,
"fullscreen"
))
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
{
eventHandled
=
YES
;
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
eventHandled
=
YES
;
}
}
}
}
}
else
if
(
key
==
' '
)
else
if
(
key
==
' '
)
...
@@ -374,7 +370,7 @@
...
@@ -374,7 +370,7 @@
[
self
play
:
self
];
[
self
play
:
self
];
eventHandled
=
YES
;
eventHandled
=
YES
;
}
}
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
vlc_object_release
(
p_vout
);
}
}
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
}
}
...
...
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