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
0cdef305
Commit
0cdef305
authored
Aug 09, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: re-implemented VLCVoutView and removed dead or outdated code
parent
e3a1b511
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
201 additions
and
1033 deletions
+201
-1033
extras/contrib/contrib.mak
extras/contrib/contrib.mak
+0
-2
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
...acosx/Resources/English.lproj/MainMenu.nib/designable.nib
+27
-8
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
...osx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.h
+0
-1
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+0
-26
modules/gui/macosx/MainMenu.h
modules/gui/macosx/MainMenu.h
+1
-0
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+7
-4
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+2
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+6
-2
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+7
-17
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/embeddedwindow.m
+4
-0
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+11
-4
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+9
-4
modules/gui/macosx/vout.h
modules/gui/macosx/vout.h
+8
-102
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+119
-863
No files found.
extras/contrib/contrib.mak
View file @
0cdef305
...
...
@@ -70,10 +70,8 @@ contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2:
(
cd
build-src
&&
rm
-rf
*
gecko
*
&&
$(MAKE)
.gecko
)
# libiconv.la is no longer present on Snow Leopard, so fix possible references to it, which would
# result in linking issues
ifdef
HAVE_MACOSX_DARWIN_10
(cd
$(PREFIX)/lib
&&
sed
-e
's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g'
-i.orig
*.la
&&
rm
-f
*.la.orig)
(cd
build-src
&&
rm
-f
.iconv
&&
$(MAKE)
.iconv-from-os)
endif
touch
.$(CONTRIBREV)
using-bin
:
.$(CONTRIBREV)
...
...
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
View file @
0cdef305
...
...
@@ -2,9 +2,9 @@
<archive
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"7.10"
>
<data>
<int
key=
"IBDocument.SystemTarget"
>
1040
</int>
<string
key=
"IBDocument.SystemVersion"
>
11
C26
</string>
<string
key=
"IBDocument.SystemVersion"
>
11
A511
</string>
<string
key=
"IBDocument.InterfaceBuilderVersion"
>
851
</string>
<string
key=
"IBDocument.AppKitVersion"
>
1138
.11
</string>
<string
key=
"IBDocument.AppKitVersion"
>
1138
</string>
<string
key=
"IBDocument.HIToolboxVersion"
>
566.00
</string>
<object
class=
"NSMutableDictionary"
key=
"IBDocument.PluginVersions"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
@@ -21,14 +21,14 @@
</object>
<object
class=
"NSMutableArray"
key=
"IBDocument.EditedObjectIDs"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<integer
value=
"1617"
/>
<integer
value=
"2730"
/>
<integer
value=
"4682"
/>
<integer
value=
"4596"
/>
<integer
value=
"915"
/>
<integer
value=
"
334
"
/>
<integer
value=
"2
83
"
/>
<integer
value=
"
1617
"
/>
<integer
value=
"2
730
"
/>
<integer
value=
"4722"
/>
<integer
value=
"283"
/>
<integer
value=
"2"
/>
<integer
value=
"334"
/>
</object>
<object
class=
"NSArray"
key=
"IBDocument.PluginDependencies"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
@@ -1217,7 +1217,7 @@
<bool
key=
"CIEnabled"
>
YES
</bool>
</object>
<int
key=
"NSViewLayerContentsRedrawPolicy"
>
2
</int>
<string
key=
"NSClassName"
>
NS
View
</string>
<string
key=
"NSClassName"
>
VLCVout
View
</string>
</object>
</object>
<string
key=
"NSFrameSize"
>
{604, 310}
</string>
...
...
@@ -16238,6 +16238,25 @@ LCAuLi4</string>
<string
key=
"superclassName"
>
NSView
</string>
<reference
key=
"sourceIdentifier"
ref=
"736371707"
/>
</object>
<object
class=
"IBPartialClassDescription"
>
<string
key=
"className"
>
VLCVoutView
</string>
<string
key=
"superclassName"
>
NSView
</string>
<object
class=
"NSMutableDictionary"
key=
"outlets"
>
<string
key=
"NS.key.0"
>
o_window
</string>
<string
key=
"NS.object.0"
>
id
</string>
</object>
<object
class=
"NSMutableDictionary"
key=
"toOneOutletInfosByName"
>
<string
key=
"NS.key.0"
>
o_window
</string>
<object
class=
"IBToOneOutletInfo"
key=
"NS.object.0"
>
<string
key=
"name"
>
o_window
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
</object>
<object
class=
"IBClassDescriptionSource"
key=
"sourceIdentifier"
>
<string
key=
"majorKey"
>
IBDocumentRelativeSource
</string>
<string
key=
"minorKey"
>
../../../../../modules/gui/macosx/vout.h
</string>
</object>
</object>
</object>
<object
class=
"NSMutableArray"
key=
"referencedPartialClassDescriptionsV3.2+"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
View file @
0cdef305
No preview for this file type
modules/gui/macosx/CoreInteraction.h
View file @
0cdef305
...
...
@@ -56,5 +56,4 @@
-
(
void
)
setAspectRatioLocked
:(
BOOL
)
b_value
;
-
(
BOOL
)
aspectRatioIsLocked
;
-
(
void
)
toggleFullscreen
;
-
(
id
)
voutView
;
@end
modules/gui/macosx/CoreInteraction.m
View file @
0cdef305
...
...
@@ -23,7 +23,6 @@
#import "CoreInteraction.h"
#import "intf.h"
#import "vout.h"
#import "open.h"
#import <vlc_playlist.h>
#import <vlc_input.h>
...
...
@@ -93,9 +92,6 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
-
(
void
)
stop
{
var_SetInteger
(
VLCIntf
->
p_libvlc
,
"key-action"
,
ACTIONID_STOP
);
/* Close the window directly, because we do know that there
* won't be anymore video. It's currently waiting a bit. */
[[[
self
voutView
]
window
]
orderOut
:
self
];
}
-
(
void
)
faster
...
...
@@ -270,26 +266,4 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
vlc_object_release
(
p_input
);
}
}
-
(
id
)
voutView
{
id
o_window
;
id
o_voutView
=
nil
;
id
o_embeddedViewList
=
[[
VLCMain
sharedInstance
]
embeddedList
];
NSEnumerator
*
o_enumerator
=
[[
NSApp
orderedWindows
]
objectEnumerator
];
while
(
!
o_voutView
&&
(
o_window
=
[
o_enumerator
nextObject
]
)
)
{
/* We have an embedded vout */
if
(
[
o_embeddedViewList
windowContainsEmbedded
:
o_window
]
)
{
o_voutView
=
[
o_embeddedViewList
viewForWindow
:
o_window
];
}
/* We have a detached vout */
else
if
(
[[
o_window
className
]
isEqualToString
:
@"VLCVoutWindow"
]
)
{
o_voutView
=
[
o_window
voutView
];
}
}
return
[[
o_voutView
retain
]
autorelease
];
}
@end
modules/gui/macosx/MainMenu.h
View file @
0cdef305
...
...
@@ -251,6 +251,7 @@
var
:(
const
char
*
)
psz_variable
selector
:(
SEL
)
pf_callback
;
-
(
id
)
voutMenu
;
@end
/*****************************************************************************
...
...
modules/gui/macosx/MainMenu.m
View file @
0cdef305
...
...
@@ -623,6 +623,11 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
}
-
(
id
)
voutMenu
{
return
o_vout_menu
;
}
#pragma mark -
#pragma mark Panels
...
...
@@ -1204,8 +1209,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
{
if
(
[
o_title
isEqualToString
:
_NS
(
"Float on Top"
)]
)
{
var_Get
(
p_vout
,
"video-on-top"
,
&
val
);
[
o_mi
setState
:
val
.
b_bool
?
NSOnState
:
NSOffState
];
[
o_mi
setState
:
var_GetBool
(
p_vout
,
"video-on-top"
)];
}
bEnabled
=
TRUE
;
...
...
@@ -1215,8 +1219,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
if
(
[
o_title
isEqualToString
:
_NS
(
"Fullscreen"
)]
)
{
var_Get
(
p_playlist
,
"fullscreen"
,
&
val
);
[
o_mi
setState
:
val
.
b_bool
];
[
o_mi
setState
:
var_GetBool
(
p_playlist
,
"fullscreen"
)];
bEnabled
=
TRUE
;
}
[
self
setupMenus
];
/* Make sure video menu is up to date */
...
...
modules/gui/macosx/MainWindow.h
View file @
0cdef305
...
...
@@ -157,6 +157,8 @@
-
(
void
)
hasBecomeFullscreen
;
-
(
void
)
setFrameOnMainThread
:(
NSData
*
)
packedargs
;
-
(
id
)
fspanel
;
@end
@interface
VLCProgressBarGradientEffect
:
NSView
{
...
...
modules/gui/macosx/MainWindow.m
View file @
0cdef305
...
...
@@ -646,8 +646,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
int
i_volume_step
=
0
;
i_volume_step
=
config_GetInt
(
VLCIntf
->
p_libvlc
,
"volume-step"
);
[
o_volume_sld
setFloatValue
:
(
float
)
i_lastShownVolume
/
i_volume_step
];
if
([
o_fspanel
respondsToSelector
:
@selector
(
setVolumeLevel
:)])
[
o_fspanel
setVolumeLevel
:
(
float
)
i_lastShownVolume
/
i_volume_step
];
//
if ([o_fspanel respondsToSelector:@selector(setVolumeLevel:)])
//
[o_fspanel setVolumeLevel: (float)i_lastShownVolume / i_volume_step];
}
}
...
...
@@ -1292,6 +1292,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
}
-
(
id
)
fspanel
{
return
o_fspanel
;
}
#pragma mark -
#pragma mark Side Bar Data handling
...
...
modules/gui/macosx/controls.m
View file @
0cdef305
...
...
@@ -166,19 +166,6 @@
}
}
-
(
IBAction
)
toogleFullscreen
:(
id
)
sender
{
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
}
-
(
BOOL
)
isFullscreen
{
id
o_vout_view
=
[[
VLCCoreInteraction
sharedInstance
]
voutView
];
if
(
o_vout_view
)
{
return
[
o_vout_view
isFullscreen
];
}
return
NO
;
}
-
(
IBAction
)
telxTransparent
:(
id
)
sender
{
vlc_object_t
*
p_vbi
;
...
...
@@ -329,13 +316,16 @@
/* Escape */
if
(
key
==
(
unichar
)
0x1b
)
{
id
o_vout_view
=
[[
VLCCoreInteraction
sharedInstance
]
voutView
];
if
(
o_vout_view
&&
[
o_vout_view
isFullscreen
]
)
vout_thread_t
*
p_vout
=
getVout
();
if
(
p_vout
)
{
if
(
var_GetBool
(
p_vout
,
"fullscreen"
))
{
[
o_vout_view
toggleFullscreen
];
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
eventHandled
=
YES
;
}
}
}
else
if
(
key
==
' '
)
{
[
self
play
:
self
];
...
...
modules/gui/macosx/embeddedwindow.m
View file @
0cdef305
...
...
@@ -38,6 +38,8 @@
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
#if 0
/*****************************************************************************
* VLCEmbeddedWindow Implementation
*****************************************************************************/
...
...
@@ -1006,3 +1008,5 @@
NSRectFill(divider);*/
}
@end
#endif
modules/gui/macosx/fspanel.m
View file @
0cdef305
...
...
@@ -178,13 +178,15 @@
-
(
void
)
setActive
:(
id
)
noData
{
if
(
[[
VLCCoreInteraction
sharedInstance
]
voutView
]
!=
nil
)
vout_thread_t
*
p_vout
=
getVout
();
if
(
p_vout
)
{
if
(
[[[
VLCCoreInteraction
sharedInstance
]
voutView
]
isFullscreen
]
)
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
)
{
b_nonActive
=
NO
;
[
self
fadeIn
];
}
vlc_object_release
(
p_vout
);
}
}
...
...
@@ -247,8 +249,13 @@
-
(
void
)
mouseExited
:(
NSEvent
*
)
theEvent
{
/* give up our focus, so the vout may show us again without letting the user clicking it */
if
(
[[[
VLCCoreInteraction
sharedInstance
]
voutView
]
isFullscreen
]
)
vout_thread_t
*
p_vout
=
getVout
();
if
(
p_vout
)
{
if
(
var_GetBool
(
p_vout
,
"fullscreen"
))
[[[[
VLCCoreInteraction
sharedInstance
]
voutView
]
window
]
makeKeyWindow
];
vlc_object_release
(
p_vout
);
}
}
-
(
void
)
hideMouse
...
...
modules/gui/macosx/intf.m
View file @
0cdef305
...
...
@@ -744,10 +744,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[
NSApp
activateIgnoringOtherApps
:
YES
];
[
o_remote
stopListening
:
self
];
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_STOP
);
/* Close the window directly, because we do know that there
* won't be anymore video. It's currently waiting a bit. */
[[[
o_coreinteraction
voutView
]
window
]
orderOut
:
self
];
}
#pragma mark -
...
...
@@ -1276,6 +1272,15 @@ unsigned int CocoaKeyToVLC( unichar i_key )
-
(
void
)
updatePlaybackPosition
{
[
o_mainwindow
updateTimeSlider
];
input_thread_t
*
p_input
;
p_input
=
pl_CurrentInput
(
p_intf
);
if
(
p_input
)
{
if
(
var_GetInteger
(
p_input
,
"state"
)
==
PLAYING_S
)
UpdateSystemActivity
(
UsrActivity
);
vlc_object_release
(
p_input
);
}
}
-
(
void
)
updateVolume
...
...
modules/gui/macosx/vout.h
View file @
0cdef305
/*****************************************************************************
* vout.h: MacOS X
interface
module
* vout.h: MacOS X
video output
module
*****************************************************************************
* Copyright (C) 200
1-2007
the VideoLAN team
* Copyright (C) 200
2-2011
the VideoLAN team
* $Id$
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Authors: Derk-Jan Hartman <hartman at videolan dot org>
* Eric Petit <titer@m0k.org>
* Benjamin Pracht <bigben at videolan dot org>
* Pierre d'Herbemont <pdherbemont # videolan org>
* Felix Paul Kühne <fkuehne at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -25,107 +25,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "misc.h"
/*****************************************************************************
* VLCEmbeddedList interface
*****************************************************************************/
@interface
VLCEmbeddedList
:
NSObject
{
NSMutableArray
*
o_embedded_array
;
}
-
(
id
)
embeddedVout
;
-
(
void
)
releaseEmbeddedVout
:
(
id
)
o_vout_view
;
-
(
void
)
addEmbeddedVout
:
(
id
)
o_vout_view
;
-
(
BOOL
)
windowContainsEmbedded
:
(
id
)
o_window
;
-
(
id
)
viewForWindow
:
(
id
)
o_window
;
@end
/*****************************************************************************
* VLCVoutView interface
*****************************************************************************/
@protocol
VLCVoutViewResetting
+
(
void
)
resetVout
:
(
vout_thread_t
*
)
p_vout
;
@end
@interface
VLCVoutView
:
NSView
{
vout_thread_t
*
p_vout
;
NSRect
*
s_frame
;
NSView
*
o_view
;
NSView
<
VLCVoutViewResetting
>
*
o_view
;
vout_thread_t
*
p_real_vout
;
id
o_window
;
}
-
(
BOOL
)
setVout
:
(
vout_thread_t
*
)
p_arg_vout
subView
:
(
NSView
*
)
view
frame
:
(
NSRect
*
)
s_arg_frame
;
-
(
void
)
closeVout
;
-
(
void
)
updateTitle
;
-
(
void
)
manage
;
-
(
void
)
scaleWindowWithFactor
:
(
float
)
factor
animate
:
(
BOOL
)
animate
;
-
(
void
)
setOnTop
:(
BOOL
)
b_on_top
;
-
(
void
)
toggleFloatOnTop
;
-
(
void
)
toggleFullscreen
;
-
(
BOOL
)
isFullscreen
;
-
(
void
)
snapshot
;
-
(
id
)
voutWindow
;
+
(
id
)
voutView
:
(
vout_thread_t
*
)
p_vout
subView
:
(
NSView
*
)
view
frame
:
(
NSRect
*
)
s_frame
;
+
(
vout_thread_t
*
)
realVout
:
(
vout_thread_t
*
)
p_vout
;
-
(
void
)
enterFullscreen
;
-
(
void
)
leaveFullscreen
;
@end
/*****************************************************************************
* VLCVoutDetachedView interface
*****************************************************************************/
@interface
VLCDetachedVoutView
:
VLCVoutView
{
mtime_t
i_time_mouse_last_moved
;
}
-
(
void
)
hideMouse
:
(
BOOL
)
b_hide
;
@end
/*****************************************************************************
* VLCEmbeddedView interface
*****************************************************************************/
@interface
VLCEmbeddedVoutView
:
VLCVoutView
{
BOOL
b_used
;
id
o_embeddedwindow
;
}
-
(
void
)
setUsed
:
(
BOOL
)
b_new_used
;
-
(
BOOL
)
isUsed
;
@end
/*****************************************************************************
* VLCVoutWindow interface
*****************************************************************************/
@interface
VLCVoutWindow
:
VLCWindow
{
vout_thread_t
*
p_vout
;
VLCVoutView
*
o_view
;
NSRect
*
s_frame
;
bool
b_init_ok
;
BOOL
fullscreen
;
NSRect
initialFrame
;
}
-
(
id
)
initWithVout
:
(
vout_thread_t
*
)
p_vout
view
:
(
VLCVoutView
*
)
view
frame
:
(
NSRect
*
)
s_frame
;
-
(
id
)
initMainThread
:
(
id
)
sender
;
-
(
void
)
leaveFullscreen
;
-
(
void
)
enterFullscreen
;
-
(
id
)
voutView
;
@end
\ No newline at end of file
modules/gui/macosx/vout.m
View file @
0cdef305
This diff is collapsed.
Click to expand it.
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