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
396acde3
Commit
396acde3
authored
Feb 10, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mozilla plugin: fix compilation.
parent
992cf22c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
187 deletions
+108
-187
projects/mozilla/control/npolibvlc.cpp
projects/mozilla/control/npolibvlc.cpp
+84
-147
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+3
-3
projects/mozilla/vlcplugin.h
projects/mozilla/vlcplugin.h
+12
-13
projects/mozilla/vlcshell.cpp
projects/mozilla/vlcshell.cpp
+9
-24
No files found.
projects/mozilla/control/npolibvlc.cpp
View file @
396acde3
This diff is collapsed.
Click to expand it.
projects/mozilla/vlcplugin.cpp
View file @
396acde3
...
...
@@ -449,7 +449,7 @@ void VlcPlugin::set_player_window()
#endif
}
int
VlcPlugin
::
playlist_add
(
const
char
*
mrl
,
libvlc_exception_t
*
ex
)
int
VlcPlugin
::
playlist_add
(
const
char
*
mrl
)
{
int
item
=
-
1
;
libvlc_media_t
*
p_m
=
libvlc_media_new
(
libvlc_instance
,
mrl
);
...
...
@@ -467,7 +467,7 @@ int VlcPlugin::playlist_add( const char *mrl, libvlc_exception_t *ex )
}
int
VlcPlugin
::
playlist_add_extended_untrusted
(
const
char
*
mrl
,
const
char
*
name
,
int
optc
,
const
char
**
optv
,
libvlc_exception_t
*
ex
)
int
optc
,
const
char
**
optv
)
{
libvlc_media_t
*
p_m
=
libvlc_media_new
(
libvlc_instance
,
mrl
);
int
item
=
-
1
;
...
...
@@ -486,7 +486,7 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam
return
item
;
}
bool
VlcPlugin
::
playlist_select
(
int
idx
,
libvlc_exception_t
*
ex
)
bool
VlcPlugin
::
playlist_select
(
int
idx
)
{
libvlc_media_t
*
p_m
=
NULL
;
...
...
projects/mozilla/vlcplugin.h
View file @
396acde3
...
...
@@ -167,11 +167,10 @@ public:
NPError
init
(
int
argc
,
char
*
const
argn
[],
char
*
const
argv
[]);
libvlc_instance_t
*
getVLC
()
{
return
libvlc_instance
;
};
libvlc_media_player_t
*
getMD
(
libvlc_exception_t
*
ex
)
libvlc_media_player_t
*
getMD
()
{
if
(
!
libvlc_media_player
)
{
libvlc_exception_raise
(
ex
);
libvlc_printerr
(
"no mediaplayer"
);
}
return
libvlc_media_player
;
...
...
@@ -224,14 +223,14 @@ public:
char
*
psz_text
;
char
*
psz_target
;
void
playlist_play
(
libvlc_exception_t
*
ex
)
void
playlist_play
()
{
if
(
libvlc_media_player
||
playlist_select
(
0
,
ex
)
)
if
(
libvlc_media_player
||
playlist_select
(
0
)
)
libvlc_media_player_play
(
libvlc_media_player
);
}
void
playlist_play_item
(
int
idx
,
libvlc_exception_t
*
ex
)
void
playlist_play_item
(
int
idx
)
{
if
(
playlist_select
(
idx
,
ex
)
)
if
(
playlist_select
(
idx
)
)
libvlc_media_player_play
(
libvlc_media_player
);
}
void
playlist_stop
()
...
...
@@ -239,14 +238,14 @@ public:
if
(
libvlc_media_player
)
libvlc_media_player_stop
(
libvlc_media_player
);
}
void
playlist_next
(
libvlc_exception_t
*
ex
)
void
playlist_next
()
{
if
(
playlist_select
(
playlist_index
+
1
,
ex
)
)
if
(
playlist_select
(
playlist_index
+
1
)
)
libvlc_media_player_play
(
libvlc_media_player
);
}
void
playlist_prev
(
libvlc_exception_t
*
ex
)
void
playlist_prev
()
{
if
(
playlist_select
(
playlist_index
-
1
,
ex
)
)
if
(
playlist_select
(
playlist_index
-
1
)
)
libvlc_media_player_play
(
libvlc_media_player
);
}
void
playlist_pause
()
...
...
@@ -263,9 +262,9 @@ public:
return
is_playing
;
}
int
playlist_add
(
const
char
*
,
libvlc_exception_t
*
);
int
playlist_add
(
const
char
*
);
int
playlist_add_extended_untrusted
(
const
char
*
,
const
char
*
,
int
,
const
char
**
,
libvlc_exception_t
*
);
const
char
**
);
int
playlist_delete_item
(
int
);
void
playlist_clear
();
int
playlist_count
();
...
...
@@ -281,7 +280,7 @@ public:
EventObj
events
;
private:
bool
playlist_select
(
int
,
libvlc_exception_t
*
);
bool
playlist_select
(
int
);
void
set_player_window
();
/* VLC reference */
...
...
projects/mozilla/vlcshell.cpp
View file @
396acde3
...
...
@@ -157,9 +157,6 @@ NPError NPP_SetValue( NPP instance, NPNVariable variable, void *value )
int16
NPP_HandleEvent
(
NPP
instance
,
void
*
event
)
{
static
UInt32
lastMouseUp
=
0
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
if
(
instance
==
NULL
)
{
return
false
;
...
...
@@ -182,8 +179,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
if
(
(
myEvent
->
when
-
lastMouseUp
)
<
GetDblTime
()
)
{
/* double click */
p_plugin
->
toggle_fullscreen
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
p_plugin
->
toggle_fullscreen
();
}
return
true
;
}
...
...
@@ -212,13 +208,12 @@ int16 NPP_HandleEvent( NPP instance, void * event )
area
.
top
=
0
;
area
.
right
=
npwindow
.
width
;
area
.
bottom
=
npwindow
.
height
;
libvlc_video_redraw_rectangle
(
p_plugin
->
getMD
(
&
ex
),
&
area
,
NULL
);
libvlc_video_redraw_rectangle
(
p_plugin
->
getMD
(),
&
area
,
NULL
);
#else
#warning disabled code
#endif
}
}
libvlc_exception_clear
(
&
ex
);
if
(
!
hasVout
)
{
...
...
@@ -372,9 +367,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
control
=
p_plugin
->
getControlWindow
();
#endif
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_instance_t
*
p_vlc
=
p_plugin
->
getVLC
();
/*
...
...
@@ -413,8 +405,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
clip
.
bottom
=
window
->
clipRect
.
bottom
;
clip
.
right
=
window
->
clipRect
.
right
;
#ifdef NOT_WORKING
libvlc_video_set_viewport
(
p_vlc
,
p_plugin
->
getMD
(
&
ex
),
&
view
,
&
clip
,
&
ex
);
libvlc_exception_clear
(
&
ex
);
libvlc_video_set_viewport
(
p_vlc
,
p_plugin
->
getMD
(),
&
view
,
&
clip
);
#else
#warning disabled code
#endif
...
...
@@ -548,12 +539,11 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
{
if
(
p_plugin
->
psz_target
)
{
if
(
p_plugin
->
playlist_add
(
p_plugin
->
psz_target
,
NULL
)
!=
-
1
)
if
(
p_plugin
->
playlist_add
(
p_plugin
->
psz_target
)
!=
-
1
)
{
if
(
p_plugin
->
b_autoplay
)
{
p_plugin
->
playlist_play
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
p_plugin
->
playlist_play
();
}
}
p_plugin
->
b_stream
=
true
;
...
...
@@ -627,11 +617,11 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
return
;
}
if
(
p_plugin
->
playlist_add
(
stream
->
url
,
NULL
)
!=
-
1
)
if
(
p_plugin
->
playlist_add
(
stream
->
url
)
!=
-
1
)
{
if
(
p_plugin
->
b_autoplay
)
{
p_plugin
->
playlist_play
(
NULL
);
p_plugin
->
playlist_play
();
}
}
}
...
...
@@ -806,11 +796,8 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
if
(
p_plugin
&&
p_plugin
->
b_toolbar
)
{
int
i_playing
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_media_player_t
*
p_md
=
p_plugin
->
getMD
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
libvlc_media_player_t
*
p_md
=
p_plugin
->
getMD
();
i_playing
=
p_plugin
->
playlist_isplaying
();
...
...
@@ -824,9 +811,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
if
(
i_playing
==
1
)
p_plugin
->
playlist_pause
();
else
p_plugin
->
playlist_play
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
p_plugin
->
playlist_play
();
}
break
;
...
...
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