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
7b489339
Commit
7b489339
authored
Mar 31, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Fullscreen toggle to the MprisVersion 2.0 implementation.
parent
46fb5ca4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
26 deletions
+81
-26
include/vlc_vout.h
include/vlc_vout.h
+3
-2
modules/control/dbus.c
modules/control/dbus.c
+41
-9
modules/control/dbus.h
modules/control/dbus.h
+9
-7
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+28
-8
No files found.
include/vlc_vout.h
View file @
7b489339
...
...
@@ -741,6 +741,7 @@ enum output_query_e
VOUT_SET_STAY_ON_TOP
,
/* arg1= bool res= */
VOUT_SET_VIEWPORT
,
/* arg1= view rect, arg2=clip rect, res= */
VOUT_REDRAW_RECT
,
/* arg1= area rect, res= */
VOUT_SET_POSITION
,
/* arg1= unsigned int, arg2= unsigned int, res= */
};
/**@}*/
...
...
modules/control/dbus.c
View file @
7b489339
...
...
@@ -1158,7 +1158,7 @@ DBUS_METHOD( TransparentTeletext )
i_ret
=
var_SetInteger
(
p_vbi
,
"vbi-page"
,
var_GetInteger
(
p_vbi
,
"vbi-page"
)
);
if
(
i_ret
<
0
)
b_transparent
=
false
;
b_transparent
=
FALSE
;
}
else
{
...
...
@@ -1166,7 +1166,7 @@ DBUS_METHOD( TransparentTeletext )
i_ret
=
var_SetBool
(
p_vbi
,
"vbi-opaque"
,
!
var_GetBool
(
p_vbi
,
"vbi-opaque"
)
);
if
(
i_ret
<
0
)
b_transparent
=
false
;
b_transparent
=
FALSE
;
}
vlc_object_release
(
p_vbi
);
}
...
...
@@ -1257,9 +1257,9 @@ DBUS_METHOD( GetVideoPosition )
i_x
=
var_GetInteger
(
p_vout
,
"video-x"
);
i_y
=
var_GetInteger
(
p_vout
,
"video-y"
);
i_width
=
var_GetInteger
(
p_vout
,
"width"
);
i
_width
=
(
i_width
==
-
1
)
?
p_vout
->
i_window_width
:
i
_width
;
i
f
(
i_width
==
-
1
)
i_width
=
p_vout
->
i_window
_width
;
i_height
=
var_GetInteger
(
p_vout
,
"height"
);
i
_height
=
(
i_height
==
-
1
)
?
p_vout
->
i_window_height
:
i
_height
;
i
f
(
i_height
==
-
1
)
i_height
=
p_vout
->
i_window
_height
;
vlc_object_release
(
p_vout
);
}
vlc_object_release
(
p_input
);
...
...
@@ -1310,16 +1310,22 @@ DBUS_METHOD( SetVideoPosition )
p_vout
=
input_GetVout
(
p_input
);
if
(
p_vout
)
{
int
i_ret
;
var_SetInteger
(
p_vout
,
"video-x"
,
i_x
);
var_SetInteger
(
p_vout
,
"video-y"
,
i_y
);
i_ret
=
vout_Control
(
p_vout
,
VOUT_SET_POSITION
,
i_x
,
i_y
);
if
(
i_ret
>=
0
)
{
var_SetInteger
(
p_vout
,
"width"
,
i_width
);
var_SetInteger
(
p_vout
,
"height"
,
i_height
);
int
i_ret
=
vout_Control
(
p_vout
,
VOUT_SET_SIZE
,
i_width
,
i_height
);
i_ret
=
vout_Control
(
p_vout
,
VOUT_SET_SIZE
,
i_width
,
i_height
);
if
(
i_ret
>=
0
)
{
i_success
=
0
;
}
}
vlc_object_release
(
p_vout
);
}
vlc_object_release
(
p_input
);
...
...
@@ -1330,6 +1336,31 @@ DBUS_METHOD( SetVideoPosition )
REPLY_SEND
;
}
DBUS_METHOD
(
Fullscreen
)
{
REPLY_INIT
;
DBusError
error
;
playlist_t
*
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
vout_thread_t
*
p_vout
;
p_vout
=
input_GetVout
(
p_input
);
if
(
p_vout
)
{
bool
b_fullscreen
=
var_GetBool
(
p_vout
,
"fullscreen"
);
var_SetBool
(
p_vout
,
"fullscreen"
,
!
b_fullscreen
);
vlc_object_release
(
p_vout
);
}
vlc_object_release
(
p_input
);
}
pl_Release
(
(
vlc_object_t
*
)
p_this
);
REPLY_SEND
;
}
/*****************************************************************************
* Introspection method
*****************************************************************************/
...
...
@@ -1488,6 +1519,7 @@ DBUS_METHOD( handle_display )
METHOD_FUNC
(
"GetVideoPosition"
,
GetVideoPosition
);
METHOD_FUNC
(
"SetVideoPosition"
,
SetVideoPosition
);
METHOD_FUNC
(
"Fullscreen"
,
Fullscreen
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
...
...
modules/control/dbus.h
View file @
7b489339
...
...
@@ -296,6 +296,8 @@ const char* psz_introspection_xml_data_display =
" <arg type=
\"
(iiii)
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
Fullscreen
\"
>
\n
"
" </method>
\n
"
" </interface>
\n
"
"</node>
\n
"
;
...
...
modules/video_output/x11/xcommon.c
View file @
7b489339
...
...
@@ -170,8 +170,6 @@ static void DisablePixelDoubling( vout_thread_t *p_vout );
static
const
int
i_backlight_on_interval
=
300
;
#endif
/*****************************************************************************
* Activate: allocate X11 video thread output method
*****************************************************************************
...
...
@@ -185,7 +183,7 @@ int Activate ( vlc_object_t *p_this )
char
*
psz_display
;
vlc_value_t
val
;
#if defined(MODULE_NAME_IS_xvmc)
char
*
psz_value
;
char
*
psz_value
;
#endif
#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
char
*
psz_chroma
;
...
...
@@ -3130,7 +3128,7 @@ static void SetPalette( vout_thread_t *p_vout,
static
int
Control
(
vout_thread_t
*
p_vout
,
int
i_query
,
va_list
args
)
{
bool
b_arg
;
unsigned
int
i_width
,
i_height
;
unsigned
int
i_
x
,
i_y
,
i_
width
,
i_height
;
switch
(
i_query
)
{
...
...
@@ -3171,6 +3169,28 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
#endif
return
VLC_SUCCESS
;
case
VOUT_SET_POSITION
:
if
(
p_vout
->
p_sys
->
p_win
->
owner_window
)
return
vout_ControlWindow
(
p_vout
->
p_sys
->
p_win
->
owner_window
,
i_query
,
args
);
i_x
=
va_arg
(
args
,
unsigned
int
);
i_y
=
va_arg
(
args
,
unsigned
int
);
if
(
!
i_x
)
i_x
=
p_vout
->
p_sys
->
p_win
->
i_x
;
if
(
!
i_y
)
i_y
=
p_vout
->
p_sys
->
p_win
->
i_x
;
#ifdef MODULE_NAME_IS_xvmc
xvmc_context_reader_lock
(
&
p_vout
->
p_sys
->
xvmc_lock
);
#endif
/* Update dimensions */
XMoveWindow
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
p_win
->
base_window
,
i_x
,
i_y
);
#ifdef MODULE_NAME_IS_xvmc
xvmc_context_reader_unlock
(
&
p_vout
->
p_sys
->
xvmc_lock
);
#endif
return
VLC_SUCCESS
;
default:
return
VLC_EGENERIC
;
}
...
...
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