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
b77f2f8b
Commit
b77f2f8b
authored
Mar 20, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- mozilla: most properties in vlc.audio object don't require an active input, be careful jpsaman ;)
parent
3868e3ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
26 deletions
+15
-26
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+14
-25
mozilla/control/nporuntime.h
mozilla/control/nporuntime.h
+1
-1
No files found.
mozilla/control/npolibvlc.cpp
View file @
b77f2f8b
...
@@ -200,20 +200,11 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -200,20 +200,11 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
switch
(
index
)
switch
(
index
)
{
{
case
ID_audio_mute
:
case
ID_audio_mute
:
{
{
vlc_bool_t
muted
=
libvlc_audio_get_mute
(
p_plugin
->
getVLC
(),
&
ex
);
vlc_bool_t
muted
=
libvlc_audio_get_mute
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
...
@@ -226,7 +217,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -226,7 +217,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
case
ID_audio_volume
:
case
ID_audio_volume
:
{
{
int
volume
=
libvlc_audio_get_volume
(
p_plugin
->
getVLC
(),
&
ex
);
int
volume
=
libvlc_audio_get_volume
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
...
@@ -238,6 +228,13 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -238,6 +228,13 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
}
}
case
ID_audio_track
:
case
ID_audio_track
:
{
{
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
int
track
=
libvlc_audio_get_track
(
p_input
,
&
ex
);
int
track
=
libvlc_audio_get_track
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
...
@@ -252,7 +249,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -252,7 +249,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
case
ID_audio_channel
:
case
ID_audio_channel
:
{
{
int
channel
=
libvlc_audio_get_channel
(
p_plugin
->
getVLC
(),
&
ex
);
int
channel
=
libvlc_audio_get_channel
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
...
@@ -265,7 +261,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -265,7 +261,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
default:
default:
;
;
}
}
libvlc_input_free
(
p_input
);
}
}
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
...
@@ -279,14 +274,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -279,14 +274,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
switch
(
index
)
switch
(
index
)
{
{
case
ID_audio_mute
:
case
ID_audio_mute
:
...
@@ -294,7 +281,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -294,7 +281,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
{
{
libvlc_audio_set_mute
(
p_plugin
->
getVLC
(),
libvlc_audio_set_mute
(
p_plugin
->
getVLC
(),
NPVARIANT_TO_BOOLEAN
(
value
),
&
ex
);
NPVARIANT_TO_BOOLEAN
(
value
),
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
...
@@ -305,7 +291,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -305,7 +291,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
}
}
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
case
ID_audio_volume
:
case
ID_audio_volume
:
libvlc_input_free
(
p_input
);
if
(
isNumberValue
(
value
)
)
if
(
isNumberValue
(
value
)
)
{
{
libvlc_audio_set_volume
(
p_plugin
->
getVLC
(),
libvlc_audio_set_volume
(
p_plugin
->
getVLC
(),
...
@@ -322,6 +307,13 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -322,6 +307,13 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
case
ID_audio_track
:
case
ID_audio_track
:
if
(
isNumberValue
(
value
)
)
if
(
isNumberValue
(
value
)
)
{
{
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
libvlc_audio_set_track
(
p_input
,
libvlc_audio_set_track
(
p_input
,
numberValue
(
value
),
&
ex
);
numberValue
(
value
),
&
ex
);
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
...
@@ -333,10 +325,8 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -333,10 +325,8 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
}
}
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
libvlc_input_free
(
p_input
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
case
ID_audio_channel
:
case
ID_audio_channel
:
libvlc_input_free
(
p_input
);
if
(
isNumberValue
(
value
)
)
if
(
isNumberValue
(
value
)
)
{
{
libvlc_audio_set_channel
(
p_plugin
->
getVLC
(),
libvlc_audio_set_channel
(
p_plugin
->
getVLC
(),
...
@@ -353,7 +343,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -353,7 +343,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
default:
default:
;
;
}
}
libvlc_input_free
(
p_input
);
}
}
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
...
...
mozilla/control/nporuntime.h
View file @
b77f2f8b
...
@@ -88,7 +88,7 @@ protected:
...
@@ -88,7 +88,7 @@ protected:
_instance
(
instance
)
_instance
(
instance
)
{
{
_class
=
const_cast
<
NPClass
*>
(
aClass
);
_class
=
const_cast
<
NPClass
*>
(
aClass
);
//
referenceCount = 1;
referenceCount
=
1
;
};
};
virtual
~
RuntimeNPObject
()
{};
virtual
~
RuntimeNPObject
()
{};
...
...
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