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
71b2fdfd
Commit
71b2fdfd
authored
Feb 02, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mozilla: fix compilation.
parent
81693fe3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
55 deletions
+34
-55
projects/mozilla/control/npolibvlc.cpp
projects/mozilla/control/npolibvlc.cpp
+20
-40
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+8
-8
projects/mozilla/vlcplugin.h
projects/mozilla/vlcplugin.h
+5
-5
projects/mozilla/vlcshell.cpp
projects/mozilla/vlcshell.cpp
+1
-2
No files found.
projects/mozilla/control/npolibvlc.cpp
View file @
71b2fdfd
...
@@ -529,8 +529,7 @@ LibvlcInputNPObject::getProperty(int index, NPVariant &result)
...
@@ -529,8 +529,7 @@ LibvlcInputNPObject::getProperty(int index, NPVariant &result)
}
}
case
ID_input_hasvout
:
case
ID_input_hasvout
:
{
{
bool
val
=
p_plugin
->
player_has_vout
(
&
ex
);
bool
val
=
p_plugin
->
player_has_vout
();
RETURN_ON_EXCEPTION
(
this
,
ex
);
BOOLEAN_TO_NPVARIANT
(
val
,
result
);
BOOLEAN_TO_NPVARIANT
(
val
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -701,8 +700,7 @@ LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
...
@@ -701,8 +700,7 @@ LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
case
ID_playlistitems_clear
:
case
ID_playlistitems_clear
:
if
(
argCount
==
0
)
if
(
argCount
==
0
)
{
{
p_plugin
->
playlist_clear
(
&
ex
);
p_plugin
->
playlist_clear
();
RETURN_ON_EXCEPTION
(
this
,
ex
);
VOID_TO_NPVARIANT
(
result
);
VOID_TO_NPVARIANT
(
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -965,8 +963,7 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
...
@@ -965,8 +963,7 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
case
ID_playlist_clear
:
/* deprecated */
case
ID_playlist_clear
:
/* deprecated */
if
(
argCount
==
0
)
if
(
argCount
==
0
)
{
{
p_plugin
->
playlist_clear
(
&
ex
);
p_plugin
->
playlist_clear
();
RETURN_ON_EXCEPTION
(
this
,
ex
);
VOID_TO_NPVARIANT
(
result
);
VOID_TO_NPVARIANT
(
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -1160,8 +1157,7 @@ LibvlcSubtitleNPObject::getProperty(int index, NPVariant &result)
...
@@ -1160,8 +1157,7 @@ LibvlcSubtitleNPObject::getProperty(int index, NPVariant &result)
case
ID_subtitle_track
:
case
ID_subtitle_track
:
{
{
/* get the current subtitle ID */
/* get the current subtitle ID */
int
i_spu
=
libvlc_video_get_spu
(
p_md
,
&
ex
);
int
i_spu
=
libvlc_video_get_spu
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
/* return it */
/* return it */
INT32_TO_NPVARIANT
(
i_spu
,
result
);
INT32_TO_NPVARIANT
(
i_spu
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
...
@@ -1169,8 +1165,7 @@ LibvlcSubtitleNPObject::getProperty(int index, NPVariant &result)
...
@@ -1169,8 +1165,7 @@ LibvlcSubtitleNPObject::getProperty(int index, NPVariant &result)
case
ID_subtitle_count
:
case
ID_subtitle_count
:
{
{
/* get the number of subtitles available */
/* get the number of subtitles available */
int
i_spu
=
libvlc_video_get_spu_count
(
p_md
,
&
ex
);
int
i_spu
=
libvlc_video_get_spu_count
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
/* return it */
/* return it */
INT32_TO_NPVARIANT
(
i_spu
,
result
);
INT32_TO_NPVARIANT
(
i_spu
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
...
@@ -1200,8 +1195,7 @@ LibvlcSubtitleNPObject::setProperty(int index, const NPVariant &value)
...
@@ -1200,8 +1195,7 @@ LibvlcSubtitleNPObject::setProperty(int index, const NPVariant &value)
if
(
isNumberValue
(
value
)
)
if
(
isNumberValue
(
value
)
)
{
{
/* set the new subtitle track to show */
/* set the new subtitle track to show */
libvlc_video_set_spu
(
p_md
,
numberValue
(
value
),
&
ex
);
libvlc_video_set_spu
(
p_md
,
numberValue
(
value
));
RETURN_ON_EXCEPTION
(
this
,
ex
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -1253,8 +1247,7 @@ LibvlcSubtitleNPObject::invoke(int index, const NPVariant *args,
...
@@ -1253,8 +1247,7 @@ LibvlcSubtitleNPObject::invoke(int index, const NPVariant *args,
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
/* get the number of subtitle available */
/* get the number of subtitle available */
i_limit
=
libvlc_video_get_spu_count
(
p_md
,
&
ex
);
i_limit
=
libvlc_video_get_spu_count
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
/* check if a number is given by the user
/* check if a number is given by the user
* and get the subtitle number */
* and get the subtitle number */
...
@@ -1346,29 +1339,25 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
...
@@ -1346,29 +1339,25 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
{
{
case
ID_video_fullscreen
:
case
ID_video_fullscreen
:
{
{
int
val
=
p_plugin
->
get_fullscreen
(
&
ex
);
int
val
=
p_plugin
->
get_fullscreen
();
RETURN_ON_EXCEPTION
(
this
,
ex
);
BOOLEAN_TO_NPVARIANT
(
val
,
result
);
BOOLEAN_TO_NPVARIANT
(
val
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_height
:
case
ID_video_height
:
{
{
int
val
=
libvlc_video_get_height
(
p_md
,
&
ex
);
int
val
=
libvlc_video_get_height
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
INT32_TO_NPVARIANT
(
val
,
result
);
INT32_TO_NPVARIANT
(
val
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_width
:
case
ID_video_width
:
{
{
int
val
=
libvlc_video_get_width
(
p_md
,
&
ex
);
int
val
=
libvlc_video_get_width
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
INT32_TO_NPVARIANT
(
val
,
result
);
INT32_TO_NPVARIANT
(
val
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_aspectratio
:
case
ID_video_aspectratio
:
{
{
NPUTF8
*
psz_aspect
=
libvlc_video_get_aspect_ratio
(
p_md
,
&
ex
);
NPUTF8
*
psz_aspect
=
libvlc_video_get_aspect_ratio
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
if
(
!
psz_aspect
)
if
(
!
psz_aspect
)
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
...
@@ -1377,15 +1366,13 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
...
@@ -1377,15 +1366,13 @@ LibvlcVideoNPObject::getProperty(int index, NPVariant &result)
}
}
case
ID_video_subtitle
:
case
ID_video_subtitle
:
{
{
int
i_spu
=
libvlc_video_get_spu
(
p_md
,
&
ex
);
int
i_spu
=
libvlc_video_get_spu
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
INT32_TO_NPVARIANT
(
i_spu
,
result
);
INT32_TO_NPVARIANT
(
i_spu
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_crop
:
case
ID_video_crop
:
{
{
NPUTF8
*
psz_geometry
=
libvlc_video_get_crop_geometry
(
p_md
,
&
ex
);
NPUTF8
*
psz_geometry
=
libvlc_video_get_crop_geometry
(
p_md
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
if
(
!
psz_geometry
)
if
(
!
psz_geometry
)
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
...
@@ -1447,8 +1434,7 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
...
@@ -1447,8 +1434,7 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
}
}
int
val
=
NPVARIANT_TO_BOOLEAN
(
value
);
int
val
=
NPVARIANT_TO_BOOLEAN
(
value
);
p_plugin
->
set_fullscreen
(
val
,
&
ex
);
p_plugin
->
set_fullscreen
(
val
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_aspectratio
:
case
ID_video_aspectratio
:
...
@@ -1466,9 +1452,8 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
...
@@ -1466,9 +1452,8 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
libvlc_video_set_aspect_ratio
(
p_md
,
psz_aspect
,
&
ex
);
libvlc_video_set_aspect_ratio
(
p_md
,
psz_aspect
);
free
(
psz_aspect
);
free
(
psz_aspect
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -1476,8 +1461,7 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
...
@@ -1476,8 +1461,7 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
{
{
if
(
isNumberValue
(
value
)
)
if
(
isNumberValue
(
value
)
)
{
{
libvlc_video_set_spu
(
p_md
,
numberValue
(
value
),
&
ex
);
libvlc_video_set_spu
(
p_md
,
numberValue
(
value
));
RETURN_ON_EXCEPTION
(
this
,
ex
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -1498,9 +1482,8 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
...
@@ -1498,9 +1482,8 @@ LibvlcVideoNPObject::setProperty(int index, const NPVariant &value)
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
libvlc_video_set_crop_geometry
(
p_md
,
psz_geometry
,
&
ex
);
libvlc_video_set_crop_geometry
(
p_md
,
psz_geometry
);
free
(
psz_geometry
);
free
(
psz_geometry
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -1556,8 +1539,7 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *args,
...
@@ -1556,8 +1539,7 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *args,
{
{
if
(
argCount
==
0
)
if
(
argCount
==
0
)
{
{
p_plugin
->
toggle_fullscreen
(
&
ex
);
p_plugin
->
toggle_fullscreen
();
RETURN_ON_EXCEPTION
(
this
,
ex
);
VOID_TO_NPVARIANT
(
result
);
VOID_TO_NPVARIANT
(
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
...
@@ -2003,8 +1985,7 @@ LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
...
@@ -2003,8 +1985,7 @@ LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
switch
(
index
)
switch
(
index
)
{
{
case
ID_deint_disable
:
case
ID_deint_disable
:
libvlc_video_set_deinterlace
(
p_md
,
0
,
""
,
&
ex
);
libvlc_video_set_deinterlace
(
p_md
,
NULL
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
break
;
break
;
case
ID_deint_enable
:
case
ID_deint_enable
:
...
@@ -2012,9 +1993,8 @@ LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
...
@@ -2012,9 +1993,8 @@ LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
psz
=
stringValue
(
NPVARIANT_TO_STRING
(
args
[
0
]
)
);
psz
=
stringValue
(
NPVARIANT_TO_STRING
(
args
[
0
]
)
);
libvlc_video_set_deinterlace
(
p_md
,
1
,
psz
,
&
ex
);
libvlc_video_set_deinterlace
(
p_md
,
psz
);
free
(
psz
);
free
(
psz
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
break
;
break
;
default:
default:
...
...
projects/mozilla/vlcplugin.cpp
View file @
71b2fdfd
...
@@ -535,7 +535,7 @@ void VlcPlugin::playlist_delete_item( int idx, libvlc_exception_t *ex )
...
@@ -535,7 +535,7 @@ void VlcPlugin::playlist_delete_item( int idx, libvlc_exception_t *ex )
libvlc_media_list_unlock
(
libvlc_media_list
);
libvlc_media_list_unlock
(
libvlc_media_list
);
}
}
void
VlcPlugin
::
playlist_clear
(
libvlc_exception_t
*
ex
)
void
VlcPlugin
::
playlist_clear
()
{
{
if
(
libvlc_media_list
)
if
(
libvlc_media_list
)
libvlc_media_list_release
(
libvlc_media_list
);
libvlc_media_list_release
(
libvlc_media_list
);
...
@@ -551,25 +551,25 @@ int VlcPlugin::playlist_count()
...
@@ -551,25 +551,25 @@ int VlcPlugin::playlist_count()
return
items_count
;
return
items_count
;
}
}
void
VlcPlugin
::
toggle_fullscreen
(
libvlc_exception_t
*
ex
)
void
VlcPlugin
::
toggle_fullscreen
()
{
{
if
(
playlist_isplaying
()
)
if
(
playlist_isplaying
()
)
libvlc_toggle_fullscreen
(
libvlc_media_player
,
ex
);
libvlc_toggle_fullscreen
(
libvlc_media_player
);
}
}
void
VlcPlugin
::
set_fullscreen
(
int
yes
,
libvlc_exception_t
*
ex
)
void
VlcPlugin
::
set_fullscreen
(
int
yes
)
{
{
if
(
playlist_isplaying
()
)
if
(
playlist_isplaying
()
)
libvlc_set_fullscreen
(
libvlc_media_player
,
yes
,
ex
);
libvlc_set_fullscreen
(
libvlc_media_player
,
yes
);
}
}
int
VlcPlugin
::
get_fullscreen
(
libvlc_exception_t
*
ex
)
int
VlcPlugin
::
get_fullscreen
()
{
{
int
r
=
0
;
int
r
=
0
;
if
(
playlist_isplaying
()
)
if
(
playlist_isplaying
()
)
r
=
libvlc_get_fullscreen
(
libvlc_media_player
,
ex
);
r
=
libvlc_get_fullscreen
(
libvlc_media_player
);
return
r
;
return
r
;
}
}
bool
VlcPlugin
::
player_has_vout
(
libvlc_exception_t
*
ex
)
bool
VlcPlugin
::
player_has_vout
()
{
{
bool
r
=
false
;
bool
r
=
false
;
if
(
playlist_isplaying
()
)
if
(
playlist_isplaying
()
)
...
...
projects/mozilla/vlcplugin.h
View file @
71b2fdfd
...
@@ -267,14 +267,14 @@ public:
...
@@ -267,14 +267,14 @@ public:
int
playlist_add_extended_untrusted
(
const
char
*
,
const
char
*
,
int
,
int
playlist_add_extended_untrusted
(
const
char
*
,
const
char
*
,
int
,
const
char
**
,
libvlc_exception_t
*
);
const
char
**
,
libvlc_exception_t
*
);
void
playlist_delete_item
(
int
,
libvlc_exception_t
*
);
void
playlist_delete_item
(
int
,
libvlc_exception_t
*
);
void
playlist_clear
(
libvlc_exception_t
*
);
void
playlist_clear
();
int
playlist_count
();
int
playlist_count
();
void
toggle_fullscreen
(
libvlc_exception_t
*
);
void
toggle_fullscreen
();
void
set_fullscreen
(
int
,
libvlc_exception_t
*
);
void
set_fullscreen
(
int
);
int
get_fullscreen
(
libvlc_exception_t
*
);
int
get_fullscreen
();
bool
player_has_vout
(
libvlc_exception_t
*
);
bool
player_has_vout
();
static
bool
canUseEventListener
();
static
bool
canUseEventListener
();
...
...
projects/mozilla/vlcshell.cpp
View file @
71b2fdfd
...
@@ -838,8 +838,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
...
@@ -838,8 +838,7 @@ static void ControlHandler( Widget w, XtPointer closure, XEvent *event )
case
clicked_Fullscreen
:
case
clicked_Fullscreen
:
{
{
p_plugin
->
set_fullscreen
(
1
,
&
ex
);
p_plugin
->
set_fullscreen
(
1
);
libvlc_exception_clear
(
&
ex
);
}
}
break
;
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