Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
d0166d2b
Commit
d0166d2b
authored
Jul 19, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: added basic 'vout window nsobject' capabilities with a test window
not fully functional yet
parent
2b9cd401
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
353 additions
and
14 deletions
+353
-14
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
...acosx/Resources/English.lproj/MainMenu.nib/designable.nib
+271
-9
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
...osx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/embeddedwindow.h
modules/gui/macosx/embeddedwindow.h
+3
-0
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/embeddedwindow.m
+7
-0
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+1
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+64
-0
modules/gui/macosx/macosx.m
modules/gui/macosx/macosx.m
+7
-5
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
View file @
d0166d2b
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
<object
class=
"NSMutableArray"
key=
"IBDocument.EditedObjectIDs"
>
<object
class=
"NSMutableArray"
key=
"IBDocument.EditedObjectIDs"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<integer
value=
"2"
/>
<integer
value=
"2"
/>
<integer
value=
"
915
"
/>
<integer
value=
"
2416
"
/>
<integer
value=
"283"
/>
<integer
value=
"283"
/>
<integer
value=
"4596"
/>
<integer
value=
"235"
/>
<integer
value=
"235"
/>
<integer
value=
"2730"
/>
<integer
value=
"2730"
/>
<integer
value=
"2417"
/>
<integer
value=
"915"
/>
<integer
value=
"4596"
/>
</object>
</object>
<object
class=
"NSArray"
key=
"IBDocument.PluginDependencies"
>
<object
class=
"NSArray"
key=
"IBDocument.PluginDependencies"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
@@ -882,7 +882,7 @@
...
@@ -882,7 +882,7 @@
<reference
key=
"NSNextResponder"
ref=
"429932428"
/>
<reference
key=
"NSNextResponder"
ref=
"429932428"
/>
<int
key=
"NSvFlags"
>
-2147482334
</int>
<int
key=
"NSvFlags"
>
-2147482334
</int>
<object
class=
"NSPSMatrix"
key=
"NSDrawMatrix"
/>
<object
class=
"NSPSMatrix"
key=
"NSDrawMatrix"
/>
<string
key=
"NSFrame"
>
{{22
2, 24
}, {155, 12}}
</string>
<string
key=
"NSFrame"
>
{{22
1, 11
}, {155, 12}}
</string>
<reference
key=
"NSSuperview"
ref=
"429932428"
/>
<reference
key=
"NSSuperview"
ref=
"429932428"
/>
<int
key=
"NSpiFlags"
>
16650
</int>
<int
key=
"NSpiFlags"
>
16650
</int>
<double
key=
"NSMaxValue"
>
100
</double>
<double
key=
"NSMaxValue"
>
100
</double>
...
@@ -3084,7 +3084,7 @@
...
@@ -3084,7 +3084,7 @@
<int
key=
"NSvFlags"
>
274
</int>
<int
key=
"NSvFlags"
>
274
</int>
<string
key=
"NSFrame"
>
{{0, 28}, {238, 35}}
</string>
<string
key=
"NSFrame"
>
{{0, 28}, {238, 35}}
</string>
<reference
key=
"NSSuperview"
ref=
"351701434"
/>
<reference
key=
"NSSuperview"
ref=
"351701434"
/>
<string
key=
"NSClassName"
>
VLCEmbeddedVout
View
</string>
<string
key=
"NSClassName"
>
NS
View
</string>
<string
key=
"NSExtension"
>
NSView
</string>
<string
key=
"NSExtension"
>
NSView
</string>
</object>
</object>
</object>
</object>
...
@@ -6984,6 +6984,14 @@ LCAuLi4</string>
...
@@ -6984,6 +6984,14 @@ LCAuLi4</string>
</object>
</object>
<int
key=
"connectionID"
>
4625
</int>
<int
key=
"connectionID"
>
4625
</int>
</object>
</object>
<object
class=
"IBConnectionRecord"
>
<object
class=
"IBOutletConnection"
key=
"connection"
>
<string
key=
"label"
>
o_video_view
</string>
<reference
key=
"source"
ref=
"284663135"
/>
<reference
key=
"destination"
ref=
"627102071"
/>
</object>
<int
key=
"connectionID"
>
4626
</int>
</object>
</object>
</object>
<object
class=
"IBMutableOrderedSet"
key=
"objectRecords"
>
<object
class=
"IBMutableOrderedSet"
key=
"objectRecords"
>
<object
class=
"NSArray"
key=
"orderedObjects"
>
<object
class=
"NSArray"
key=
"orderedObjects"
>
...
@@ -10657,9 +10665,9 @@ LCAuLi4</string>
...
@@ -10657,9 +10665,9 @@ LCAuLi4</string>
<boolean
value=
"YES"
/>
<boolean
value=
"YES"
/>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<boolean
value=
"YES"
/>
<boolean
value=
"YES"
/>
<string>
{{
243
, 631}, {238, 63}}
</string>
<string>
{{
330
, 631}, {238, 63}}
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
{{
243
, 631}, {238, 63}}
</string>
<string>
{{
330
, 631}, {238, 63}}
</string>
<boolean
value=
"YES"
/>
<boolean
value=
"YES"
/>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<boolean
value=
"YES"
/>
<boolean
value=
"YES"
/>
...
@@ -10856,7 +10864,7 @@ LCAuLi4</string>
...
@@ -10856,7 +10864,7 @@ LCAuLi4</string>
<boolean
value=
"YES"
/>
<boolean
value=
"YES"
/>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<object
class=
"NSAffineTransform"
>
<object
class=
"NSAffineTransform"
>
<bytes
key=
"NSTransformStruct"
>
P4AAAL+AAABD
WwAAwa
gAAA
</bytes>
<bytes
key=
"NSTransformStruct"
>
P4AAAL+AAABD
XgAAwg
gAAA
</bytes>
</object>
</object>
<boolean
value=
"YES"
/>
<boolean
value=
"YES"
/>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
...
@@ -11213,7 +11221,7 @@ LCAuLi4</string>
...
@@ -11213,7 +11221,7 @@ LCAuLi4</string>
</object>
</object>
</object>
</object>
<nil
key=
"sourceID"
/>
<nil
key=
"sourceID"
/>
<int
key=
"maxID"
>
462
5
</int>
<int
key=
"maxID"
>
462
6
</int>
</object>
</object>
<object
class=
"IBClassDescriber"
key=
"IBDocument.Classes"
>
<object
class=
"IBClassDescriber"
key=
"IBDocument.Classes"
>
<object
class=
"NSMutableArray"
key=
"referencedPartialClassDescriptionsV3.1+"
>
<object
class=
"NSMutableArray"
key=
"referencedPartialClassDescriptionsV3.1+"
>
...
@@ -11610,6 +11618,260 @@ LCAuLi4</string>
...
@@ -11610,6 +11618,260 @@ LCAuLi4</string>
<string
key=
"minorKey"
>
../../../../../modules/gui/macosx/controls.h
</string>
<string
key=
"minorKey"
>
../../../../../modules/gui/macosx/controls.h
</string>
</object>
</object>
</object>
</object>
<object
class=
"IBPartialClassDescription"
>
<string
key=
"className"
>
VLCEmbeddedWindow
</string>
<string
key=
"superclassName"
>
NSWindow
</string>
<object
class=
"NSMutableDictionary"
key=
"actions"
>
<string
key=
"NS.key.0"
>
togglePlaylist:
</string>
<string
key=
"NS.object.0"
>
id
</string>
</object>
<object
class=
"NSMutableDictionary"
key=
"actionInfosByName"
>
<string
key=
"NS.key.0"
>
togglePlaylist:
</string>
<object
class=
"IBActionInfo"
key=
"NS.object.0"
>
<string
key=
"name"
>
togglePlaylist:
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
</object>
<object
class=
"NSMutableDictionary"
key=
"outlets"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<object
class=
"NSArray"
key=
"dict.sortedKeys"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<string>
o_background_view
</string>
<string>
o_backgroundimg_middle
</string>
<string>
o_backgroundimg_right
</string>
<string>
o_btn_backward
</string>
<string>
o_btn_equalizer
</string>
<string>
o_btn_forward
</string>
<string>
o_btn_fullscreen
</string>
<string>
o_btn_next
</string>
<string>
o_btn_play
</string>
<string>
o_btn_playlist
</string>
<string>
o_btn_prev
</string>
<string>
o_btn_stop
</string>
<string>
o_btn_volume_down
</string>
<string>
o_btn_volume_up
</string>
<string>
o_horizontal_split
</string>
<string>
o_main_pgbar
</string>
<string>
o_playlist
</string>
<string>
o_playlist_table
</string>
<string>
o_playlist_view
</string>
<string>
o_scrollfield
</string>
<string>
o_searchfield
</string>
<string>
o_sidebar_list
</string>
<string>
o_status
</string>
<string>
o_time
</string>
<string>
o_timeslider
</string>
<string>
o_vertical_split
</string>
<string>
o_video_view
</string>
<string>
o_videosubview
</string>
<string>
o_view
</string>
<string>
o_vlc_main
</string>
<string>
o_volumeslider
</string>
</object>
<object
class=
"NSMutableArray"
key=
"dict.values"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
<string>
id
</string>
</object>
</object>
<object
class=
"NSMutableDictionary"
key=
"toOneOutletInfosByName"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<object
class=
"NSArray"
key=
"dict.sortedKeys"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<string>
o_background_view
</string>
<string>
o_backgroundimg_middle
</string>
<string>
o_backgroundimg_right
</string>
<string>
o_btn_backward
</string>
<string>
o_btn_equalizer
</string>
<string>
o_btn_forward
</string>
<string>
o_btn_fullscreen
</string>
<string>
o_btn_next
</string>
<string>
o_btn_play
</string>
<string>
o_btn_playlist
</string>
<string>
o_btn_prev
</string>
<string>
o_btn_stop
</string>
<string>
o_btn_volume_down
</string>
<string>
o_btn_volume_up
</string>
<string>
o_horizontal_split
</string>
<string>
o_main_pgbar
</string>
<string>
o_playlist
</string>
<string>
o_playlist_table
</string>
<string>
o_playlist_view
</string>
<string>
o_scrollfield
</string>
<string>
o_searchfield
</string>
<string>
o_sidebar_list
</string>
<string>
o_status
</string>
<string>
o_time
</string>
<string>
o_timeslider
</string>
<string>
o_vertical_split
</string>
<string>
o_video_view
</string>
<string>
o_videosubview
</string>
<string>
o_view
</string>
<string>
o_vlc_main
</string>
<string>
o_volumeslider
</string>
</object>
<object
class=
"NSMutableArray"
key=
"dict.values"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_background_view
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_backgroundimg_middle
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_backgroundimg_right
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_backward
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_equalizer
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_forward
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_fullscreen
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_next
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_play
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_playlist
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_prev
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_stop
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_volume_down
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_btn_volume_up
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_horizontal_split
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_main_pgbar
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_playlist
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_playlist_table
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_playlist_view
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_scrollfield
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_searchfield
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_sidebar_list
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_status
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_time
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_timeslider
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_vertical_split
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_video_view
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_videosubview
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_view
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_vlc_main
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
<object
class=
"IBToOneOutletInfo"
>
<string
key=
"name"
>
o_volumeslider
</string>
<string
key=
"candidateClassName"
>
id
</string>
</object>
</object>
</object>
<object
class=
"IBClassDescriptionSource"
key=
"sourceIdentifier"
>
<string
key=
"majorKey"
>
IBDocumentRelativeSource
</string>
<string
key=
"minorKey"
>
../../../../../modules/gui/macosx/embeddedwindow.h
</string>
</object>
</object>
<object
class=
"IBPartialClassDescription"
>
<object
class=
"IBPartialClassDescription"
>
<string
key=
"className"
>
VLCFSPanel
</string>
<string
key=
"className"
>
VLCFSPanel
</string>
<string
key=
"superclassName"
>
NSWindow
</string>
<string
key=
"superclassName"
>
NSWindow
</string>
...
...
extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
View file @
d0166d2b
No preview for this file type
modules/gui/macosx/embeddedwindow.h
View file @
d0166d2b
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
IBOutlet
id
o_playlist_view
;
IBOutlet
id
o_playlist_view
;
IBOutlet
id
o_playlist_table
;
IBOutlet
id
o_playlist_table
;
IBOutlet
id
o_vlc_main
;
IBOutlet
id
o_vlc_main
;
IBOutlet
id
o_video_view
;
NSImage
*
o_img_play
;
NSImage
*
o_img_play
;
NSImage
*
o_img_play_pressed
;
NSImage
*
o_img_play_pressed
;
...
@@ -82,6 +83,8 @@
...
@@ -82,6 +83,8 @@
-
(
void
)
controlTintChanged
;
-
(
void
)
controlTintChanged
;
-
(
id
)
videoView
;
-
(
void
)
setTime
:
(
NSString
*
)
o_arg_ime
position
:
(
float
)
f_position
;
-
(
void
)
setTime
:
(
NSString
*
)
o_arg_ime
position
:
(
float
)
f_position
;
-
(
id
)
getPgbar
;
-
(
id
)
getPgbar
;
-
(
void
)
playStatusUpdated
:
(
int
)
i_status
;
-
(
void
)
playStatusUpdated
:
(
int
)
i_status
;
...
...
modules/gui/macosx/embeddedwindow.m
View file @
d0166d2b
...
@@ -141,6 +141,8 @@
...
@@ -141,6 +141,8 @@
/* we don't want this window to be restored on relaunch */
/* we don't want this window to be restored on relaunch */
if
([
self
respondsToSelector
:
@selector
(
setRestorable
:)])
if
([
self
respondsToSelector
:
@selector
(
setRestorable
:)])
[
self
setRestorable
:
NO
];
[
self
setRestorable
:
NO
];
[
self
makeKeyAndOrderFront
:
self
];
}
}
-
(
void
)
controlTintChanged
-
(
void
)
controlTintChanged
...
@@ -181,6 +183,11 @@
...
@@ -181,6 +183,11 @@
[
super
dealloc
];
[
super
dealloc
];
}
}
-
(
id
)
videoView
{
return
o_video_view
;
}
-
(
void
)
setTime
:(
NSString
*
)
o_arg_time
position
:(
float
)
f_position
-
(
void
)
setTime
:(
NSString
*
)
o_arg_time
position
:(
float
)
f_position
{
{
[
o_time
setStringValue
:
o_arg_time
];
[
o_time
setStringValue
:
o_arg_time
];
...
...
modules/gui/macosx/intf.h
View file @
d0166d2b
...
@@ -208,6 +208,7 @@ struct intf_sys_t
...
@@ -208,6 +208,7 @@ struct intf_sys_t
-
(
id
)
info
;
-
(
id
)
info
;
-
(
id
)
wizard
;
-
(
id
)
wizard
;
-
(
id
)
embeddedList
;
-
(
id
)
embeddedList
;
-
(
id
)
getVideoViewAtPositionX
:
(
int
*
)
pi_x
Y
:
(
int
*
)
pi_y
withWidth
:
(
unsigned
int
*
)
pi_width
andHeight
:
(
unsigned
int
*
)
pi_height
;
-
(
id
)
coreDialogProvider
;
-
(
id
)
coreDialogProvider
;
-
(
id
)
mainIntfPgbar
;
-
(
id
)
mainIntfPgbar
;
-
(
id
)
controllerWindow
;
-
(
id
)
controllerWindow
;
...
...
modules/gui/macosx/intf.m
View file @
d0166d2b
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include <vlc_url.h>
#include <vlc_url.h>
#include <vlc_modules.h>
#include <vlc_modules.h>
#include <vlc_aout_intf.h>
#include <vlc_aout_intf.h>
#include <vlc_vout_window.h>
#include <unistd.h>
/* execl() */
#include <unistd.h>
/* execl() */
#import "intf.h"
#import "intf.h"
...
@@ -106,6 +107,53 @@ void CloseIntf ( vlc_object_t *p_this )
...
@@ -106,6 +107,53 @@ void CloseIntf ( vlc_object_t *p_this )
free
(
p_intf
->
p_sys
);
free
(
p_intf
->
p_sys
);
}
}
static
int
WindowControl
(
vout_window_t
*
,
int
i_query
,
va_list
);
int
WindowOpen
(
vout_window_t
*
p_wnd
,
const
vout_window_cfg_t
*
cfg
)
{
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
!
p_intf
)
{
msg_Err
(
p_wnd
,
"Mac OS X interface not found"
);
return
VLC_EGENERIC
;
}
msg_Dbg
(
p_wnd
,
"looking for video view"
);
int
i_x
=
cfg
->
x
;
int
i_y
=
cfg
->
y
;
unsigned
i_width
=
cfg
->
width
;
unsigned
i_height
=
cfg
->
height
;
p_wnd
->
handle
.
nsobject
=
[[
VLCMain
sharedInstance
]
getVideoViewAtPositionX
:
&
i_x
Y
:
&
i_y
withWidth
:
&
i_width
andHeight
:
&
i_height
];
if
(
!
p_wnd
->
handle
.
nsobject
)
{
msg_Err
(
p_wnd
,
"got no video view from the interface"
);
return
VLC_EGENERIC
;
}
p_wnd
->
control
=
WindowControl
;
p_wnd
->
sys
=
(
vout_window_sys_t
*
)
VLCIntf
;
return
VLC_SUCCESS
;
}
static
int
WindowControl
(
vout_window_t
*
p_wnd
,
int
i_query
,
va_list
args
)
{
/* TODO */
if
(
i_query
==
VOUT_WINDOW_SET_STATE
)
NSLog
(
@"WindowControl:VOUT_WINDOW_SET_STATE"
);
else
if
(
i_query
==
VOUT_WINDOW_SET_SIZE
)
NSLog
(
@"WindowControl:VOUT_WINDOW_SET_SIZE"
);
else
if
(
i_query
==
VOUT_WINDOW_SET_FULLSCREEN
)
NSLog
(
@"WindowControl:VOUT_WINDOW_SET_FULLSCREEN"
);
else
NSLog
(
@"WindowControl: unknown query"
);
return
VLC_SUCCESS
;
}
void
WindowClose
(
vout_window_t
*
p_wnd
)
{
NSLog
(
@"Window Close"
);
// tell the interface to get rid of the video, TODO
}
/*****************************************************************************
/*****************************************************************************
* Run: main loop
* Run: main loop
*****************************************************************************/
*****************************************************************************/
...
@@ -1183,6 +1231,22 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1183,6 +1231,22 @@ unsigned int CocoaKeyToVLC( unichar i_key )
return
o_wizard
;
return
o_wizard
;
}
}
-
(
id
)
getVideoViewAtPositionX
:
(
int
*
)
pi_x
Y
:
(
int
*
)
pi_y
withWidth
:
(
unsigned
int
*
)
pi_width
andHeight
:
(
unsigned
int
*
)
pi_height
{
id
videoView
=
[
o_embedded_window
videoView
];
NSRect
videoRect
=
[
videoView
frame
];
int
i_x
=
(
int
)
videoRect
.
origin
.
x
;
int
i_y
=
(
int
)
videoRect
.
origin
.
y
;
unsigned
int
i_width
=
(
int
)
videoRect
.
size
.
width
;
unsigned
int
i_height
=
(
int
)
videoRect
.
size
.
height
;
pi_x
=
(
int
*
)
i_x
;
pi_y
=
(
int
*
)
i_y
;
pi_width
=
(
unsigned
int
*
)
i_width
;
pi_height
=
(
unsigned
int
*
)
i_height
;
msg_Dbg
(
VLCIntf
,
"returning videoview with x=%i, y=%i, width=%i, height=%i"
,
i_x
,
i_y
,
i_width
,
i_height
);
return
videoView
;
}
-
(
id
)
embeddedList
-
(
id
)
embeddedList
{
{
if
(
o_embedded_list
)
if
(
o_embedded_list
)
...
...
modules/gui/macosx/macosx.m
View file @
d0166d2b
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include
<vlc
_common
.
h
>
#include
<vlc
_common
.
h
>
#include
<vlc
_plugin
.
h
>
#include
<vlc
_plugin
.
h
>
#include
<vlc
_vout_window
.
h
>
/*****************************************************************************
/*****************************************************************************
* External prototypes
* External prototypes
...
@@ -45,6 +46,9 @@
...
@@ -45,6 +46,9 @@
int OpenIntf ( vlc_object_t * );
int OpenIntf ( vlc_object_t * );
void CloseIntf ( vlc_object_t * );
void CloseIntf ( vlc_object_t * );
int WindowOpen ( vout_window_t *, const vout_window_cfg_t * );
void WindowClose ( vout_window_t * );
int OpenVideoGL ( vlc_object_t * );
int OpenVideoGL ( vlc_object_t * );
void CloseVideoGL ( vlc_object_t * );
void CloseVideoGL ( vlc_object_t * );
...
@@ -117,11 +121,9 @@ vlc_module_begin ()
...
@@ -117,11 +121,9 @@ vlc_module_begin ()
false )
false )
add_submodule ()
add_submodule ()
set_description( "Mac OS X OpenGL" )
set_description( "Mac OS X Video Output Provider" )
set_capability( "opengl provider", 100 )
set_capability( "vout window nsobject", 100 )
set_category( CAT_VIDEO)
set_callbacks( WindowOpen, WindowClose )
set_subcategory( SUBCAT_VIDEO_VOUT )
// set_callbacks( OpenVideoGL, CloseVideoGL )
add_integer( "macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT,
add_integer( "macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT,
false )
false )
...
...
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