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
be262960
Commit
be262960
authored
Jun 14, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup mozilla plugin
parent
aed48363
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
23 deletions
+15
-23
projects/mozilla/control/nporuntime.h
projects/mozilla/control/nporuntime.h
+1
-1
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+7
-6
projects/mozilla/vlcplugin.h
projects/mozilla/vlcplugin.h
+1
-1
projects/mozilla/vlcshell.cpp
projects/mozilla/vlcshell.cpp
+6
-15
No files found.
projects/mozilla/control/nporuntime.h
View file @
be262960
...
...
@@ -129,7 +129,7 @@ protected:
bool
isPluginRunning
()
{
return
_instance
->
pdata
;
return
(
_instance
->
pdata
!=
NULL
)
;
}
template
<
class
T
>
T
*
getPrivate
()
{
...
...
projects/mozilla/vlcplugin.cpp
View file @
be262960
...
...
@@ -216,7 +216,7 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
** this URL is used for making absolute URL from relative URL that may be
** passed as an MRL argument
*/
NPObject
*
plugin
;
NPObject
*
plugin
=
NULL
;
if
(
NPERR_NO_ERROR
==
NPN_GetValue
(
p_browser
,
NPNVWindowNPObject
,
&
plugin
)
)
{
...
...
@@ -236,7 +236,7 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
{
NPString
&
location
=
NPVARIANT_TO_STRING
(
result
);
psz_baseURL
=
static_cast
<
char
*>
(
malloc
(
location
.
utf8length
+
1
)
);
psz_baseURL
=
(
char
*
)
malloc
(
location
.
utf8length
+
1
);
if
(
psz_baseURL
)
{
strncpy
(
psz_baseURL
,
location
.
utf8characters
,
location
.
utf8length
);
...
...
@@ -266,6 +266,7 @@ VlcPlugin::~VlcPlugin()
{
free
(
psz_baseURL
);
free
(
psz_target
);
if
(
libvlc_media_player
)
libvlc_media_player_release
(
libvlc_media_player
);
if
(
libvlc_media_list
)
...
...
@@ -420,9 +421,9 @@ int VlcPlugin::get_fullscreen( libvlc_exception_t *ex )
return
r
;
}
int
VlcPlugin
::
player_has_vout
(
libvlc_exception_t
*
ex
)
bool
VlcPlugin
::
player_has_vout
(
libvlc_exception_t
*
ex
)
{
int
r
=
0
;
bool
r
=
false
;
if
(
playlist_isplaying
(
ex
)
)
r
=
libvlc_media_player_has_vout
(
libvlc_media_player
,
ex
);
return
r
;
...
...
@@ -469,7 +470,7 @@ relativeurl:
if
(
psz_baseURL
)
{
size_t
baseLen
=
strlen
(
psz_baseURL
);
char
*
href
=
static_cast
<
char
*>
(
malloc
(
baseLen
+
strlen
(
url
)
+
1
)
);
char
*
href
=
(
char
*
)
malloc
(
baseLen
+
strlen
(
url
)
+
1
);
if
(
href
)
{
/* prepend base URL */
...
...
projects/mozilla/vlcplugin.h
View file @
be262960
...
...
@@ -193,7 +193,7 @@ public:
void
set_fullscreen
(
int
,
libvlc_exception_t
*
);
int
get_fullscreen
(
libvlc_exception_t
*
);
int
player_has_vout
(
libvlc_exception_t
*
);
bool
player_has_vout
(
libvlc_exception_t
*
);
private:
bool
playlist_select
(
int
,
libvlc_exception_t
*
);
...
...
projects/mozilla/vlcshell.cpp
View file @
be262960
...
...
@@ -52,7 +52,7 @@
/*****************************************************************************
* Unix-only declarations
******************************************************************************/
#if
def XP_UNIX
#if
defined(XP_UNIX)
static
void
Redraw
(
Widget
w
,
XtPointer
closure
,
XEvent
*
event
);
static
void
ControlHandler
(
Widget
w
,
XtPointer
closure
,
XEvent
*
event
);
...
...
@@ -201,20 +201,11 @@ int16 NPP_HandleEvent( NPP instance, void * event )
const
NPWindow
&
npwindow
=
p_plugin
->
getWindow
();
if
(
npwindow
.
window
)
{
int
hasVout
=
FALSE
;
bool
hasVout
=
false
;
if
(
p_plugin
->
playlist_isplaying
(
&
ex
)
)
{
hasVout
=
p_plugin
->
player_has_vout
(
NULL
);
if
(
hasVout
)
{
libvlc_rectangle_t
area
;
area
.
left
=
0
;
area
.
top
=
0
;
area
.
right
=
npwindow
.
width
;
area
.
bottom
=
npwindow
.
height
;
libvlc_video_redraw_rectangle
(
p_plugin
->
getMD
(
&
ex
),
&
area
,
NULL
);
}
}
libvlc_exception_clear
(
&
ex
);
...
...
@@ -344,7 +335,7 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
NPError
NPP_SetWindow
(
NPP
instance
,
NPWindow
*
window
)
{
#if defined(XP_UNIX)
&& !defined(__APPLE__)
#if defined(XP_UNIX)
Window
control
;
unsigned
int
i_control_height
=
0
,
i_control_width
=
0
;
#endif
...
...
@@ -362,7 +353,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
return
NPERR_NO_ERROR
;
}
#if defined(XP_UNIX)
&& !defined(__APPLE__)
#if defined(XP_UNIX)
control
=
p_plugin
->
getControlWindow
();
#endif
...
...
@@ -484,7 +475,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
}
#endif
/* XP_WIN */
#if
def XP_UNIX
#if
defined(XP_UNIX)
/* default to hidden toolbar, shown at the end of this method if asked *
* developers note : getToolbarSize need to wait the end of this method
*/
...
...
@@ -771,7 +762,7 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa
/******************************************************************************
* UNIX-only methods
*****************************************************************************/
#if
def XP_UNIX
#if
defined(XP_UNIX)
static
void
Redraw
(
Widget
w
,
XtPointer
closure
,
XEvent
*
event
)
{
VlcPlugin
*
p_plugin
=
reinterpret_cast
<
VlcPlugin
*>
(
closure
);
...
...
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