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
312523f7
Commit
312523f7
authored
Oct 11, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- backport from trunk of [17018],[17006],[16944]
parent
e9020e56
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
134 additions
and
13 deletions
+134
-13
activex/Makefile.am
activex/Makefile.am
+2
-0
activex/axvlc.idl
activex/axvlc.idl
+12
-0
activex/axvlc.tlb
activex/axvlc.tlb
+0
-0
activex/axvlc_idl.h
activex/axvlc_idl.h
+14
-0
activex/plugin.cpp
activex/plugin.cpp
+20
-13
activex/plugin.h
activex/plugin.h
+2
-0
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+64
-0
activex/vlccontrol2.h
activex/vlccontrol2.h
+1
-0
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+19
-0
No files found.
activex/Makefile.am
View file @
312523f7
...
...
@@ -36,6 +36,8 @@ SOURCES_activex = \
dataobject.h
\
viewobject.cpp
\
viewobject.h
\
supporterrorinfo.cpp
\
supporterrorinfo.h
\
vlccontrol.cpp
\
vlccontrol.h
\
vlccontrol2.cpp
\
...
...
activex/axvlc.idl
View file @
312523f7
...
...
@@ -179,7 +179,9 @@ library AXVLC
odl
,
uuid
(
9
E0BD17B
-
2
D3C
-
4656
-
B94D
-
03084
F3FD9D4
),
helpstring
(
"VLC Audio APIs"
),
hidden
,
dual
,
nonextensible
,
oleautomation
]
interface
IVLCAudio
:
IDispatch
...
...
@@ -202,7 +204,9 @@ library AXVLC
odl
,
uuid
(
49
E0DBD1
-
9440
-
466
C
-
9
C97
-
95
C67190C603
),
helpstring
(
"VLC Input APIs"
),
hidden
,
dual
,
nonextensible
,
oleautomation
]
interface
IVLCInput
:
IDispatch
...
...
@@ -239,7 +243,9 @@ library AXVLC
odl
,
uuid
(
54613049
-
40B
F
-
4035
-
9
E70
-
0
A9312C0188D
),
helpstring
(
"VLC Playlist APIs"
),
hidden
,
dual
,
nonextensible
,
oleautomation
]
interface
IVLCPlaylist
:
IDispatch
...
...
@@ -282,7 +288,9 @@ library AXVLC
odl
,
uuid
(
0
AAEDF0B
-
D333
-
4B27
-
A0C6
-
BBF31413A42E
),
helpstring
(
"VLC Video APIs"
),
hidden
,
dual
,
nonextensible
,
oleautomation
]
interface
IVLCVideo
:
IDispatch
...
...
@@ -297,12 +305,16 @@ library AXVLC
[
propget
,
helpstring
(
"Returns video original height."
)
]
HRESULT
height
(
[
out
,
retval
]
int
*
height
)
;
[
helpstring
(
"toggle fullscreen/windowed state."
)
]
HRESULT
toggleFullscreen
()
;
}
;
[
odl
,
uuid
(
2
D719729
-
5333
-
406
C
-
BF12
-
8
DE787FD65E3
),
helpstring
(
"VLC Control"
),
hidden
,
dual
,
oleautomation
]
...
...
activex/axvlc.tlb
View file @
312523f7
No preview for this file type
activex/axvlc_idl.h
View file @
312523f7
...
...
@@ -1448,6 +1448,9 @@ interface IVLCVideo : public IDispatch
virtual
HRESULT
STDMETHODCALLTYPE
get_height
(
int
*
height
)
=
0
;
virtual
HRESULT
STDMETHODCALLTYPE
toggleFullscreen
(
)
=
0
;
};
#else
typedef
struct
IVLCVideoVtbl
{
...
...
@@ -1512,6 +1515,9 @@ typedef struct IVLCVideoVtbl {
IVLCVideo
*
This
,
int
*
height
);
HRESULT
(
STDMETHODCALLTYPE
*
toggleFullscreen
)(
IVLCVideo
*
This
);
END_INTERFACE
}
IVLCVideoVtbl
;
interface
IVLCVideo
{
...
...
@@ -1533,6 +1539,7 @@ interface IVLCVideo {
#define IVLCVideo_put_fullscreen(p,a) (p)->lpVtbl->put_fullscreen(p,a)
#define IVLCVideo_get_width(p,a) (p)->lpVtbl->get_width(p,a)
#define IVLCVideo_get_height(p,a) (p)->lpVtbl->get_height(p,a)
#define IVLCVideo_toggleFullscreen(p) (p)->lpVtbl->toggleFullscreen(p)
#endif
#endif
...
...
@@ -1569,6 +1576,13 @@ void __RPC_STUB IVLCVideo_get_height_Stub(
IRpcChannelBuffer
*
pRpcChannelBuffer
,
PRPC_MESSAGE
pRpcMessage
,
DWORD
*
pdwStubPhase
);
HRESULT
CALLBACK
IVLCVideo_toggleFullscreen_Proxy
(
IVLCVideo
*
This
);
void
__RPC_STUB
IVLCVideo_toggleFullscreen_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
pRpcChannelBuffer
,
PRPC_MESSAGE
pRpcMessage
,
DWORD
*
pdwStubPhase
);
#endif
/* __IVLCVideo_INTERFACE_DEFINED__ */
...
...
activex/plugin.cpp
View file @
312523f7
...
...
@@ -36,6 +36,7 @@
#include "vlccontrol2.h"
#include "viewobject.h"
#include "dataobject.h"
#include "supporterrorinfo.h"
#include "utils.h"
...
...
@@ -267,6 +268,7 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
vlcViewObject
=
new
VLCViewObject
(
this
);
vlcDataObject
=
new
VLCDataObject
(
this
);
vlcOleObject
=
new
VLCOleObject
(
this
);
vlcSupportErrorInfo
=
new
VLCSupportErrorInfo
(
this
);
// configure controlling IUnknown interface for implemented interfaces
this
->
pUnkOuter
=
(
NULL
!=
pUnkOuter
)
?
pUnkOuter
:
dynamic_cast
<
LPUNKNOWN
>
(
this
);
...
...
@@ -280,6 +282,7 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
VLCPlugin
::~
VLCPlugin
()
{
delete
vlcSupportErrorInfo
;
delete
vlcOleObject
;
delete
vlcDataObject
;
delete
vlcViewObject
;
...
...
@@ -350,6 +353,8 @@ STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv)
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcViewObject
);
else
if
(
IID_IDataObject
==
riid
)
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcDataObject
);
else
if
(
IID_ISupportErrorInfo
==
riid
)
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcSupportErrorInfo
);
else
{
*
ppv
=
NULL
;
...
...
@@ -599,19 +604,6 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
if
(
_b_autoloop
)
ppsz_argv
[
ppsz_argc
++
]
=
"--loop"
;
// initial volume setting
char
volBuffer
[
16
];
ppsz_argv
[
ppsz_argc
++
]
=
"--volume"
;
if
(
_b_mute
)
{
ppsz_argv
[
ppsz_argc
++
]
=
"0"
;
}
else
{
snprintf
(
volBuffer
,
sizeof
(
volBuffer
),
"%d"
,
_i_volume
);
ppsz_argv
[
ppsz_argc
++
]
=
volBuffer
;
}
if
(
IsDebuggerPresent
()
)
{
/*
...
...
@@ -633,6 +625,14 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
return
E_FAIL
;
}
// initial volume setting
libvlc_audio_set_volume
(
_p_libvlc
,
_i_volume
,
NULL
);
if
(
_b_mute
)
{
libvlc_audio_set_mute
(
_p_libvlc
,
TRUE
,
NULL
);
}
// initial playlist item
if
(
SysStringLen
(
_bstr_mrl
)
>
0
)
{
char
*
psz_mrl
=
NULL
;
...
...
@@ -686,6 +686,13 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
return
S_OK
;
};
void
VLCPlugin
::
setErrorInfo
(
REFIID
riid
,
const
char
*
description
)
{
vlcSupportErrorInfo
->
setErrorInfo
(
getClassID
()
==
CLSID_VLCPlugin2
?
OLESTR
(
"VideoLAN.VLCPlugin.2"
)
:
OLESTR
(
"VideoLAN.VLCPlugin.1"
),
riid
,
description
);
};
HRESULT
VLCPlugin
::
onAmbientChanged
(
LPUNKNOWN
pContainer
,
DISPID
dispID
)
{
VARIANT
v
;
...
...
activex/plugin.h
View file @
312523f7
...
...
@@ -187,6 +187,7 @@ public:
inline
BOOL
isRunning
(
void
)
{
return
NULL
!=
_p_libvlc
;
};
HRESULT
getVLCObject
(
int
*
i_vlc
);
HRESULT
getVLC
(
libvlc_instance_t
**
p_vlc
);
void
setErrorInfo
(
REFIID
riid
,
const
char
*
description
);
// control geometry within container
RECT
getPosRect
(
void
)
{
return
_posRect
;
};
...
...
@@ -240,6 +241,7 @@ private:
class
VLCControl2
*
vlcControl2
;
class
VLCViewObject
*
vlcViewObject
;
class
VLCDataObject
*
vlcDataObject
;
class
VLCSupportErrorInfo
*
vlcSupportErrorInfo
;
// in place activated window (Clipping window)
HWND
_inplacewnd
;
...
...
activex/vlccontrol2.cpp
View file @
312523f7
...
...
@@ -120,6 +120,7 @@ STDMETHODIMP VLCAudio::get_mute(VARIANT_BOOL* mute)
*
mute
=
libvlc_audio_get_mute
(
p_libvlc
,
&
ex
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -140,6 +141,7 @@ STDMETHODIMP VLCAudio::put_mute(VARIANT_BOOL mute)
libvlc_audio_set_mute
(
p_libvlc
,
VARIANT_FALSE
!=
mute
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -163,6 +165,7 @@ STDMETHODIMP VLCAudio::get_volume(int* volume)
*
volume
=
libvlc_audio_get_volume
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -183,6 +186,7 @@ STDMETHODIMP VLCAudio::put_volume(int volume)
libvlc_audio_set_volume
(
p_libvlc
,
volume
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -203,6 +207,7 @@ STDMETHODIMP VLCAudio::toggleMute()
libvlc_audio_toggle_mute
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -312,6 +317,7 @@ STDMETHODIMP VLCInput::get_length(double* length)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -340,6 +346,7 @@ STDMETHODIMP VLCInput::get_position(float* position)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -365,6 +372,7 @@ STDMETHODIMP VLCInput::put_position(float position)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -393,6 +401,7 @@ STDMETHODIMP VLCInput::get_time(double* time)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -418,6 +427,7 @@ STDMETHODIMP VLCInput::put_time(double time)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -476,6 +486,7 @@ STDMETHODIMP VLCInput::get_rate(float* rate)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -501,6 +512,7 @@ STDMETHODIMP VLCInput::put_rate(float rate)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -529,6 +541,7 @@ STDMETHODIMP VLCInput::get_fps(float* fps)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -557,6 +570,7 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCInput
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -657,6 +671,8 @@ STDMETHODIMP VLCPlaylist::get_itemCount(int* count)
*
count
=
libvlc_playlist_items_count
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -680,6 +696,8 @@ STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying)
*
isPlaying
=
libvlc_playlist_isplaying
(
p_libvlc
,
&
ex
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -741,6 +759,8 @@ STDMETHODIMP VLCPlaylist::add(BSTR uri, VARIANT name, VARIANT options, int* item
CoTaskMemFree
(
psz_name
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -781,6 +801,8 @@ STDMETHODIMP VLCPlaylist::playItem(int item)
libvlc_playlist_play
(
p_libvlc
,
item
,
0
,
NULL
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -801,6 +823,8 @@ STDMETHODIMP VLCPlaylist::togglePause()
libvlc_playlist_pause
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -821,6 +845,8 @@ STDMETHODIMP VLCPlaylist::stop()
libvlc_playlist_stop
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -841,6 +867,8 @@ STDMETHODIMP VLCPlaylist::next()
libvlc_playlist_next
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -861,6 +889,8 @@ STDMETHODIMP VLCPlaylist::prev()
libvlc_playlist_prev
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -881,6 +911,8 @@ STDMETHODIMP VLCPlaylist::clear()
libvlc_playlist_clear
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -901,6 +933,8 @@ STDMETHODIMP VLCPlaylist::removeItem(int item)
libvlc_playlist_delete_item
(
p_libvlc
,
item
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCPlaylist
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -1010,6 +1044,7 @@ STDMETHODIMP VLCVideo::get_fullscreen(VARIANT_BOOL* fullscreen)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -1035,6 +1070,7 @@ STDMETHODIMP VLCVideo::put_fullscreen(VARIANT_BOOL fullscreen)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -1063,6 +1099,7 @@ STDMETHODIMP VLCVideo::get_width(int* width)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
@@ -1091,6 +1128,33 @@ STDMETHODIMP VLCVideo::get_height(int* height)
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
hr
;
};
STDMETHODIMP
VLCVideo
::
toggleFullscreen
()
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
if
(
!
libvlc_exception_raised
(
&
ex
)
)
{
libvlc_toggle_fullscreen
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
!
libvlc_exception_raised
(
&
ex
)
)
{
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
...
...
activex/vlccontrol2.h
View file @
312523f7
...
...
@@ -222,6 +222,7 @@ public:
STDMETHODIMP
put_fullscreen
(
VARIANT_BOOL
);
STDMETHODIMP
get_width
(
int
*
);
STDMETHODIMP
get_height
(
int
*
);
STDMETHODIMP
toggleFullscreen
();
protected:
HRESULT
loadTypeInfo
();
...
...
mozilla/control/npolibvlc.cpp
View file @
312523f7
...
...
@@ -556,6 +556,7 @@ const NPUTF8 * const LibvlcPlaylistNPObject::methodNames[] =
{
"add"
,
"play"
,
"playItem"
,
"togglePause"
,
"stop"
,
"next"
,
...
...
@@ -570,6 +571,7 @@ enum LibvlcPlaylistNPObjectMethodIds
{
ID_add
,
ID_play
,
ID_playItem
,
ID_togglepause
,
ID_stop
,
ID_next
,
...
...
@@ -695,6 +697,23 @@ RuntimeNPObject::InvokeResult LibvlcPlaylistNPObject::invoke(int index, const NP
}
}
return
INVOKERESULT_NO_SUCH_METHOD
;
case
ID_playItem
:
if
(
(
argCount
==
1
)
&&
isNumberValue
(
args
[
0
])
)
{
libvlc_playlist_play
(
p_plugin
->
getVLC
(),
numberValue
(
args
[
0
]),
0
,
NULL
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
else
{
VOID_TO_NPVARIANT
(
result
);
return
INVOKERESULT_NO_ERROR
;
}
}
return
INVOKERESULT_NO_SUCH_METHOD
;
case
ID_togglepause
:
if
(
argCount
==
0
)
{
...
...
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