Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
763b6733
Commit
763b6733
authored
Jun 10, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove VLCPlugin::getVLCObject() methond from ActiveX
parent
30b36a44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
66 deletions
+67
-66
projects/activex/plugin.cpp
projects/activex/plugin.cpp
+9
-18
projects/activex/plugin.h
projects/activex/plugin.h
+0
-2
projects/activex/vlccontrol.cpp
projects/activex/vlccontrol.cpp
+58
-46
No files found.
projects/activex/plugin.cpp
View file @
763b6733
...
@@ -410,21 +410,6 @@ HRESULT VLCPlugin::onLoad(void)
...
@@ -410,21 +410,6 @@ HRESULT VLCPlugin::onLoad(void)
return
S_OK
;
return
S_OK
;
};
};
HRESULT
VLCPlugin
::
getVLCObject
(
int
*
i_vlc
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
result
=
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
result
)
)
{
*
i_vlc
=
libvlc_get_vlc_id
(
p_libvlc
);
}
else
{
*
i_vlc
=
0
;
}
return
result
;
}
HRESULT
VLCPlugin
::
getVLC
(
libvlc_instance_t
**
pp_libvlc
)
HRESULT
VLCPlugin
::
getVLC
(
libvlc_instance_t
**
pp_libvlc
)
{
{
extern
HMODULE
DllGetModule
();
extern
HMODULE
DllGetModule
();
...
@@ -485,16 +470,21 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
...
@@ -485,16 +470,21 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
/* common settings */
/* common settings */
ppsz_argv
[
ppsz_argc
++
]
=
"--no-stats"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--no-stats"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--no-media-library"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--no-media-library"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--ignore-config"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--intf=dummy"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--intf=dummy"
;
// loop mode is a configuration option only
// loop mode is a configuration option only
if
(
_b_autoloop
)
if
(
_b_autoloop
)
ppsz_argv
[
ppsz_argc
++
]
=
"--loop"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--loop"
;
_p_libvlc
=
libvlc_new
(
ppsz_argc
,
ppsz_argv
,
NULL
);
libvlc_exception_t
ex
;
if
(
NULL
==
_p_libvlc
)
libvlc_exception_init
(
&
ex
);
_p_libvlc
=
libvlc_new
(
ppsz_argc
,
ppsz_argv
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
*
pp_libvlc
=
NULL
;
*
pp_libvlc
=
NULL
;
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -668,7 +658,8 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
...
@@ -668,7 +658,8 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
_p_libvlc
=
NULL
;
_p_libvlc
=
NULL
;
vlcDataObject
->
onClose
();
vlcDataObject
->
onClose
();
libvlc_release
(
p_libvlc
);
if
(
p_libvlc
)
libvlc_release
(
p_libvlc
);
}
}
return
S_OK
;
return
S_OK
;
};
};
...
...
projects/activex/plugin.h
View file @
763b6733
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include <olectl.h>
#include <olectl.h>
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc/libvlc.h>
extern
"C"
const
GUID
CLSID_VLCPlugin
;
extern
"C"
const
GUID
CLSID_VLCPlugin
;
extern
"C"
const
GUID
CLSID_VLCPlugin2
;
extern
"C"
const
GUID
CLSID_VLCPlugin2
;
...
@@ -194,7 +193,6 @@ public:
...
@@ -194,7 +193,6 @@ public:
inline
void
setDirty
(
BOOL
dirty
)
{
_b_dirty
=
dirty
;
};
inline
void
setDirty
(
BOOL
dirty
)
{
_b_dirty
=
dirty
;
};
inline
BOOL
isRunning
(
void
)
{
return
NULL
!=
_p_libvlc
;
};
inline
BOOL
isRunning
(
void
)
{
return
NULL
!=
_p_libvlc
;
};
HRESULT
getVLCObject
(
int
*
i_vlc
);
HRESULT
getVLC
(
libvlc_instance_t
**
p_vlc
);
HRESULT
getVLC
(
libvlc_instance_t
**
p_vlc
);
void
setErrorInfo
(
REFIID
riid
,
const
char
*
description
);
void
setErrorInfo
(
REFIID
riid
,
const
char
*
description
);
...
...
projects/activex/vlccontrol.cpp
View file @
763b6733
...
@@ -123,8 +123,8 @@ STDMETHODIMP VLCControl::put_Visible(VARIANT_BOOL isVisible)
...
@@ -123,8 +123,8 @@ STDMETHODIMP VLCControl::put_Visible(VARIANT_BOOL isVisible)
STDMETHODIMP
VLCControl
::
play
(
void
)
STDMETHODIMP
VLCControl
::
play
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_Play
(
i_vlc
);
VLC_Play
(
i_vlc
);
...
@@ -135,8 +135,8 @@ STDMETHODIMP VLCControl::play(void)
...
@@ -135,8 +135,8 @@ STDMETHODIMP VLCControl::play(void)
STDMETHODIMP
VLCControl
::
pause
(
void
)
STDMETHODIMP
VLCControl
::
pause
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_Pause
(
i_vlc
);
VLC_Pause
(
i_vlc
);
...
@@ -147,8 +147,8 @@ STDMETHODIMP VLCControl::pause(void)
...
@@ -147,8 +147,8 @@ STDMETHODIMP VLCControl::pause(void)
STDMETHODIMP
VLCControl
::
stop
(
void
)
STDMETHODIMP
VLCControl
::
stop
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_Stop
(
i_vlc
);
VLC_Stop
(
i_vlc
);
...
@@ -165,11 +165,14 @@ STDMETHODIMP VLCControl::get_Playing(VARIANT_BOOL *isPlaying)
...
@@ -165,11 +165,14 @@ STDMETHODIMP VLCControl::get_Playing(VARIANT_BOOL *isPlaying)
HRESULT
result
=
NOERROR
;
HRESULT
result
=
NOERROR
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
*
isPlaying
=
VLC_IsPlaying
(
i_vlc
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
if
(
libvlc_playlist_isplaying
(
p_libvlc
,
NULL
)
)
*
isPlaying
=
VARIANT_TRUE
;
else
*
isPlaying
=
VARIANT_FALSE
;
return
NOERROR
;
return
NOERROR
;
}
}
}
}
...
@@ -185,8 +188,8 @@ STDMETHODIMP VLCControl::get_Position(float *position)
...
@@ -185,8 +188,8 @@ STDMETHODIMP VLCControl::get_Position(float *position)
HRESULT
result
=
E_UNEXPECTED
;
HRESULT
result
=
E_UNEXPECTED
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
*
position
=
VLC_PositionGet
(
i_vlc
);
*
position
=
VLC_PositionGet
(
i_vlc
);
...
@@ -202,8 +205,8 @@ STDMETHODIMP VLCControl::put_Position(float position)
...
@@ -202,8 +205,8 @@ STDMETHODIMP VLCControl::put_Position(float position)
HRESULT
result
=
E_UNEXPECTED
;
HRESULT
result
=
E_UNEXPECTED
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_PositionSet
(
i_vlc
,
position
);
VLC_PositionSet
(
i_vlc
,
position
);
...
@@ -220,8 +223,8 @@ STDMETHODIMP VLCControl::get_Time(int *seconds)
...
@@ -220,8 +223,8 @@ STDMETHODIMP VLCControl::get_Time(int *seconds)
HRESULT
result
=
NOERROR
;
HRESULT
result
=
NOERROR
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
*
seconds
=
VLC_TimeGet
(
i_vlc
);
*
seconds
=
VLC_TimeGet
(
i_vlc
);
...
@@ -245,8 +248,8 @@ STDMETHODIMP VLCControl::shuttle(int seconds)
...
@@ -245,8 +248,8 @@ STDMETHODIMP VLCControl::shuttle(int seconds)
HRESULT
result
=
E_UNEXPECTED
;
HRESULT
result
=
E_UNEXPECTED
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_TimeSet
(
i_vlc
,
seconds
,
true
);
VLC_TimeSet
(
i_vlc
,
seconds
,
true
);
...
@@ -260,11 +263,20 @@ STDMETHODIMP VLCControl::fullscreen(void)
...
@@ -260,11 +263,20 @@ STDMETHODIMP VLCControl::fullscreen(void)
HRESULT
result
=
E_UNEXPECTED
;
HRESULT
result
=
E_UNEXPECTED
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_FullScreen
(
i_vlc
);
if
(
libvlc_playlist_isplaying
(
p_libvlc
,
NULL
)
)
{
libvlc_media_player_t
*
p_md
=
libvlc_playlist_get_media_player
(
p_libvlc
,
NULL
);
if
(
p_md
)
{
libvlc_toggle_fullscreen
(
p_md
,
NULL
);
libvlc_media_player_release
(
p_md
);
}
}
}
}
}
}
return
result
;
return
result
;
...
@@ -278,8 +290,8 @@ STDMETHODIMP VLCControl::get_Length(int *seconds)
...
@@ -278,8 +290,8 @@ STDMETHODIMP VLCControl::get_Length(int *seconds)
HRESULT
result
=
NOERROR
;
HRESULT
result
=
NOERROR
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
*
seconds
=
VLC_LengthGet
(
i_vlc
);
*
seconds
=
VLC_LengthGet
(
i_vlc
);
...
@@ -295,8 +307,8 @@ STDMETHODIMP VLCControl::playFaster(void)
...
@@ -295,8 +307,8 @@ STDMETHODIMP VLCControl::playFaster(void)
HRESULT
result
=
E_UNEXPECTED
;
HRESULT
result
=
E_UNEXPECTED
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_SpeedFaster
(
i_vlc
);
VLC_SpeedFaster
(
i_vlc
);
...
@@ -310,8 +322,8 @@ STDMETHODIMP VLCControl::playSlower(void)
...
@@ -310,8 +322,8 @@ STDMETHODIMP VLCControl::playSlower(void)
HRESULT
result
=
E_UNEXPECTED
;
HRESULT
result
=
E_UNEXPECTED
;
if
(
_p_instance
->
isRunning
()
)
if
(
_p_instance
->
isRunning
()
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_SpeedSlower
(
i_vlc
);
VLC_SpeedSlower
(
i_vlc
);
...
@@ -337,8 +349,8 @@ STDMETHODIMP VLCControl::put_Volume(int volume)
...
@@ -337,8 +349,8 @@ STDMETHODIMP VLCControl::put_Volume(int volume)
STDMETHODIMP
VLCControl
::
toggleMute
(
void
)
STDMETHODIMP
VLCControl
::
toggleMute
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_VolumeMute
(
i_vlc
);
VLC_VolumeMute
(
i_vlc
);
...
@@ -351,8 +363,8 @@ STDMETHODIMP VLCControl::setVariable(BSTR name, VARIANT value)
...
@@ -351,8 +363,8 @@ STDMETHODIMP VLCControl::setVariable(BSTR name, VARIANT value)
if
(
0
==
SysStringLen
(
name
)
)
if
(
0
==
SysStringLen
(
name
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
hr
=
_p_instance
->
getVLCObject
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
hr
)
)
if
(
SUCCEEDED
(
hr
)
)
{
{
int
codePage
=
_p_instance
->
getCodePage
();
int
codePage
=
_p_instance
->
getCodePage
();
...
@@ -466,8 +478,8 @@ STDMETHODIMP VLCControl::getVariable( BSTR name, VARIANT *value)
...
@@ -466,8 +478,8 @@ STDMETHODIMP VLCControl::getVariable( BSTR name, VARIANT *value)
if
(
0
==
SysStringLen
(
name
)
)
if
(
0
==
SysStringLen
(
name
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
hr
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
hr
)
)
if
(
SUCCEEDED
(
hr
)
)
{
{
UINT
codePage
=
_p_instance
->
getCodePage
();
UINT
codePage
=
_p_instance
->
getCodePage
();
...
@@ -853,8 +865,8 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
...
@@ -853,8 +865,8 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
if
(
0
==
SysStringLen
(
uri
)
)
if
(
0
==
SysStringLen
(
uri
)
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
hr
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
hr
)
)
if
(
SUCCEEDED
(
hr
)
)
{
{
char
*
cUri
=
CStrFromBSTR
(
CP_UTF8
,
uri
);
char
*
cUri
=
CStrFromBSTR
(
CP_UTF8
,
uri
);
...
@@ -891,8 +903,8 @@ STDMETHODIMP VLCControl::get_PlaylistIndex(int *index)
...
@@ -891,8 +903,8 @@ STDMETHODIMP VLCControl::get_PlaylistIndex(int *index)
if
(
NULL
==
index
)
if
(
NULL
==
index
)
return
E_POINTER
;
return
E_POINTER
;
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
*
index
=
VLC_PlaylistIndex
(
i_vlc
);
*
index
=
VLC_PlaylistIndex
(
i_vlc
);
...
@@ -904,8 +916,8 @@ STDMETHODIMP VLCControl::get_PlaylistIndex(int *index)
...
@@ -904,8 +916,8 @@ STDMETHODIMP VLCControl::get_PlaylistIndex(int *index)
STDMETHODIMP
VLCControl
::
get_PlaylistCount
(
int
*
count
)
STDMETHODIMP
VLCControl
::
get_PlaylistCount
(
int
*
count
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
*
count
=
VLC_PlaylistNumberOfItems
(
i_vlc
);
*
count
=
VLC_PlaylistNumberOfItems
(
i_vlc
);
...
@@ -917,8 +929,8 @@ STDMETHODIMP VLCControl::get_PlaylistCount(int *count)
...
@@ -917,8 +929,8 @@ STDMETHODIMP VLCControl::get_PlaylistCount(int *count)
STDMETHODIMP
VLCControl
::
playlistNext
(
void
)
STDMETHODIMP
VLCControl
::
playlistNext
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_PlaylistNext
(
i_vlc
);
VLC_PlaylistNext
(
i_vlc
);
...
@@ -929,8 +941,8 @@ STDMETHODIMP VLCControl::playlistNext(void)
...
@@ -929,8 +941,8 @@ STDMETHODIMP VLCControl::playlistNext(void)
STDMETHODIMP
VLCControl
::
playlistPrev
(
void
)
STDMETHODIMP
VLCControl
::
playlistPrev
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_PlaylistPrev
(
i_vlc
);
VLC_PlaylistPrev
(
i_vlc
);
...
@@ -941,8 +953,8 @@ STDMETHODIMP VLCControl::playlistPrev(void)
...
@@ -941,8 +953,8 @@ STDMETHODIMP VLCControl::playlistPrev(void)
STDMETHODIMP
VLCControl
::
playlistClear
(
void
)
STDMETHODIMP
VLCControl
::
playlistClear
(
void
)
{
{
int
i_
vlc
;
libvlc_instance_t
*
p_lib
vlc
;
HRESULT
result
=
_p_instance
->
getVLC
Object
(
&
i_
vlc
);
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_lib
vlc
);
if
(
SUCCEEDED
(
result
)
)
if
(
SUCCEEDED
(
result
)
)
{
{
VLC_PlaylistClear
(
i_vlc
);
VLC_PlaylistClear
(
i_vlc
);
...
@@ -956,11 +968,11 @@ STDMETHODIMP VLCControl::get_VersionInfo(BSTR *version)
...
@@ -956,11 +968,11 @@ STDMETHODIMP VLCControl::get_VersionInfo(BSTR *version)
if
(
NULL
==
version
)
if
(
NULL
==
version
)
return
E_POINTER
;
return
E_POINTER
;
const
char
*
versionStr
=
VLC_V
ersion
();
const
char
*
versionStr
=
libvlc_get_v
ersion
();
if
(
NULL
!=
versionStr
)
if
(
NULL
!=
versionStr
)
{
{
*
version
=
BSTRFromCStr
(
CP_UTF8
,
versionStr
);
*
version
=
BSTRFromCStr
(
CP_UTF8
,
versionStr
);
return
NULL
==
*
version
?
E_OUTOFMEMORY
:
NOERROR
;
return
NULL
==
*
version
?
E_OUTOFMEMORY
:
NOERROR
;
}
}
*
version
=
NULL
;
*
version
=
NULL
;
...
...
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