Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
09b400c4
Commit
09b400c4
authored
Apr 30, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mozilla: cleanup
parent
d42e4f90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
12 deletions
+45
-12
projects/mozilla/vlcshell.cpp
projects/mozilla/vlcshell.cpp
+45
-12
No files found.
projects/mozilla/vlcshell.cpp
View file @
09b400c4
...
...
@@ -362,9 +362,14 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
/* we should probably show a splash screen here */
return
NPERR_NO_ERROR
;
}
#if defined(XP_UNIX) && !defined(__APPLE__)
control
=
p_plugin
->
getControlWindow
();
#endif
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_instance_t
*
p_vlc
=
p_plugin
->
getVLC
();
/*
...
...
@@ -386,7 +391,10 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
if
(
!
curwin
.
window
||
drawable
!=
(((
NP_Port
*
)
(
curwin
.
window
))
->
port
)
)
{
/* set/change parent window */
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
drawable
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
drawable
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
}
/* as MacOS X video output is windowless, set viewport */
...
...
@@ -401,13 +409,17 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
view
.
left
=
((
NP_Port
*
)
(
window
->
window
))
->
portx
;
view
.
bottom
=
window
->
height
+
view
.
top
;
view
.
right
=
window
->
width
+
view
.
left
;
/* clipRect coordinates are also relative to GrafPort */
clip
.
top
=
window
->
clipRect
.
top
;
clip
.
left
=
window
->
clipRect
.
left
;
clip
.
bottom
=
window
->
clipRect
.
bottom
;
clip
.
right
=
window
->
clipRect
.
right
;
libvlc_video_set_viewport
(
p_vlc
,
&
view
,
&
clip
,
NULL
);
libvlc_video_set_viewport
(
p_vlc
,
&
view
,
&
clip
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
/* remember new window */
p_plugin
->
setWindow
(
*
window
);
...
...
@@ -415,7 +427,12 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
else
if
(
curwin
.
window
)
{
/* change/set parent */
libvlc_video_set_parent
(
p_vlc
,
0
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
0
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
curwin
.
window
=
NULL
;
}
#endif
/* XP_MACOSX */
...
...
@@ -449,7 +466,10 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
SetWindowLong
((
HWND
)
drawable
,
GWL_STYLE
,
style
);
/* change/set parent */
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
drawable
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
drawable
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
/* remember new window */
p_plugin
->
setWindow
(
*
window
);
...
...
@@ -459,14 +479,19 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
UpdateWindow
(
(
HWND
)
drawable
);
}
}
else
if
(
curwin
.
window
)
else
if
(
curwin
.
window
)
{
/* reset WNDPROC */
HWND
oldwin
=
(
HWND
)
curwin
.
window
;
SetWindowLong
(
oldwin
,
GWL_WNDPROC
,
(
LONG
)(
p_plugin
->
getWindowProc
())
);
p_plugin
->
setWindowProc
(
NULL
);
/* change/set parent */
libvlc_video_set_parent
(
p_vlc
,
0
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
0
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
curwin
.
window
=
NULL
;
}
#endif
/* XP_WIN */
...
...
@@ -520,8 +545,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
/*
libvlc_media_player_t *p_md;
libvlc_exception_t ex;
libvlc_exception_init(& ex );
p_md = p_plugin->getMD( &ex );
libvlc_exception_clear( &ex );
libvlc_event_attach( libvlc_media_player_event_manager( p_md, &ex ),
...
...
@@ -529,12 +552,19 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
*/
/* set/change parent window */
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
video
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
video
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
/* remember window */
p_plugin
->
setWindow
(
*
window
);
p_plugin
->
setVideoWindow
(
video
);
if
(
controls
)
{
p_plugin
->
setControlWindow
(
controls
);
}
if
(
controls
)
{
p_plugin
->
setControlWindow
(
controls
);
}
Redraw
(
w
,
(
XtPointer
)
p_plugin
,
NULL
);
...
...
@@ -545,10 +575,13 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
}
}
}
else
if
(
curwin
.
window
)
else
if
(
curwin
.
window
)
{
/* change/set parent */
libvlc_video_set_parent
(
p_vlc
,
0
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
0
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
fprintf
(
stderr
,
"Exception: %s
\n
"
,
libvlc_exception_get_message
(
&
ex
)
);
libvlc_exception_clear
(
&
ex
);
curwin
.
window
=
NULL
;
}
#endif
/* XP_UNIX */
...
...
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