Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7419fda4
Commit
7419fda4
authored
Aug 27, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlcplugin.cpp: removed hardcoded path
npmac.cpp: OSX Intel patch by Charles Duffy vlcshell.cpp: fixed X11
parent
8f8bdcb5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
39 deletions
+29
-39
mozilla/support/npmac.cpp
mozilla/support/npmac.cpp
+1
-1
mozilla/vlcplugin.cpp
mozilla/vlcplugin.cpp
+0
-3
mozilla/vlcplugin.h
mozilla/vlcplugin.h
+0
-2
mozilla/vlcshell.cpp
mozilla/vlcshell.cpp
+28
-33
No files found.
mozilla/support/npmac.cpp
View file @
7419fda4
...
...
@@ -94,7 +94,7 @@
#endif
#if
def XP_MACOSX && !TARGET_RT_MAC_CFM
#if
defined(XP_MACOSX) && defined(__POWERPC__) && (!defined(TARGET_RT_MAC_CFM))
// glue for mapping outgoing Macho function pointers to TVectors
struct
TFPtoTVGlue
{
...
...
mozilla/vlcplugin.cpp
View file @
7419fda4
...
...
@@ -99,9 +99,6 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
RegCloseKey
(
h_key
);
}
ppsz_argv
[
ppsz_argc
++
]
=
"--no-one-instance"
;
#if 1
ppsz_argv
[
0
]
=
"F:
\\
Cygwin
\\
home
\\
Damien
\\
dev
\\
videolan
\\
vlc-trunk
\\
vlc"
;
#endif
#endif
/* XP_MACOSX */
...
...
mozilla/vlcplugin.h
View file @
7419fda4
...
...
@@ -38,7 +38,6 @@
#undef XP_UNIX
#endif
#if 0
#ifdef XP_WIN
/* Windows stuff */
#endif
...
...
@@ -54,7 +53,6 @@
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
#endif
#endif
class
VlcPlugin
{
...
...
mozilla/vlcshell.cpp
View file @
7419fda4
...
...
@@ -51,8 +51,6 @@
* Unix-only declarations
******************************************************************************/
#ifdef XP_UNIX
# define VOUT_PLUGINS "xvideo,x11,dummy"
# define AOUT_PLUGINS "esd,arts,alsa,oss,dummy"
static
void
Redraw
(
Widget
w
,
XtPointer
closure
,
XEvent
*
event
);
static
void
Resize
(
Widget
w
,
XtPointer
closure
,
XEvent
*
event
);
...
...
@@ -63,16 +61,12 @@ static void Resize( Widget w, XtPointer closure, XEvent *event );
* MacOS-only declarations
******************************************************************************/
#ifdef XP_MACOSX
# define VOUT_PLUGINS "opengl,macosx,dummy"
# define AOUT_PLUGINS "auhal,macosx,dummy"
#endif
/*****************************************************************************
* Windows-only declarations
*****************************************************************************/
#ifdef XP_WIN
# define VOUT_PLUGINS "directx,wingdi,dummy"
# define AOUT_PLUGINS "directx,waveout,dummy"
static
LRESULT
CALLBACK
Manage
(
HWND
p_hwnd
,
UINT
i_msg
,
WPARAM
wpar
,
LPARAM
lpar
);
...
...
@@ -311,18 +305,17 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
* size changes, etc.
*/
libvlc_drawable_t
drawable
;
const
NPWindow
*
curwin
=
p_plugin
->
getWindow
();
#ifdef XP_MACOSX
if
(
window
&&
window
->
window
)
{
/* check if plugin has a new parent window */
drawable
=
(
libvlc_drawable_t
)
(((
NP_Port
*
)
(
window
->
window
))
->
port
);
if
(
!
curwin
->
window
||
drawable
!=
(
libvlc_drawable_t
)(
((
NP_Port
*
)
(
curwin
->
window
))
->
port
)
)
CGrafPtr
drawable
=
(((
NP_Port
*
)
(
window
->
window
))
->
port
);
if
(
!
curwin
->
window
||
drawable
!=
(((
NP_Port
*
)
(
curwin
->
window
))
->
port
)
)
{
/* set/change parent window */
libvlc_video_set_parent
(
p_vlc
,
drawable
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
drawable
,
NULL
);
}
/* as MacOS X video output is windowless, set viewport */
...
...
@@ -354,9 +347,8 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
if
(
window
&&
window
->
window
)
{
/* check if plugin has a new parent window */
/* FIXME: this cast sucks */
drawable
=
(
libvlc_drawable_t
)
(
HWND
)
(
window
->
window
);
if
(
!
curwin
->
window
||
drawable
!=
(
libvlc_drawable_t
)(
HWND
)
(
curwin
->
window
)
)
HWND
drawable
=
(
HWND
)
(
window
->
window
);
if
(
!
curwin
->
window
||
drawable
!=
curwin
->
window
)
{
/* reset previous window settings */
HWND
oldwin
=
(
HWND
)
p_plugin
->
getWindow
()
->
window
;
...
...
@@ -367,7 +359,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
SetWindowLong
(
oldwin
,
GWL_WNDPROC
,
(
LONG
)
oldproc
);
}
/* install our WNDPROC */
p_plugin
->
setWindowProc
(
(
WNDPROC
)
SetWindowLong
(
(
HWND
)
drawable
,
p_plugin
->
setWindowProc
(
(
WNDPROC
)
SetWindowLong
(
drawable
,
GWL_WNDPROC
,
(
LONG
)
Manage
)
);
/* attach our plugin object */
...
...
@@ -379,7 +371,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
SetWindowLong
((
HWND
)
drawable
,
GWL_STYLE
,
style
);
/* change/set parent */
libvlc_video_set_parent
(
p_vlc
,
drawable
,
NULL
);
libvlc_video_set_parent
(
p_vlc
,
(
libvlc_drawable_t
)
drawable
,
NULL
);
}
/* remember window details */
...
...
@@ -403,11 +395,13 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
#ifdef XP_UNIX
if
(
window
&&
window
->
window
)
{
Window
win
=
(
Window
)
window
->
window
;
Window
drawable
=
(
Window
)
window
->
window
;
if
(
!
curwin
->
window
||
drawable
!=
(
Window
)
curwin
->
window
)
{
Display
*
p_display
=
((
NPSetWindowCallbackStruct
*
)
window
->
ws_info
)
->
display
;
XResizeWindow
(
p_display
,
win
,
window
->
width
,
window
->
height
);
Widget
w
=
XtWindowToWidget
(
p_display
,
window
);
XResizeWindow
(
p_display
,
drawable
,
window
->
width
,
window
->
height
);
Widget
w
=
XtWindowToWidget
(
p_display
,
drawable
);
XtAddEventHandler
(
w
,
ExposureMask
,
FALSE
,
(
XtEventHandler
)
Redraw
,
p_plugin
);
XtAddEventHandler
(
w
,
StructureNotifyMask
,
FALSE
,
(
XtEventHandler
)
Resize
,
p_plugin
);
...
...
@@ -417,6 +411,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
Redraw
(
w
,
(
XtPointer
)
p_plugin
,
NULL
);
}
}
#endif
/* XP_UNIX */
if
(
!
p_plugin
->
b_stream
)
...
...
@@ -662,19 +657,19 @@ static void Redraw( Widget w, XtPointer closure, XEvent *event )
GC
gc
;
XGCValues
gcv
;
Window
w
=
(
Window
)
window
->
window
;
Window
drawable
=
(
Window
)
window
->
window
;
Display
*
p_display
=
((
NPSetWindowCallbackStruct
*
)
window
->
ws_info
)
->
display
;
gcv
.
foreground
=
BlackPixel
(
p_display
,
0
);
gc
=
XCreateGC
(
p_display
,
w
,
GCForeground
,
&
gcv
);
gc
=
XCreateGC
(
p_display
,
drawable
,
GCForeground
,
&
gcv
);
XFillRectangle
(
p_display
,
w
,
gc
,
XFillRectangle
(
p_display
,
drawable
,
gc
,
0
,
0
,
window
->
width
,
window
->
height
);
gcv
.
foreground
=
WhitePixel
(
p_display
,
0
);
XChangeGC
(
p_display
,
gc
,
GCForeground
,
&
gcv
);
XDrawString
(
p_display
,
w
,
gc
,
XDrawString
(
p_display
,
drawable
,
gc
,
window
->
width
/
2
-
40
,
window
->
height
/
2
,
WINDOW_TEXT
,
strlen
(
WINDOW_TEXT
)
);
...
...
@@ -685,7 +680,7 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
{
VlcPlugin
*
p_plugin
=
reinterpret_cast
<
VlcPlugin
*>
(
closure
);
const
NPWindow
*
window
=
p_plugin
->
getWindow
();
Window
w
=
(
Window
)
window
->
window
;
Window
drawable
=
(
Window
)
window
->
window
;
Display
*
p_display
=
((
NPSetWindowCallbackStruct
*
)
window
->
ws_info
)
->
display
;
int
i_ret
;
...
...
@@ -712,13 +707,13 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
}
i_ret
=
XResizeWindow
(
p_display
,
w
,
window
->
i_width
,
window
->
i_
height
);
i_ret
=
XResizeWindow
(
p_display
,
drawable
,
window
->
width
,
window
->
height
);
#ifdef X11_RESIZE_DEBUG
fprintf
(
stderr
,
"vlcshell::Resize() XResizeWindow(owner) returned %d
\n
"
,
i_ret
);
XGetWindowAttributes
(
p_display
,
w
,
&
attr
);
XGetWindowAttributes
(
p_display
,
drawable
,
&
attr
);
/* X is asynchronous, so the current size reported here is not
necessarily the requested size as the Resize request may not
...
...
@@ -727,7 +722,7 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
attr
.
width
,
attr
.
height
);
#endif
/* X11_RESIZE_DEBUG */
XQueryTree
(
p_display
,
w
,
XQueryTree
(
p_display
,
drawable
,
&
root_return
,
&
parent_return
,
&
children_return
,
&
i_nchildren
);
...
...
@@ -751,7 +746,7 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
"vlcshell::Resize() XResizeWindow(base) returned %d
\n
"
,
i_ret
);
XGetWindowAttributes
(
p_
plugin
->
p_
display
,
base_window
,
&
attr
);
XGetWindowAttributes
(
p_display
,
base_window
,
&
attr
);
fprintf
(
stderr
,
"vlcshell::Resize() new size %d x %d
\n
"
,
attr
.
width
,
attr
.
height
);
...
...
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