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
cac0b715
Commit
cac0b715
authored
Dec 13, 2004
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/vout*.m: factorized some more code, fixed GL video device selection
parent
f046e3c3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
107 deletions
+54
-107
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+52
-2
modules/gui/macosx/voutgl.m
modules/gui/macosx/voutgl.m
+2
-54
modules/gui/macosx/voutqt.m
modules/gui/macosx/voutqt.m
+0
-51
No files found.
modules/gui/macosx/vout.m
View file @
cac0b715
...
...
@@ -69,8 +69,58 @@
NSScreen
*
o_screen
;
vlc_bool_t
b_main_screen
;
var_Create
(
p_vout
,
"macosx-vdev"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-fill"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-stretch"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-opaqueness"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
/* Setup the menuitem for the multiple displays. Read the vlc preference (macosx-vdev) for the primary display */
NSArray
*
o_screens
=
[
NSScreen
screens
];
if
(
[
o_screens
count
]
>
0
&&
var_Type
(
p_real_vout
,
"video-device"
)
==
0
)
{
int
i
=
1
;
vlc_value_t
val
,
val2
,
text
;
NSScreen
*
o_screen
;
var_Get
(
p_real_vout
,
"macosx-vdev"
,
&
val
);
var_Create
(
p_real_vout
,
"video-device"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
);
text
.
psz_string
=
_
(
"Video device"
);
var_Change
(
p_real_vout
,
"video-device"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
NSEnumerator
*
o_enumerator
=
[
o_screens
objectEnumerator
];
while
(
(
o_screen
=
[
o_enumerator
nextObject
])
!=
NULL
)
{
char
psz_temp
[
255
];
NSRect
s_rect
=
[
o_screen
frame
];
snprintf
(
psz_temp
,
sizeof
(
psz_temp
)
/
sizeof
(
psz_temp
[
0
])
-
1
,
"%s %d (%dx%d)"
,
_
(
"Screen"
),
i
,
(
int
)
s_rect
.
size
.
width
,
(
int
)
s_rect
.
size
.
height
);
text
.
psz_string
=
psz_temp
;
val2
.
i_int
=
i
;
var_Change
(
p_real_vout
,
"video-device"
,
VLC_VAR_ADDCHOICE
,
&
val2
,
&
text
);
if
(
(
i
-
1
)
==
val
.
i_int
)
{
var_Set
(
p_real_vout
,
"video-device"
,
val2
);
}
i
++
;
}
var_AddCallback
(
p_real_vout
,
"video-device"
,
vout_VarCallback
,
NULL
);
val2
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_real_vout
,
"intf-change"
,
val2
);
}
/* Find out on which screen to open the window */
int
i_device
=
var_GetInteger
(
p_vout
,
"video-device"
);
int
i_device
=
var_GetInteger
(
p_
real_
vout
,
"video-device"
);
if
(
i_device
<
0
)
{
/* No preference specified. Use the main screen */
...
...
@@ -90,7 +140,7 @@
{
i_device
--
;
o_screen
=
[
o_screens
objectAtIndex
:
i_device
];
var_SetInteger
(
p_vout
,
"macosx-vdev"
,
i_device
);
var_SetInteger
(
p_
real_
vout
,
"macosx-vdev"
,
i_device
);
b_main_screen
=
(
i_device
==
0
);
}
}
...
...
modules/gui/macosx/voutgl.m
View file @
cac0b715
/*****************************************************************************
* vout
.m: MacOS X video output module
* vout
gl.m: MacOS X OpenGL provider
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m 8351 2004-08-02 13:06:38Z hartman $
...
...
@@ -60,7 +60,7 @@ struct vout_sys_t
VLCGLView
*
o_glview
;
vlc_bool_t
b_saved_frame
;
NSRect
s_frame
;
vlc_bool_t
*
b_got_frame
;
vlc_bool_t
b_got_frame
;
};
/*****************************************************************************
...
...
@@ -77,7 +77,6 @@ int E_(OpenVideoGL) ( vlc_object_t * p_this )
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
int
i_timeout
;
vlc_value_t
val
;
/* OpenGL interface disabled until
* - the green line is gone
...
...
@@ -122,59 +121,8 @@ int E_(OpenVideoGL) ( vlc_object_t * p_this )
p_vout
->
pf_control
=
Control
;
p_vout
->
pf_swap
=
Swap
;
p_vout
->
p_sys
->
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
var_Create
(
p_vout
,
"macosx-vdev"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-fill"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-stretch"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-opaqueness"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
/* Setup the menuitem for the multiple displays. Read the vlc preference (macosx-vdev) for the primary display */
NSArray
*
o_screens
=
[
NSScreen
screens
];
if
(
[
o_screens
count
]
>
0
&&
var_Type
(
p_vout
,
"video-device"
)
==
0
)
{
int
i
=
1
;
vlc_value_t
val2
,
text
;
NSScreen
*
o_screen
;
var_Get
(
p_vout
,
"macosx-vdev"
,
&
val
);
var_Create
(
p_vout
,
"video-device"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
);
text
.
psz_string
=
_
(
"Video device"
);
var_Change
(
p_vout
,
"video-device"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
NSEnumerator
*
o_enumerator
=
[
o_screens
objectEnumerator
];
while
(
(
o_screen
=
[
o_enumerator
nextObject
])
!=
NULL
)
{
char
psz_temp
[
255
];
NSRect
s_rect
=
[
o_screen
frame
];
snprintf
(
psz_temp
,
sizeof
(
psz_temp
)
/
sizeof
(
psz_temp
[
0
])
-
1
,
"%s %d (%dx%d)"
,
_
(
"Screen"
),
i
,
(
int
)
s_rect
.
size
.
width
,
(
int
)
s_rect
.
size
.
height
);
text
.
psz_string
=
psz_temp
;
val2
.
i_int
=
i
;
var_Change
(
p_vout
,
"video-device"
,
VLC_VAR_ADDCHOICE
,
&
val2
,
&
text
);
if
(
(
i
-
1
)
==
val
.
i_int
)
{
var_Set
(
p_vout
,
"video-device"
,
val2
);
}
i
++
;
}
var_AddCallback
(
p_vout
,
"video-device"
,
vout_VarCallback
,
NULL
);
val2
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"intf-change"
,
val2
);
}
/* Spawn window */
p_vout
->
p_sys
->
b_got_frame
=
VLC_FALSE
;
p_vout
->
p_sys
->
o_window
=
[[
VLCWindow
alloc
]
initWithVout
:
p_vout
...
...
modules/gui/macosx/voutqt.m
View file @
cac0b715
...
...
@@ -106,7 +106,6 @@ static void QTFreePicture ( vout_thread_t *, picture_t * );
int
E_
(
OpenVideoQT
)
(
vlc_object_t
*
p_this
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vlc_value_t
val
;
OSErr
err
;
int
i_timeout
;
...
...
@@ -145,11 +144,6 @@ int E_(OpenVideoQT) ( vlc_object_t *p_this )
p_vout
->
p_sys
->
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
var_Create
(
p_vout
,
"macosx-vdev"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-fill"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-stretch"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_vout
,
"macosx-opaqueness"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
p_vout
->
p_sys
->
b_altivec
=
p_vout
->
p_libvlc
->
i_cpu
&
CPU_CAPABILITY_ALTIVEC
;
msg_Dbg
(
p_vout
,
"We do%s have Altivec"
,
p_vout
->
p_sys
->
b_altivec
?
""
:
"n't"
);
...
...
@@ -210,51 +204,6 @@ int E_(OpenVideoQT) ( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
/* Setup the menuitem for the multiple displays. Read the vlc preference (macosx-vdev) for the primary display */
NSArray
*
o_screens
=
[
NSScreen
screens
];
if
(
[
o_screens
count
]
>
0
&&
var_Type
(
p_vout
,
"video-device"
)
==
0
)
{
int
i
=
1
;
vlc_value_t
val2
,
text
;
NSScreen
*
o_screen
;
var_Get
(
p_vout
,
"macosx-vdev"
,
&
val
);
var_Create
(
p_vout
,
"video-device"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
);
text
.
psz_string
=
_
(
"Video device"
);
var_Change
(
p_vout
,
"video-device"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
NSEnumerator
*
o_enumerator
=
[
o_screens
objectEnumerator
];
while
(
(
o_screen
=
[
o_enumerator
nextObject
])
!=
NULL
)
{
char
psz_temp
[
255
];
NSRect
s_rect
=
[
o_screen
frame
];
snprintf
(
psz_temp
,
sizeof
(
psz_temp
)
/
sizeof
(
psz_temp
[
0
])
-
1
,
"%s %d (%dx%d)"
,
_
(
"Screen"
),
i
,
(
int
)
s_rect
.
size
.
width
,
(
int
)
s_rect
.
size
.
height
);
text
.
psz_string
=
psz_temp
;
val2
.
i_int
=
i
;
var_Change
(
p_vout
,
"video-device"
,
VLC_VAR_ADDCHOICE
,
&
val2
,
&
text
);
if
(
(
i
-
1
)
==
val
.
i_int
)
{
var_Set
(
p_vout
,
"video-device"
,
val2
);
}
i
++
;
}
var_AddCallback
(
p_vout
,
"video-device"
,
vout_VarCallback
,
NULL
);
val2
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"intf-change"
,
val2
);
}
/* Spawn window */
p_vout
->
p_sys
->
o_window
=
[[
VLCWindow
alloc
]
initWithVout
:
p_vout
frame
:
nil
];
...
...
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