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
f7799a24
Commit
f7799a24
authored
Jun 23, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mozilla: Reflect libvlc changes: media_instance destroy_and_detach->release.
parent
be6efa20
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
44 deletions
+44
-44
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+36
-36
mozilla/control/npovlc.cpp
mozilla/control/npovlc.cpp
+6
-6
mozilla/vlcshell.cpp
mozilla/vlcshell.cpp
+2
-2
No files found.
mozilla/control/npolibvlc.cpp
View file @
f7799a24
...
@@ -250,7 +250,7 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -250,7 +250,7 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
int
track
=
libvlc_audio_get_track
(
p_md
,
&
ex
);
int
track
=
libvlc_audio_get_track
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -330,7 +330,7 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -330,7 +330,7 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
}
}
libvlc_audio_set_track
(
p_md
,
libvlc_audio_set_track
(
p_md
,
numberValue
(
value
),
&
ex
);
numberValue
(
value
),
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -467,7 +467,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -467,7 +467,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_length
:
case
ID_input_length
:
{
{
double
val
=
(
double
)
libvlc_media_instance_get_length
(
p_md
,
&
ex
);
double
val
=
(
double
)
libvlc_media_instance_get_length
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -480,7 +480,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -480,7 +480,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_position
:
case
ID_input_position
:
{
{
double
val
=
libvlc_media_instance_get_position
(
p_md
,
&
ex
);
double
val
=
libvlc_media_instance_get_position
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -493,7 +493,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -493,7 +493,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_time
:
case
ID_input_time
:
{
{
double
val
=
(
double
)
libvlc_media_instance_get_time
(
p_md
,
&
ex
);
double
val
=
(
double
)
libvlc_media_instance_get_time
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -506,7 +506,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -506,7 +506,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_state
:
case
ID_input_state
:
{
{
int
val
=
libvlc_media_instance_get_state
(
p_md
,
&
ex
);
int
val
=
libvlc_media_instance_get_state
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -519,7 +519,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -519,7 +519,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_rate
:
case
ID_input_rate
:
{
{
float
val
=
libvlc_media_instance_get_rate
(
p_md
,
&
ex
);
float
val
=
libvlc_media_instance_get_rate
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -532,7 +532,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -532,7 +532,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_fps
:
case
ID_input_fps
:
{
{
double
val
=
libvlc_media_instance_get_fps
(
p_md
,
&
ex
);
double
val
=
libvlc_media_instance_get_fps
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -545,7 +545,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -545,7 +545,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
case
ID_input_hasvout
:
case
ID_input_hasvout
:
{
{
vlc_bool_t
val
=
libvlc_media_instance_has_vout
(
p_md
,
&
ex
);
vlc_bool_t
val
=
libvlc_media_instance_has_vout
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -558,7 +558,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
...
@@ -558,7 +558,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::getProperty(int index, NPVari
default:
default:
;
;
}
}
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
}
}
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
...
@@ -586,13 +586,13 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
...
@@ -586,13 +586,13 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
{
{
if
(
!
NPVARIANT_IS_DOUBLE
(
value
)
)
if
(
!
NPVARIANT_IS_DOUBLE
(
value
)
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
float
val
=
(
float
)
NPVARIANT_TO_DOUBLE
(
value
);
float
val
=
(
float
)
NPVARIANT_TO_DOUBLE
(
value
);
libvlc_media_instance_set_position
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_set_position
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -610,12 +610,12 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
...
@@ -610,12 +610,12 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
val
=
(
vlc_int64_t
)
NPVARIANT_TO_DOUBLE
(
value
);
val
=
(
vlc_int64_t
)
NPVARIANT_TO_DOUBLE
(
value
);
else
else
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
libvlc_media_instance_set_time
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_set_time
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -633,12 +633,12 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
...
@@ -633,12 +633,12 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
val
=
(
float
)
NPVARIANT_TO_DOUBLE
(
value
);
val
=
(
float
)
NPVARIANT_TO_DOUBLE
(
value
);
else
else
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
libvlc_media_instance_set_rate
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_set_rate
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -650,7 +650,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
...
@@ -650,7 +650,7 @@ RuntimeNPObject::InvokeResult LibvlcInputNPObject::setProperty(int index, const
default:
default:
;
;
}
}
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
}
}
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
...
@@ -1826,7 +1826,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1826,7 +1826,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
case
ID_video_fullscreen
:
case
ID_video_fullscreen
:
{
{
int
val
=
libvlc_get_fullscreen
(
p_md
,
&
ex
);
int
val
=
libvlc_get_fullscreen
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1839,7 +1839,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1839,7 +1839,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
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
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1852,7 +1852,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1852,7 +1852,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
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
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1865,7 +1865,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1865,7 +1865,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
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
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1881,7 +1881,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1881,7 +1881,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
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
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1894,7 +1894,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1894,7 +1894,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
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
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1908,7 +1908,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1908,7 +1908,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
}
}
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
}
}
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
...
@@ -1936,13 +1936,13 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -1936,13 +1936,13 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
{
{
if
(
!
NPVARIANT_IS_BOOLEAN
(
value
)
)
if
(
!
NPVARIANT_IS_BOOLEAN
(
value
)
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
int
val
=
NPVARIANT_TO_BOOLEAN
(
value
);
int
val
=
NPVARIANT_TO_BOOLEAN
(
value
);
libvlc_set_fullscreen
(
p_md
,
val
,
&
ex
);
libvlc_set_fullscreen
(
p_md
,
val
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
...
@@ -1958,20 +1958,20 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -1958,20 +1958,20 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
if
(
!
NPVARIANT_IS_STRING
(
value
)
)
if
(
!
NPVARIANT_IS_STRING
(
value
)
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
psz_aspect
=
stringValue
(
NPVARIANT_TO_STRING
(
value
));
psz_aspect
=
stringValue
(
NPVARIANT_TO_STRING
(
value
));
if
(
!
psz_aspect
)
if
(
!
psz_aspect
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
,
&
ex
);
delete
psz_aspect
;
delete
psz_aspect
;
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
...
@@ -1987,7 +1987,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -1987,7 +1987,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
{
{
libvlc_video_set_spu
(
p_md
,
libvlc_video_set_spu
(
p_md
,
numberValue
(
value
),
&
ex
);
numberValue
(
value
),
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -1996,7 +1996,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -1996,7 +1996,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
}
}
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
case
ID_video_crop
:
case
ID_video_crop
:
...
@@ -2005,20 +2005,20 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -2005,20 +2005,20 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
if
(
!
NPVARIANT_IS_STRING
(
value
)
)
if
(
!
NPVARIANT_IS_STRING
(
value
)
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
}
}
psz_geometry
=
stringValue
(
NPVARIANT_TO_STRING
(
value
));
psz_geometry
=
stringValue
(
NPVARIANT_TO_STRING
(
value
));
if
(
!
psz_geometry
)
if
(
!
psz_geometry
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
,
&
ex
);
delete
psz_geometry
;
delete
psz_geometry
;
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
...
@@ -2029,7 +2029,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -2029,7 +2029,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
}
}
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
}
}
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
}
}
...
@@ -2069,7 +2069,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::invoke(int index, const NPVar
...
@@ -2069,7 +2069,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::invoke(int index, const NPVar
if
(
argCount
==
0
)
if
(
argCount
==
0
)
{
{
libvlc_toggle_fullscreen
(
p_md
,
&
ex
);
libvlc_toggle_fullscreen
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
...
mozilla/control/npovlc.cpp
View file @
f7799a24
...
@@ -169,7 +169,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -169,7 +169,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
if
(
p_md
)
if
(
p_md
)
{
{
libvlc_toggle_fullscreen
(
p_md
,
&
ex
);
libvlc_toggle_fullscreen
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -533,7 +533,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -533,7 +533,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
if
(
p_md
)
if
(
p_md
)
{
{
vlc_int64_t
val
=
libvlc_media_instance_get_length
(
p_md
,
&
ex
);
vlc_int64_t
val
=
libvlc_media_instance_get_length
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -565,7 +565,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -565,7 +565,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
if
(
p_md
)
if
(
p_md
)
{
{
float
val
=
libvlc_media_instance_get_position
(
p_md
,
&
ex
);
float
val
=
libvlc_media_instance_get_position
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -597,7 +597,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -597,7 +597,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
if
(
p_md
)
if
(
p_md
)
{
{
vlc_int64_t
val
=
libvlc_media_instance_get_time
(
p_md
,
&
ex
);
vlc_int64_t
val
=
libvlc_media_instance_get_time
(
p_md
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
@@ -642,7 +642,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -642,7 +642,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
vlc_int64_t
from
=
libvlc_media_instance_get_time
(
p_md
,
&
ex
);
vlc_int64_t
from
=
libvlc_media_instance_get_time
(
p_md
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
return
INVOKERESULT_GENERIC_ERROR
;
...
@@ -651,7 +651,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
...
@@ -651,7 +651,7 @@ RuntimeNPObject::InvokeResult VlcNPObject::invoke(int index, const NPVariant *ar
}
}
/* jump to time */
/* jump to time */
libvlc_media_instance_set_time
(
p_md
,
pos
,
&
ex
);
libvlc_media_instance_set_time
(
p_md
,
pos
,
&
ex
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
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
));
...
...
mozilla/vlcshell.cpp
View file @
f7799a24
...
@@ -188,7 +188,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
...
@@ -188,7 +188,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
if
(
p_md
)
if
(
p_md
)
{
{
libvlc_toggle_fullscreen
(
p_md
,
NULL
);
libvlc_toggle_fullscreen
(
p_md
,
NULL
);
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
}
}
}
}
}
}
...
@@ -227,7 +227,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
...
@@ -227,7 +227,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
area
.
bottom
=
npwindow
.
height
;
area
.
bottom
=
npwindow
.
height
;
libvlc_video_redraw_rectangle
(
p_md
,
&
area
,
NULL
);
libvlc_video_redraw_rectangle
(
p_md
,
&
area
,
NULL
);
}
}
libvlc_media_instance_
destroy_and_detach
(
p_md
);
libvlc_media_instance_
release
(
p_md
);
}
}
}
}
}
}
...
...
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