Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
773b8f68
Commit
773b8f68
authored
Oct 24, 2005
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: Post a CmdResizeVout command when the vout size changes
(this command does nothing at the moment ;)
parent
4a3274fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
1 deletion
+78
-1
modules/gui/skins2/commands/cmd_resize.cpp
modules/gui/skins2/commands/cmd_resize.cpp
+17
-0
modules/gui/skins2/commands/cmd_resize.hpp
modules/gui/skins2/commands/cmd_resize.hpp
+22
-0
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+39
-1
No files found.
modules/gui/skins2/commands/cmd_resize.cpp
View file @
773b8f68
...
...
@@ -39,3 +39,20 @@ void CmdResize::execute()
// Resize the layout
m_rLayout
.
resize
(
m_width
,
m_height
);
}
CmdResizeVout
::
CmdResizeVout
(
intf_thread_t
*
pIntf
,
void
*
pWindow
,
int
width
,
int
height
)
:
CmdGeneric
(
pIntf
),
m_pWindow
(
pWindow
),
m_width
(
width
),
m_height
(
height
)
{
}
void
CmdResizeVout
::
execute
()
{
// TODO
msg_Dbg
(
getIntf
(),
"New vout size requested: %d x %d"
,
m_width
,
m_height
);
}
modules/gui/skins2/commands/cmd_resize.hpp
View file @
773b8f68
...
...
@@ -50,4 +50,26 @@ class CmdResize: public CmdGeneric
int
m_width
,
m_height
;
};
/// Command to resize the vout window
class
CmdResizeVout
:
public
CmdGeneric
{
public:
/// Resize the given layout
CmdResizeVout
(
intf_thread_t
*
pIntf
,
void
*
pWindow
,
int
width
,
int
height
);
virtual
~
CmdResizeVout
()
{}
/// This method does the real job of the command
virtual
void
execute
();
/// Return the type of the command
virtual
string
getType
()
const
{
return
"resize vout"
;
}
private:
void
*
m_pWindow
;
int
m_width
,
m_height
;
};
#endif
modules/gui/skins2/src/vlcproc.cpp
View file @
773b8f68
...
...
@@ -35,6 +35,7 @@
#include "../commands/cmd_change_skin.hpp"
#include "../commands/cmd_show_window.hpp"
#include "../commands/cmd_quit.hpp"
#include "../commands/cmd_resize.hpp"
#include "../commands/cmd_vars.hpp"
#include "../utils/var_bool.hpp"
...
...
@@ -454,7 +455,15 @@ void *VlcProc::getWindow( intf_thread_t *pIntf, vout_thread_t *pVout,
}
else
{
return
*
pThis
->
m_handleSet
.
begin
();
// Get the window handle
void
*
pWindow
=
*
pThis
->
m_handleSet
.
begin
();
// Post a resize vout command
CmdResizeVout
*
pCmd
=
new
CmdResizeVout
(
pThis
->
getIntf
(),
pWindow
,
*
pWidthHint
,
*
pHeightHint
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
pThis
->
getIntf
()
);
pQueue
->
remove
(
"resize vout"
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
return
pWindow
;
}
}
...
...
@@ -469,6 +478,35 @@ void VlcProc::releaseWindow( intf_thread_t *pIntf, void *pWindow )
int
VlcProc
::
controlWindow
(
intf_thread_t
*
pIntf
,
void
*
pWindow
,
int
query
,
va_list
args
)
{
VlcProc
*
pThis
=
pIntf
->
p_sys
->
p_vlcProc
;
switch
(
query
)
{
case
VOUT_SET_ZOOM
:
{
double
fArg
=
va_arg
(
args
,
double
);
if
(
pThis
->
m_pVout
)
{
// Compute requested vout dimensions
int
width
=
(
int
)(
pThis
->
m_pVout
->
i_window_width
*
fArg
);
int
height
=
(
int
)(
pThis
->
m_pVout
->
i_window_height
*
fArg
);
// Post a resize vout command
CmdResizeVout
*
pCmd
=
new
CmdResizeVout
(
pThis
->
getIntf
(),
pWindow
,
width
,
height
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
pThis
->
getIntf
()
);
pQueue
->
remove
(
"resize vout"
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
}
}
default:
msg_Dbg
(
pIntf
,
"control query not supported"
);
break
;
}
return
VLC_SUCCESS
;
}
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