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
74fd152d
Commit
74fd152d
authored
Mar 02, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zoom fullscreen effect on Mac OS X 10.4.
parent
bfae05be
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
3235 additions
and
2820 deletions
+3235
-2820
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
+1
-0
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
+2
-2
extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
...OSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
+2729
-2693
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+2
-2
modules/gui/macosx/embeddedwindow.h
modules/gui/macosx/embeddedwindow.h
+13
-1
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/embeddedwindow.m
+278
-8
modules/gui/macosx/extended.m
modules/gui/macosx/extended.m
+1
-1
modules/gui/macosx/interaction.m
modules/gui/macosx/interaction.m
+1
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+0
-2
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+16
-0
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+30
-0
modules/gui/macosx/vout.h
modules/gui/macosx/vout.h
+12
-3
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+33
-9
modules/gui/macosx/voutgl.m
modules/gui/macosx/voutgl.m
+42
-31
modules/gui/macosx/voutqt.m
modules/gui/macosx/voutqt.m
+75
-67
No files found.
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
View file @
74fd152d
...
...
@@ -67,6 +67,7 @@
"o_btn_play" = id;
"o_slider" = id;
"o_time" = id;
"o_view" = id;
};
SUPERCLASS = NSWindow;
},
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
View file @
74fd152d
...
...
@@ -25,10 +25,10 @@
<array/>
<key>
IBOpenObjects
</key>
<array>
<integer>
29
</integer>
<integer>
21
</integer>
<integer>
2769
</integer>
<integer>
2730
</integer>
<integer>
29
</integer>
<integer>
2769
</integer>
</array>
<key>
IBSystem Version
</key>
<string>
8L2127
</string>
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
View file @
74fd152d
This diff is collapsed.
Click to expand it.
modules/gui/macosx/controls.m
View file @
74fd152d
...
...
@@ -99,7 +99,7 @@
o_vout_view
=
[
o_embedded_vout_list
getViewForWindow
:
o_window
];
}
/* We have a detached vout */
else
if
(
[[
o_window
className
]
isEqualToString
:
@"VLCWindow"
]
)
else
if
(
[[
o_window
className
]
isEqualToString
:
@"VLC
Vout
Window"
]
)
{
msg_Dbg
(
VLCIntf
,
"detached vout controls.m call getVoutView"
);
o_vout_view
=
[
o_window
getVoutView
];
...
...
@@ -894,7 +894,7 @@
while
(
(
o_window
=
[
o_enumerator
nextObject
]))
{
if
(
[[
o_window
className
]
isEqualToString
:
@"VLCWindow"
]
||
if
(
[[
o_window
className
]
isEqualToString
:
@"VLC
Vout
Window"
]
||
[[[
VLCMain
sharedInstance
]
getEmbeddedList
]
windowContainsEmbedded:
o_window
])
{
...
...
modules/gui/macosx/embeddedwindow.h
View file @
74fd152d
...
...
@@ -25,6 +25,7 @@
* VLCEmbeddedWindow interface
*****************************************************************************/
#import "misc.h"
@interface
VLCEmbeddedWindow
:
NSWindow
{
...
...
@@ -34,6 +35,7 @@
IBOutlet
id
o_btn_play
;
IBOutlet
id
o_slider
;
IBOutlet
id
o_time
;
IBOutlet
id
o_view
;
NSImage
*
o_img_play
;
NSImage
*
o_img_play_pressed
;
...
...
@@ -41,12 +43,22 @@
NSImage
*
o_img_pause_pressed
;
NSRect
o_saved_frame
;
VLCWindow
*
o_fullscreen_window
;
NSViewAnimation
*
o_fullscreen_anim1
;
NSViewAnimation
*
o_fullscreen_anim2
;
NSView
*
o_temp_view
;
}
-
(
void
)
setTime
:(
NSString
*
)
o_arg_ime
position
:(
float
)
f_position
;
-
(
void
)
playStatusUpdated
:(
int
)
i_status
;
-
(
void
)
setSeekable
:(
BOOL
)
b_seekable
;
-
(
void
)
setFullscreen
:(
BOOL
)
b_fullscreen
;
-
(
void
)
enterFullscreen
;
-
(
void
)
leaveFullscreen
;
/* private */
-
(
void
)
hasEndedFullscreen
;
-
(
void
)
hasBecomeFullscreen
;
@end
modules/gui/macosx/embeddedwindow.m
View file @
74fd152d
This diff is collapsed.
Click to expand it.
modules/gui/macosx/extended.m
View file @
74fd152d
...
...
@@ -381,7 +381,7 @@ static VLCExtended *_o_sharedInstance = nil;
while
((
o_window
=
[
o_enumerator
nextObject
]))
{
if
(
[[
o_window
className
]
isEqualToString
:
@"VLCWindow"
]
||
if
(
[[
o_window
className
]
isEqualToString
:
@"VLC
Vout
Window"
]
||
[[[
VLCMain
sharedInstance
]
getEmbeddedList
]
windowContainsEmbedded:
o_window
])
{
...
...
modules/gui/macosx/interaction.m
View file @
74fd152d
...
...
@@ -159,7 +159,7 @@
while
(
(
o_window
=
[
o_enum
nextObject
]
)
)
{
if
(
[[
o_window
className
]
isEqualToString
:
@"VLCWindow"
]
)
if
(
[[
o_window
className
]
isEqualToString
:
@"VLC
Vout
Window"
]
)
{
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
break
;
...
...
modules/gui/macosx/intf.m
View file @
74fd152d
...
...
@@ -472,8 +472,6 @@ static VLCMain *_o_sharedMainInstance = nil;
var_AddCallback
(
p_playlist
,
"fullscreen"
,
FullscreenChanged
,
self
);
var_AddCallback
(
p_playlist
,
"intf-show"
,
ShowController
,
self
);
[
o_embedded_window
setFullscreen
:
var_GetBool
(
p_playlist
,
"fullscreen"
)];
vlc_object_release
(
p_playlist
);
var_Create
(
p_intf
,
"interaction"
,
VLC_VAR_ADDRESS
);
...
...
modules/gui/macosx/misc.h
View file @
74fd152d
...
...
@@ -21,6 +21,22 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* VLCWindow
*
* Missing extension to NSWindow
*****************************************************************************/
@interface
VLCWindow
:
NSWindow
{
BOOL
b_canBecomeKeyWindow
;
BOOL
b_isset_canBecomeKeyWindow
;
}
-
(
void
)
setCanBecomeKeyWindow
:
(
BOOL
)
canBecomeKey
;
@end
/*****************************************************************************
* VLCControllerWindow
*****************************************************************************/
...
...
modules/gui/macosx/misc.m
View file @
74fd152d
...
...
@@ -28,6 +28,36 @@
#include "playlist.h"
#include "controls.h"
/*****************************************************************************
* VLCWindow
*
* Missing extension to NSWindow
*****************************************************************************/
@implementation
VLCWindow
-
(
id
)
initWithContentRect
:(
NSRect
)
contentRect
styleMask
:(
unsigned
int
)
styleMask
backing
:(
NSBackingStoreType
)
backingType
defer
:(
BOOL
)
flag
{
self
=
[
super
initWithContentRect
:
contentRect
styleMask
:
styleMask
backing
:
backingType
defer
:
flag
];
if
(
self
)
b_isset_canBecomeKeyWindow
=
NO
;
return
self
;
}
-
(
void
)
setCanBecomeKeyWindow
:
(
BOOL
)
canBecomeKey
{
b_isset_canBecomeKeyWindow
=
YES
;
b_canBecomeKeyWindow
=
canBecomeKey
;
}
-
(
BOOL
)
canBecomeKeyWindow
{
if
(
b_isset_canBecomeKeyWindow
)
return
b_canBecomeKeyWindow
;
return
[
super
canBecomeKeyWindow
];
}
@end
/*****************************************************************************
* VLCControllerWindow
*****************************************************************************/
...
...
modules/gui/macosx/vout.h
View file @
74fd152d
...
...
@@ -44,12 +44,17 @@
/*****************************************************************************
* VLCVoutView interface
*****************************************************************************/
@protocol
VLCVoutViewResetting
+
(
void
)
resetVout
:
(
vout_thread_t
*
)
p_vout
;
@end
@interface
VLCVoutView
:
NSView
{
vout_thread_t
*
p_vout
;
NSView
*
o_view
;
NSRect
*
s_frame
;
NSView
<
VLCVoutViewResetting
>
*
o_view
;
vout_thread_t
*
p_real_vout
;
id
o_window
;
}
...
...
@@ -70,6 +75,8 @@
frame
:
(
NSRect
*
)
s_frame
;
+
(
vout_thread_t
*
)
getRealVout
:
(
vout_thread_t
*
)
p_vout
;
-
(
void
)
enterFullscreen
;
-
(
void
)
leaveFullscreen
;
@end
/*****************************************************************************
...
...
@@ -102,17 +109,19 @@
/*****************************************************************************
* VLCDetachedEmbeddedView interface
*****************************************************************************/
@class
VLCEmbeddedWindow
;
@interface
VLCDetachedEmbeddedVoutView
:
VLCEmbeddedVoutView
{
id
o_embeddedwindow
;
}
@end
/*****************************************************************************
* VLCWindow interface
* VLC
Vout
Window interface
*****************************************************************************/
@interface
VLCWindow
:
NSWindow
@interface
VLC
Vout
Window
:
NSWindow
{
vout_thread_t
*
p_vout
;
VLCVoutView
*
o_view
;
...
...
modules/gui/macosx/vout.m
View file @
74fd152d
...
...
@@ -43,6 +43,7 @@
#include "fspanel.h"
#include "vout.h"
#import "controls.h"
#import "embeddedwindow.h"
/*****************************************************************************
* DeviceCallback: Callback triggered when the video-device variable is changed
...
...
@@ -113,9 +114,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
-
(
BOOL
)
windowContainsEmbedded
:
(
id
)
o_window
{
/* if( ![[o_window className] isEqualToString: @"VLCWindow"] )
/* if( ![[o_window className] isEqualToString: @"VLC
Vout
Window"] )
{
NSLog( @"We were not given a VLCWindow" );
NSLog( @"We were not given a VLC
Vout
Window" );
}*/
return
([
self
getViewForWindow
:
o_window
]
==
nil
?
NO
:
YES
);
}
...
...
@@ -392,10 +393,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
var_Get
(
p_real_vout
,
"fullscreen"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_real_vout
,
"fullscreen"
,
val
);
if
(
[
self
isFullscreen
]
)
[[[[
VLCMain
sharedInstance
]
getControls
]
getFSPanel
]
setActive
:
nil
];
else
[[[[
VLCMain
sharedInstance
]
getControls
]
getFSPanel
]
setNonActive
:
nil
];
}
-
(
BOOL
)
isFullscreen
...
...
@@ -732,6 +729,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return
o_return
;
}
-
(
void
)
enterFullscreen
{
[[
o_view
class
]
resetVout
:
p_vout
];
[[[[
VLCMain
sharedInstance
]
getControls
]
getFSPanel
]
setActive
:
nil
];
}
-
(
void
)
leaveFullscreen
{
[[
o_view
class
]
resetVout
:
p_vout
];
[[[[
VLCMain
sharedInstance
]
getControls
]
getFSPanel
]
setNonActive
:
nil
];
}
@end
/*****************************************************************************
...
...
@@ -751,7 +760,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
{
BOOL
b_return
=
[
super
setVout
:
p_arg_vout
subView
:
view
frame
:
s_arg_frame
];
i_time_mouse_last_moved
=
mdate
();
o_window
=
[[
VLCWindow
alloc
]
initWithVout
:
p_arg_vout
view
:
self
o_window
=
[[
VLC
Vout
Window
alloc
]
initWithVout
:
p_arg_vout
view
:
self
frame:
s_arg_frame
];
[
self
updateTitle
];
[
view
setFrame
:
[
self
frame
]];
...
...
@@ -875,6 +884,10 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
@end
@implementation
VLCDetachedEmbeddedVoutView
-
(
void
)
awakeFromNib
{
o_embeddedwindow
=
[
self
window
];
}
-
(
BOOL
)
setVout
:
(
vout_thread_t
*
)
p_arg_vout
subView
:
(
NSView
*
)
view
frame
:
(
NSRect
*
)
s_arg_frame
...
...
@@ -897,12 +910,23 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[
super
closeVout
];
}
-
(
void
)
enterFullscreen
{
/* We are in a VLCEmbeddedWindow */
[
o_embeddedwindow
performSelectorOnMainThread
:
@selector
(
enterFullscreen
)
withObject
:
NULL
waitUntilDone
:
YES
];
}
-
(
void
)
leaveFullscreen
{
/* We are in a VLCEmbeddedWindow */
[
o_embeddedwindow
performSelectorOnMainThread
:
@selector
(
leaveFullscreen
)
withObject
:
NULL
waitUntilDone
:
YES
];
}
@end
/*****************************************************************************
* VLCWindow implementation
* VLC
Vout
Window implementation
*****************************************************************************/
@implementation
VLCWindow
@implementation
VLC
Vout
Window
-
(
id
)
initWithVout
:
(
vout_thread_t
*
)
vout
view
:
(
VLCVoutView
*
)
view
frame
:
(
NSRect
*
)
frame
...
...
modules/gui/macosx/voutgl.m
View file @
74fd152d
...
...
@@ -44,13 +44,14 @@
#include <AGL/agl.h>
/*****************************************************************************
* VLCView interface
* VLC
GL
View interface
*****************************************************************************/
@interface
VLCGLView
:
NSOpenGLView
@interface
VLCGLView
:
NSOpenGLView
<
VLCVoutViewResetting
>
{
vout_thread_t
*
p_vout
;
}
+
(
void
)
resetVout
:
(
vout_thread_t
*
)
p_vout
;
-
(
id
)
initWithVout
:
(
vout_thread_t
*
)
p_vout
;
@end
...
...
@@ -241,38 +242,12 @@ static int Manage( vout_thread_t * p_vout )
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
if
(
!
p_vout
->
b_fullscreen
)
{
/* Save window size and position */
p_vout
->
p_sys
->
s_frame
.
size
=
[
p_vout
->
p_sys
->
o_vout_view
frame
].
size
;
p_vout
->
p_sys
->
s_frame
.
origin
=
[[
p_vout
->
p_sys
->
o_vout_view
getWindow
]
frame
].
origin
;
p_vout
->
p_sys
->
b_saved_frame
=
VLC_TRUE
;
}
[
p_vout
->
p_sys
->
o_vout_view
closeVout
];
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
#define o_glview p_vout->p_sys->o_glview
o_glview
=
[[
VLCGLView
alloc
]
initWithVout
:
p_vout
];
[
o_glview
autorelease
];
if
(
p_vout
->
p_sys
->
b_saved_frame
)
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_glview
frame:
&
p_vout
->
p_sys
->
s_frame
];
}
if
(
p_vout
->
b_fullscreen
)
[
p_vout
->
p_sys
->
o_vout_view
enterFullscreen
];
else
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_glview
frame
:
nil
];
}
[[
o_glview
openGLContext
]
makeCurrentContext
];
#undef o_glview
[
p_vout
->
p_sys
->
o_vout_view
leaveFullscreen
];
[
o_pool
release
];
...
...
@@ -327,6 +302,42 @@ static void Unlock( vout_thread_t * p_vout )
*****************************************************************************/
@implementation
VLCGLView
/* This function will reset the o_vout_view. It's useful to go fullscreen. */
+
(
void
)
resetVout
:
(
vout_thread_t
*
)
p_vout
{
if
(
p_vout
->
b_fullscreen
)
{
/* Save window size and position */
p_vout
->
p_sys
->
s_frame
.
size
=
[
p_vout
->
p_sys
->
o_vout_view
frame
].
size
;
p_vout
->
p_sys
->
s_frame
.
origin
=
[[
p_vout
->
p_sys
->
o_vout_view
getWindow
]
frame
].
origin
;
p_vout
->
p_sys
->
b_saved_frame
=
VLC_TRUE
;
}
[
p_vout
->
p_sys
->
o_vout_view
closeVout
];
#define o_glview p_vout->p_sys->o_glview
o_glview
=
[[
VLCGLView
alloc
]
initWithVout
:
p_vout
];
[
o_glview
autorelease
];
if
(
p_vout
->
p_sys
->
b_saved_frame
)
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_glview
frame:
&
p_vout
->
p_sys
->
s_frame
];
}
else
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_glview
frame
:
nil
];
}
[[
o_glview
openGLContext
]
makeCurrentContext
];
#undef o_glview
}
-
(
id
)
initWithVout
:
(
vout_thread_t
*
)
vout
{
p_vout
=
vout
;
...
...
modules/gui/macosx/voutqt.m
View file @
74fd152d
...
...
@@ -46,13 +46,13 @@
/*****************************************************************************
* VLCView interface
*****************************************************************************/
@interface
VLCQTView
:
NSQuickDrawView
@interface
VLCQTView
:
NSQuickDrawView
<
VLCVoutViewResetting
>
{
vout_thread_t
*
p_vout
;
}
+
(
void
)
resetVout
:
(
vout_thread_t
*
)
p_vout
;
-
(
id
)
initWithVout
:(
vout_thread_t
*
)
p_vout
;
@end
struct
vout_sys_t
...
...
@@ -479,74 +479,12 @@ static int CoToggleFullscreen( vout_thread_t *p_vout )
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
QTDestroySequence
(
p_vout
);
if
(
!
p_vout
->
b_fullscreen
)
{
if
(
!
p_vout
->
p_sys
->
b_embedded
)
{
/* Save window size and position */
p_vout
->
p_sys
->
s_frame
.
size
=
[
p_vout
->
p_sys
->
o_vout_view
frame
].
size
;
p_vout
->
p_sys
->
s_frame
.
origin
=
[[
p_vout
->
p_sys
->
o_vout_view
getWindow
]
frame
].
origin
;
p_vout
->
p_sys
->
b_saved_frame
=
VLC_TRUE
;
}
else
{
var_DelCallback
(
p_vout
->
p_libvlc
,
"drawableredraw"
,
DrawableRedraw
,
p_vout
);
DisposeRgn
(
p_vout
->
p_sys
->
clip_mask
);
}
}
[
p_vout
->
p_sys
->
o_vout_view
closeVout
];
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
if
(
p_vout
->
b_fullscreen
||
!
p_vout
->
p_sys
->
b_embedded
)
{
Rect
s_rect
;
p_vout
->
p_sys
->
clip_mask
=
NULL
;
#define o_qtview p_vout->p_sys->o_qtview
o_qtview
=
[[
VLCQTView
alloc
]
initWithVout
:
p_vout
];
[
o_qtview
autorelease
];
if
(
p_vout
->
p_sys
->
b_saved_frame
)
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_qtview
frame:
&
p_vout
->
p_sys
->
s_frame
];
}
else
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_qtview
frame
:
nil
];
}
/* Retrieve the QuickDraw port */
[
o_qtview
lockFocus
];
p_vout
->
p_sys
->
p_qdport
=
[
o_qtview
qdPort
];
[
o_qtview
unlockFocus
];
#undef o_qtview
GetPortBounds
(
p_vout
->
p_sys
->
p_qdport
,
&
s_rect
);
p_vout
->
p_sys
->
i_origx
=
s_rect
.
left
;
p_vout
->
p_sys
->
i_origy
=
s_rect
.
top
;
p_vout
->
p_sys
->
i_width
=
s_rect
.
right
-
s_rect
.
left
;
p_vout
->
p_sys
->
i_height
=
s_rect
.
bottom
-
s_rect
.
top
;
}
if
(
p_vout
->
b_fullscreen
)
[
p_vout
->
p_sys
->
o_vout_view
enterFullscreen
];
else
{
/* Create the clipping mask */
p_vout
->
p_sys
->
clip_mask
=
NewRgn
();
UpdateEmbeddedGeometry
(
p_vout
);
var_AddCallback
(
p_vout
->
p_libvlc
,
"drawableredraw"
,
DrawableRedraw
,
p_vout
);
}
QTScaleMatrix
(
p_vout
);
if
(
QTCreateSequence
(
p_vout
)
)
{
msg_Err
(
p_vout
,
"unable to initialize QT: QTCreateSequence failed"
);
return
(
1
);
}
[
p_vout
->
p_sys
->
o_vout_view
leaveFullscreen
];
[
o_pool
release
];
return
0
;
...
...
@@ -862,6 +800,76 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/
@implementation
VLCQTView
/* This function will reset the o_vout_view. It's useful to go fullscreen. */
+
(
void
)
resetVout
:
(
vout_thread_t
*
)
p_vout
{
QTDestroySequence
(
p_vout
);
if
(
p_vout
->
b_fullscreen
)
{
if
(
!
p_vout
->
p_sys
->
b_embedded
)
{
/* Save window size and position */
p_vout
->
p_sys
->
s_frame
.
size
=
[
p_vout
->
p_sys
->
o_vout_view
frame
].
size
;
p_vout
->
p_sys
->
s_frame
.
origin
=
[[
p_vout
->
p_sys
->
o_vout_view
getWindow
]
frame
].
origin
;
p_vout
->
p_sys
->
b_saved_frame
=
VLC_TRUE
;
}
else
{
var_DelCallback
(
p_vout
->
p_libvlc
,
"drawableredraw"
,
DrawableRedraw
,
p_vout
);
DisposeRgn
(
p_vout
->
p_sys
->
clip_mask
);
}
}
if
(
p_vout
->
b_fullscreen
||
!
p_vout
->
p_sys
->
b_embedded
)
{
Rect
s_rect
;
p_vout
->
p_sys
->
clip_mask
=
NULL
;
#define o_qtview p_vout->p_sys->o_qtview
o_qtview
=
[[
VLCQTView
alloc
]
initWithVout
:
p_vout
];
[
o_qtview
autorelease
];
if
(
p_vout
->
p_sys
->
b_saved_frame
)
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_qtview
frame:
&
p_vout
->
p_sys
->
s_frame
];
}
else
{
p_vout
->
p_sys
->
o_vout_view
=
[
VLCVoutView
getVoutView
:
p_vout
subView:
o_qtview
frame
:
nil
];
}
/* Retrieve the QuickDraw port */
[
o_qtview
lockFocus
];
p_vout
->
p_sys
->
p_qdport
=
[
o_qtview
qdPort
];
[
o_qtview
unlockFocus
];
#undef o_qtview
GetPortBounds
(
p_vout
->
p_sys
->
p_qdport
,
&
s_rect
);
p_vout
->
p_sys
->
i_origx
=
s_rect
.
left
;
p_vout
->
p_sys
->
i_origy
=
s_rect
.
top
;
p_vout
->
p_sys
->
i_width
=
s_rect
.
right
-
s_rect
.
left
;
p_vout
->
p_sys
->
i_height
=
s_rect
.
bottom
-
s_rect
.
top
;
}
else
{
/* Create the clipping mask */
p_vout
->
p_sys
->
clip_mask
=
NewRgn
();
UpdateEmbeddedGeometry
(
p_vout
);
var_AddCallback
(
p_vout
->
p_libvlc
,
"drawableredraw"
,
DrawableRedraw
,
p_vout
);
}
QTScaleMatrix
(
p_vout
);
if
(
QTCreateSequence
(
p_vout
)
)
{
msg_Err
(
p_vout
,
"unable to initialize QT: QTCreateSequence failed"
);
return
;
}
}
-
(
id
)
initWithVout
:(
vout_thread_t
*
)
_p_vout
{
p_vout
=
_p_vout
;
...
...
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