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
456ee26d
Commit
456ee26d
authored
Jan 22, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activex: remove IVLCLog, IVLCMessagesIterator, IVLCMessage interface.
parent
450c4ed2
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
1185 deletions
+9
-1185
projects/activex/axvlc.idl
projects/activex/axvlc.idl
+1
-91
projects/activex/axvlc.tlb
projects/activex/axvlc.tlb
+0
-0
projects/activex/axvlc_idl.c
projects/activex/axvlc_idl.c
+1
-5
projects/activex/axvlc_idl.h
projects/activex/axvlc_idl.h
+4
-621
projects/activex/plugin.cpp
projects/activex/plugin.cpp
+0
-8
projects/activex/supporterrorinfo.cpp
projects/activex/supporterrorinfo.cpp
+2
-5
projects/activex/vlccontrol2.cpp
projects/activex/vlccontrol2.cpp
+0
-345
projects/activex/vlccontrol2.h
projects/activex/vlccontrol2.h
+1
-110
No files found.
projects/activex/axvlc.idl
View file @
456ee26d
...
@@ -40,11 +40,8 @@ library AXVLC
...
@@ -40,11 +40,8 @@ library AXVLC
interface
IVLCControl
;
interface
IVLCControl
;
interface
IVLCAudio
;
interface
IVLCAudio
;
interface
IVLCInput
;
interface
IVLCInput
;
interface
IVLCLog
;
interface
IVLCLog
o
;
interface
IVLCMarquee
;
interface
IVLCMarquee
;
interface
IVLCMessage
;
interface
IVLCMessageIterator
;
interface
IVLCMessages
;
interface
IVLCPlaylist
;
interface
IVLCPlaylist
;
interface
IVLCSubtitle
;
interface
IVLCSubtitle
;
interface
IVLCVideo
;
interface
IVLCVideo
;
...
@@ -261,90 +258,6 @@ library AXVLC
...
@@ -261,90 +258,6 @@ library AXVLC
HRESULT
hasVout
(
[
out
,
retval
]
VARIANT_BOOL
*
hasVout
)
;
HRESULT
hasVout
(
[
out
,
retval
]
VARIANT_BOOL
*
hasVout
)
;
}
;
}
;
[
odl
,
uuid
(
9
ED00AFA
-
7B
CD
-
4
FFF
-
8
D48
-
7
DD4DB2C800D
),
helpstring
(
"VLC Log Message"
),
dual
,
oleautomation
]
interface
IVLCMessage
:
IDispatch
{
[
id
(
DISPID_VALUE
),
propget
]
HRESULT
_Value
(
[
out
,
retval
]
VARIANT
*
message
)
;
[
propget
,
helpstring
(
"Returns message severity."
)
]
HRESULT
severity
(
[
out
,
retval
]
long
*
level
)
;
[
propget
,
helpstring
(
"Returns message issuer type."
)
]
HRESULT
type
(
[
out
,
retval
]
BSTR
*
type
)
;
[
propget
,
helpstring
(
"Returns message issuer name."
)
]
HRESULT
name
(
[
out
,
retval
]
BSTR
*
name
)
;
[
propget
,
helpstring
(
"Returns message header."
)
]
HRESULT
header
(
[
out
,
retval
]
BSTR
*
header
)
;
[
propget
,
helpstring
(
"Returns message content."
)
]
HRESULT
message
(
[
out
,
retval
]
BSTR
*
message
)
;
}
;
[
odl
,
uuid
(
15179
CD8
-
CC12
-
4242
-
A58E
-
E412217FF343
),
helpstring
(
"VLC Log iterator"
),
dual
,
oleautomation
]
interface
IVLCMessageIterator
:
IDispatch
{
[
propget
,
helpstring
(
"Returns whether a message is available."
)
]
HRESULT
hasNext
(
[
out
,
retval
]
VARIANT_BOOL
*
hasNext
)
;
[
helpstring
(
"Returns next message."
)
]
HRESULT
next
(
[
out
,
retval
]
IVLCMessage
**
msg
)
;
}
;
[
odl
,
uuid
(
6
C5CE55D
-
2
D6C
-
4
AAD
-
8299
-
C62D2371F106
),
helpstring
(
"VLC Log Messages Collection."
),
dual
,
oleautomation
]
interface
IVLCMessages
:
IDispatch
{
[
id
(
DISPID_NEWENUM
),
propget
]
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
**
_NewEnum
)
;
[
helpstring
(
"Clear all messages from log."
)
]
HRESULT
clear
()
;
[
propget
,
helpstring
(
"Returns the number of messages."
)
]
HRESULT
count
(
[
out
,
retval
]
long
*
count
)
;
[
helpstring
(
"Returns an iterator for messages in log"
)
]
HRESULT
iterator
(
[
out
,
retval
]
IVLCMessageIterator
**
iter
)
;
}
;
[
odl
,
uuid
(
8
E3BC3D9
-
62
E9
-
48
FB
-
8
A6D
-
993
F9ABC4A0A
),
helpstring
(
"VLC Log APIs"
),
dual
,
oleautomation
]
interface
IVLCLog
:
IDispatch
{
[
propget
,
helpstring
(
"Returns messages in log"
)
]
HRESULT
messages
(
[
out
,
retval
]
IVLCMessages
**
iter
)
;
[
propget
,
helpstring
(
"Returns/Sets the log versbosity level."
)
]
HRESULT
verbosity
(
[
out
,
retval
]
long
*
level
)
;
[
propput
,
helpstring
(
"Returns/Sets the log versbosity level."
)
]
HRESULT
verbosity
(
[
in
]
long
level
)
;
}
;
[
[
odl
,
odl
,
uuid
(
FD37FE32
-
82B
C
-
4
A25
-
B056
-
315
F4DBB194D
),
uuid
(
FD37FE32
-
82B
C
-
4
A25
-
B056
-
315
F4DBB194D
),
...
@@ -661,9 +574,6 @@ library AXVLC
...
@@ -661,9 +574,6 @@ library AXVLC
[
propget
,
helpstring
(
"Returns the audio object."
)
]
[
propget
,
helpstring
(
"Returns the audio object."
)
]
HRESULT
input
(
[
out
,
retval
]
IVLCInput
**
obj
)
;
HRESULT
input
(
[
out
,
retval
]
IVLCInput
**
obj
)
;
[
propget
,
helpstring
(
"Returns the log object."
)
]
HRESULT
log
(
[
out
,
retval
]
IVLCLog
**
obj
)
;
[
propget
,
helpstring
(
"Returns the playlist object."
)
]
[
propget
,
helpstring
(
"Returns the playlist object."
)
]
HRESULT
playlist
(
[
out
,
retval
]
IVLCPlaylist
**
obj
)
;
HRESULT
playlist
(
[
out
,
retval
]
IVLCPlaylist
**
obj
)
;
...
...
projects/activex/axvlc.tlb
View file @
456ee26d
No preview for this file type
projects/activex/axvlc_idl.c
View file @
456ee26d
/*** Autogenerated by WIDL 1.1.
23
from axvlc.idl - Do not edit ***/
/*** Autogenerated by WIDL 1.1.
32
from axvlc.idl - Do not edit ***/
#include <rpc.h>
#include <rpc.h>
#include <rpcndr.h>
#include <rpcndr.h>
...
@@ -14,10 +14,6 @@ DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x
...
@@ -14,10 +14,6 @@ DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x
DEFINE_GUID
(
DIID_DVLCEvents
,
0xdf48072f
,
0x5ef8
,
0x434e
,
0x9b
,
0x40
,
0xe2
,
0xf3
,
0xae
,
0x75
,
0x9b
,
0x5f
);
DEFINE_GUID
(
DIID_DVLCEvents
,
0xdf48072f
,
0x5ef8
,
0x434e
,
0x9b
,
0x40
,
0xe2
,
0xf3
,
0xae
,
0x75
,
0x9b
,
0x5f
);
DEFINE_GUID
(
IID_IVLCAudio
,
0x9e0bd17b
,
0x2d3c
,
0x4656
,
0xb9
,
0x4d
,
0x03
,
0x08
,
0x4f
,
0x3f
,
0xd9
,
0xd4
);
DEFINE_GUID
(
IID_IVLCAudio
,
0x9e0bd17b
,
0x2d3c
,
0x4656
,
0xb9
,
0x4d
,
0x03
,
0x08
,
0x4f
,
0x3f
,
0xd9
,
0xd4
);
DEFINE_GUID
(
IID_IVLCInput
,
0x49e0dbd1
,
0x9440
,
0x466c
,
0x9c
,
0x97
,
0x95
,
0xc6
,
0x71
,
0x90
,
0xc6
,
0x03
);
DEFINE_GUID
(
IID_IVLCInput
,
0x49e0dbd1
,
0x9440
,
0x466c
,
0x9c
,
0x97
,
0x95
,
0xc6
,
0x71
,
0x90
,
0xc6
,
0x03
);
DEFINE_GUID
(
IID_IVLCMessage
,
0x9ed00afa
,
0x7bcd
,
0x4fff
,
0x8d
,
0x48
,
0x7d
,
0xd4
,
0xdb
,
0x2c
,
0x80
,
0x0d
);
DEFINE_GUID
(
IID_IVLCMessageIterator
,
0x15179cd8
,
0xcc12
,
0x4242
,
0xa5
,
0x8e
,
0xe4
,
0x12
,
0x21
,
0x7f
,
0xf3
,
0x43
);
DEFINE_GUID
(
IID_IVLCMessages
,
0x6c5ce55d
,
0x2d6c
,
0x4aad
,
0x82
,
0x99
,
0xc6
,
0x2d
,
0x23
,
0x71
,
0xf1
,
0x06
);
DEFINE_GUID
(
IID_IVLCLog
,
0x8e3bc3d9
,
0x62e9
,
0x48fb
,
0x8a
,
0x6d
,
0x99
,
0x3f
,
0x9a
,
0xbc
,
0x4a
,
0x0a
);
DEFINE_GUID
(
IID_IVLCPlaylistItems
,
0xfd37fe32
,
0x82bc
,
0x4a25
,
0xb0
,
0x56
,
0x31
,
0x5f
,
0x4d
,
0xbb
,
0x19
,
0x4d
);
DEFINE_GUID
(
IID_IVLCPlaylistItems
,
0xfd37fe32
,
0x82bc
,
0x4a25
,
0xb0
,
0x56
,
0x31
,
0x5f
,
0x4d
,
0xbb
,
0x19
,
0x4d
);
DEFINE_GUID
(
IID_IVLCPlaylist
,
0x54613049
,
0x40bf
,
0x4035
,
0x9e
,
0x70
,
0x0a
,
0x93
,
0x12
,
0xc0
,
0x18
,
0x8d
);
DEFINE_GUID
(
IID_IVLCPlaylist
,
0x54613049
,
0x40bf
,
0x4035
,
0x9e
,
0x70
,
0x0a
,
0x93
,
0x12
,
0xc0
,
0x18
,
0x8d
);
DEFINE_GUID
(
IID_IVLCSubtitle
,
0x465e787a
,
0x0556
,
0x452f
,
0x94
,
0x77
,
0x95
,
0x4e
,
0x4a
,
0x94
,
0x00
,
0x03
);
DEFINE_GUID
(
IID_IVLCSubtitle
,
0x465e787a
,
0x0556
,
0x452f
,
0x94
,
0x77
,
0x95
,
0x4e
,
0x4a
,
0x94
,
0x00
,
0x03
);
...
...
projects/activex/axvlc_idl.h
View file @
456ee26d
This diff is collapsed.
Click to expand it.
projects/activex/plugin.cpp
View file @
456ee26d
...
@@ -656,14 +656,6 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
...
@@ -656,14 +656,6 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
{
{
libvlc_instance_t
*
p_libvlc
=
_p_libvlc
;
libvlc_instance_t
*
p_libvlc
=
_p_libvlc
;
IVLCLog
*
p_log
;
if
(
SUCCEEDED
(
vlcControl2
->
get_log
(
&
p_log
))
)
{
// make sure the log is disabled
p_log
->
put_verbosity
(
-
1
);
p_log
->
Release
();
}
_p_libvlc
=
NULL
;
_p_libvlc
=
NULL
;
vlcDataObject
->
onClose
();
vlcDataObject
->
onClose
();
...
...
projects/activex/supporterrorinfo.cpp
View file @
456ee26d
/*****************************************************************************
/*****************************************************************************
* supporterrorinfo.cpp: ActiveX control for VLC
* supporterrorinfo.cpp: ActiveX control for VLC
*****************************************************************************
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* Copyright (C) 2005
-2010
the VideoLAN team
*
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
*
*
...
@@ -32,11 +32,8 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
...
@@ -32,11 +32,8 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
{
{
if
(
(
riid
==
IID_IVLCAudio
)
if
(
(
riid
==
IID_IVLCAudio
)
||
(
riid
==
IID_IVLCInput
)
||
(
riid
==
IID_IVLCInput
)
||
(
riid
==
IID_IVLCLog
)
||
(
riid
==
IID_IVLCMarquee
)
||
(
riid
==
IID_IVLCMarquee
)
||
(
riid
==
IID_IVLCMessage
)
||
(
riid
==
IID_IVLCLogo
)
||
(
riid
==
IID_IVLCMessageIterator
)
||
(
riid
==
IID_IVLCMessages
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCPlaylistItems
)
||
(
riid
==
IID_IVLCPlaylistItems
)
||
(
riid
==
IID_IVLCSubtitle
)
||
(
riid
==
IID_IVLCSubtitle
)
...
...
projects/activex/vlccontrol2.cpp
View file @
456ee26d
...
@@ -63,10 +63,6 @@ HRESULT VLCInterfaceBase::loadTypeInfo(REFIID riid)
...
@@ -63,10 +63,6 @@ HRESULT VLCInterfaceBase::loadTypeInfo(REFIID riid)
BIND_INTERFACE
(
VLCAudio
)
BIND_INTERFACE
(
VLCAudio
)
BIND_INTERFACE
(
VLCInput
)
BIND_INTERFACE
(
VLCInput
)
BIND_INTERFACE
(
VLCMessage
)
BIND_INTERFACE
(
VLCMessages
)
BIND_INTERFACE
(
VLCMessageIterator
)
BIND_INTERFACE
(
VLCLog
)
BIND_INTERFACE
(
VLCMarquee
)
BIND_INTERFACE
(
VLCMarquee
)
BIND_INTERFACE
(
VLCLogo
)
BIND_INTERFACE
(
VLCLogo
)
BIND_INTERFACE
(
VLCPlaylistItems
)
BIND_INTERFACE
(
VLCPlaylistItems
)
...
@@ -473,80 +469,6 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
...
@@ -473,80 +469,6 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
/****************************************************************************/
/****************************************************************************/
VLCLog
::~
VLCLog
()
{
delete
_p_vlcmessages
;
if
(
_p_log
)
libvlc_log_close
(
_p_log
);
}
STDMETHODIMP
VLCLog
::
get_messages
(
IVLCMessages
**
obj
)
{
if
(
NULL
==
obj
)
return
E_POINTER
;
*
obj
=
_p_vlcmessages
;
if
(
NULL
!=
_p_vlcmessages
)
{
_p_vlcmessages
->
AddRef
();
return
NOERROR
;
}
return
E_OUTOFMEMORY
;
};
STDMETHODIMP
VLCLog
::
get_verbosity
(
long
*
level
)
{
if
(
NULL
==
level
)
return
E_POINTER
;
if
(
_p_log
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
*
level
=
libvlc_get_log_verbosity
(
p_libvlc
);
return
hr
;
}
else
{
/* log is not enabled, return -1 */
*
level
=
-
1
;
return
NOERROR
;
}
};
STDMETHODIMP
VLCLog
::
put_verbosity
(
long
verbosity
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
if
(
verbosity
>=
0
)
{
if
(
!
_p_log
)
{
_p_log
=
libvlc_log_open
(
p_libvlc
,
&
ex
);
hr
=
exception_bridge
(
&
ex
);
}
if
(
SUCCEEDED
(
hr
)
)
libvlc_set_log_verbosity
(
p_libvlc
,
(
unsigned
)
verbosity
);
}
else
if
(
_p_log
)
{
/* close log when verbosity is set to -1 */
libvlc_log_close
(
_p_log
);
_p_log
=
NULL
;
}
hr
=
exception_bridge
(
&
ex
);
}
return
hr
;
};
/****************************************************************************/
HRESULT
VLCMarquee
::
do_put_int
(
unsigned
idx
,
LONG
val
)
HRESULT
VLCMarquee
::
do_put_int
(
unsigned
idx
,
LONG
val
)
{
{
libvlc_media_player_t
*
p_md
;
libvlc_media_player_t
*
p_md
;
...
@@ -650,266 +572,6 @@ STDMETHODIMP VLCMarquee::put_text(BSTR val)
...
@@ -650,266 +572,6 @@ STDMETHODIMP VLCMarquee::put_text(BSTR val)
/****************************************************************************/
/****************************************************************************/
/* STL forward iterator used by VLCEnumIterator class to implement IEnumVARIANT */
class
VLCMessageSTLIterator
{
public:
VLCMessageSTLIterator
(
IVLCMessageIterator
*
iter
)
:
iter
(
iter
),
msg
(
NULL
)
{
// get first message
operator
++
();
};
VLCMessageSTLIterator
(
const
VLCMessageSTLIterator
&
other
)
{
iter
=
other
.
iter
;
if
(
iter
)
iter
->
AddRef
();
msg
=
other
.
msg
;
if
(
msg
)
msg
->
AddRef
();
};
virtual
~
VLCMessageSTLIterator
()
{
if
(
msg
)
msg
->
Release
();
if
(
iter
)
iter
->
Release
();
};
// we only need prefix ++ operator
VLCMessageSTLIterator
&
operator
++
()
{
VARIANT_BOOL
hasNext
=
VARIANT_FALSE
;
if
(
iter
)
{
iter
->
get_hasNext
(
&
hasNext
);
if
(
msg
)
{
msg
->
Release
();
msg
=
NULL
;
}
if
(
VARIANT_TRUE
==
hasNext
)
{
iter
->
next
(
&
msg
);
}
}
return
*
this
;
};
VARIANT
operator
*
()
const
{
VARIANT
v
;
VariantInit
(
&
v
);
if
(
msg
)
{
if
(
SUCCEEDED
(
msg
->
QueryInterface
(
IID_IDispatch
,
(
LPVOID
*
)
&
V_DISPATCH
(
&
v
)))
)
{
V_VT
(
&
v
)
=
VT_DISPATCH
;
}
}
return
v
;
};
bool
operator
==
(
const
VLCMessageSTLIterator
&
other
)
const
{
return
msg
==
other
.
msg
;
};
bool
operator
!=
(
const
VLCMessageSTLIterator
&
other
)
const
{
return
msg
!=
other
.
msg
;
};
private:
IVLCMessageIterator
*
iter
;
IVLCMessage
*
msg
;
};
//////////////////////////////////////////////////////////////////////////////
STDMETHODIMP
VLCMessages
::
get__NewEnum
(
LPUNKNOWN
*
_NewEnum
)
{
if
(
NULL
==
_NewEnum
)
return
E_POINTER
;
IVLCMessageIterator
*
iter
=
NULL
;
iterator
(
&
iter
);
*
_NewEnum
=
new
VLCEnumIterator
<
IID_IEnumVARIANT
,
IEnumVARIANT
,
VARIANT
,
VLCMessageSTLIterator
>
(
VLCMessageSTLIterator
(
iter
),
VLCMessageSTLIterator
(
NULL
));
return
*
_NewEnum
?
S_OK
:
E_OUTOFMEMORY
;
};
STDMETHODIMP
VLCMessages
::
clear
()
{
libvlc_log_t
*
p_log
=
_p_vlclog
->
_p_log
;
if
(
p_log
)
libvlc_log_clear
(
p_log
);
return
NOERROR
;
};
STDMETHODIMP
VLCMessages
::
get_count
(
long
*
count
)
{
if
(
NULL
==
count
)
return
E_POINTER
;
libvlc_log_t
*
p_log
=
_p_vlclog
->
_p_log
;
*
count
=
libvlc_log_count
(
p_log
);
return
S_OK
;
};
STDMETHODIMP
VLCMessages
::
iterator
(
IVLCMessageIterator
**
iter
)
{
if
(
NULL
==
iter
)
return
E_POINTER
;
*
iter
=
new
VLCMessageIterator
(
Instance
(),
_p_vlclog
);
return
*
iter
?
S_OK
:
E_OUTOFMEMORY
;
};
/****************************************************************************/
VLCMessageIterator
::
VLCMessageIterator
(
VLCPlugin
*
p
,
VLCLog
*
p_vlclog
)
:
VLCInterface
<
VLCMessageIterator
,
IVLCMessageIterator
>
(
p
),
_refcount
(
1
),
_p_vlclog
(
p_vlclog
),
_p_iter
(
_p_vlclog
&&
_p_vlclog
->
_p_log
?
libvlc_log_get_iterator
(
_p_vlclog
->
_p_log
,
NULL
)
:
NULL
)
{
}
STDMETHODIMP
VLCMessageIterator
::
get_hasNext
(
VARIANT_BOOL
*
hasNext
)
{
if
(
NULL
==
hasNext
)
return
E_POINTER
;
*
hasNext
=
(
_p_iter
&&
_p_vlclog
->
_p_log
&&
libvlc_log_iterator_has_next
(
_p_iter
))
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
};
STDMETHODIMP
VLCMessageIterator
::
next
(
IVLCMessage
**
message
)
{
HRESULT
hr
=
S_OK
;
if
(
NULL
==
message
)
return
E_POINTER
;
if
(
_p_iter
&&
_p_vlclog
->
_p_log
)
{
struct
libvlc_log_message_t
buffer
;
buffer
.
sizeof_msg
=
sizeof
(
buffer
);
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_log_iterator_next
(
_p_iter
,
&
buffer
,
&
ex
);
*
message
=
new
VLCMessage
(
Instance
(),
buffer
);
if
(
!
message
)
hr
=
E_OUTOFMEMORY
;
}
return
hr
;
};
/****************************************************************************/
inline
const
char
*
msgSeverity
(
int
sev
)
{
switch
(
sev
)
{
case
0
:
return
"info"
;
case
1
:
return
"error"
;
case
2
:
return
"warning"
;
default:
return
"debug"
;
}
};
STDMETHODIMP
VLCMessage
::
get__Value
(
VARIANT
*
_Value
)
{
if
(
NULL
==
_Value
)
return
E_POINTER
;
char
buffer
[
256
];
snprintf
(
buffer
,
sizeof
(
buffer
),
"%s %s %s: %s"
,
_msg
.
psz_type
,
_msg
.
psz_name
,
msgSeverity
(
_msg
.
i_severity
),
_msg
.
psz_message
);
V_VT
(
_Value
)
=
VT_BSTR
;
V_BSTR
(
_Value
)
=
BSTRFromCStr
(
CP_UTF8
,
buffer
);
return
S_OK
;
};
STDMETHODIMP
VLCMessage
::
get_severity
(
long
*
level
)
{
if
(
NULL
==
level
)
return
E_POINTER
;
*
level
=
_msg
.
i_severity
;
return
S_OK
;
};
STDMETHODIMP
VLCMessage
::
get_type
(
BSTR
*
type
)
{
if
(
NULL
==
type
)
return
E_POINTER
;
*
type
=
BSTRFromCStr
(
CP_UTF8
,
_msg
.
psz_type
);
return
NOERROR
;
};
STDMETHODIMP
VLCMessage
::
get_name
(
BSTR
*
name
)
{
if
(
NULL
==
name
)
return
E_POINTER
;
*
name
=
BSTRFromCStr
(
CP_UTF8
,
_msg
.
psz_name
);
return
NOERROR
;
};
STDMETHODIMP
VLCMessage
::
get_header
(
BSTR
*
header
)
{
if
(
NULL
==
header
)
return
E_POINTER
;
*
header
=
BSTRFromCStr
(
CP_UTF8
,
_msg
.
psz_header
);
return
NOERROR
;
};
STDMETHODIMP
VLCMessage
::
get_message
(
BSTR
*
message
)
{
if
(
NULL
==
message
)
return
E_POINTER
;
*
message
=
BSTRFromCStr
(
CP_UTF8
,
_msg
.
psz_message
);
return
NOERROR
;
};
/****************************************************************************/
STDMETHODIMP
VLCPlaylistItems
::
get_count
(
long
*
count
)
STDMETHODIMP
VLCPlaylistItems
::
get_count
(
long
*
count
)
{
{
if
(
NULL
==
count
)
if
(
NULL
==
count
)
...
@@ -1782,7 +1444,6 @@ VLCControl2::VLCControl2(VLCPlugin *p_instance) :
...
@@ -1782,7 +1444,6 @@ VLCControl2::VLCControl2(VLCPlugin *p_instance) :
_p_typeinfo
(
NULL
),
_p_typeinfo
(
NULL
),
_p_vlcaudio
(
new
VLCAudio
(
p_instance
)),
_p_vlcaudio
(
new
VLCAudio
(
p_instance
)),
_p_vlcinput
(
new
VLCInput
(
p_instance
)),
_p_vlcinput
(
new
VLCInput
(
p_instance
)),
_p_vlclog
(
new
VLCLog
(
p_instance
)),
_p_vlcplaylist
(
new
VLCPlaylist
(
p_instance
)),
_p_vlcplaylist
(
new
VLCPlaylist
(
p_instance
)),
_p_vlcsubtitle
(
new
VLCSubtitle
(
p_instance
)),
_p_vlcsubtitle
(
new
VLCSubtitle
(
p_instance
)),
_p_vlcvideo
(
new
VLCVideo
(
p_instance
))
_p_vlcvideo
(
new
VLCVideo
(
p_instance
))
...
@@ -1794,7 +1455,6 @@ VLCControl2::~VLCControl2()
...
@@ -1794,7 +1455,6 @@ VLCControl2::~VLCControl2()
delete
_p_vlcvideo
;
delete
_p_vlcvideo
;
delete
_p_vlcsubtitle
;
delete
_p_vlcsubtitle
;
delete
_p_vlcplaylist
;
delete
_p_vlcplaylist
;
delete
_p_vlclog
;
delete
_p_vlcinput
;
delete
_p_vlcinput
;
delete
_p_vlcaudio
;
delete
_p_vlcaudio
;
if
(
_p_typeinfo
)
if
(
_p_typeinfo
)
...
@@ -2058,11 +1718,6 @@ STDMETHODIMP VLCControl2::get_input(IVLCInput** obj)
...
@@ -2058,11 +1718,6 @@ STDMETHODIMP VLCControl2::get_input(IVLCInput** obj)
return
object_get
(
obj
,
_p_vlcinput
);
return
object_get
(
obj
,
_p_vlcinput
);
}
}
STDMETHODIMP
VLCControl2
::
get_log
(
IVLCLog
**
obj
)
{
return
object_get
(
obj
,
_p_vlclog
);
}
STDMETHODIMP
VLCControl2
::
get_playlist
(
IVLCPlaylist
**
obj
)
STDMETHODIMP
VLCControl2
::
get_playlist
(
IVLCPlaylist
**
obj
)
{
{
return
object_get
(
obj
,
_p_vlcplaylist
);
return
object_get
(
obj
,
_p_vlcplaylist
);
...
...
projects/activex/vlccontrol2.h
View file @
456ee26d
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* vlccontrol.h: ActiveX control for VLC
* vlccontrol.h: ActiveX control for VLC
*****************************************************************************
*****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* Copyright (C) 2006 the VideoLAN team
* Copyright (C) 2010 M2X BV
*
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
...
@@ -172,114 +173,6 @@ public:
...
@@ -172,114 +173,6 @@ public:
STDMETHODIMP
get_hasVout
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_hasVout
(
VARIANT_BOOL
*
);
};
};
class
VLCMessage
:
public
VLCInterface
<
VLCMessage
,
IVLCMessage
>
{
public:
VLCMessage
(
VLCPlugin
*
p
,
struct
libvlc_log_message_t
&
msg
)
:
VLCInterface
<
VLCMessage
,
IVLCMessage
>
(
p
),
_refcount
(
1
),
_msg
(
msg
)
{
}
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
InterlockedIncrement
(
&
_refcount
);
}
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
_refcount
);
if
(
0
==
refcount
)
{
delete
this
;
return
0
;
}
return
refcount
;
};
// IVLCMessage methods
STDMETHODIMP
get__Value
(
VARIANT
*
);
STDMETHODIMP
get_severity
(
long
*
);
STDMETHODIMP
get_type
(
BSTR
*
);
STDMETHODIMP
get_name
(
BSTR
*
);
STDMETHODIMP
get_header
(
BSTR
*
);
STDMETHODIMP
get_message
(
BSTR
*
);
private:
LONG
_refcount
;
struct
libvlc_log_message_t
_msg
;
};
class
VLCLog
;
class
VLCMessageIterator
:
public
VLCInterface
<
VLCMessageIterator
,
IVLCMessageIterator
>
{
public:
VLCMessageIterator
(
VLCPlugin
*
p
,
VLCLog
*
p_vlclog
);
~
VLCMessageIterator
()
{
if
(
_p_iter
)
libvlc_log_iterator_free
(
_p_iter
);
}
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
InterlockedIncrement
(
&
_refcount
);
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
_refcount
);
if
(
0
==
refcount
)
{
delete
this
;
return
0
;
}
return
refcount
;
}
// IVLCMessageIterator methods
STDMETHODIMP
get_hasNext
(
VARIANT_BOOL
*
);
STDMETHODIMP
next
(
IVLCMessage
**
);
private:
LONG
_refcount
;
VLCLog
*
_p_vlclog
;
libvlc_log_iterator_t
*
_p_iter
;
};
class
VLCMessages
:
public
VLCInterface
<
VLCMessages
,
IVLCMessages
>
{
public:
VLCMessages
(
VLCPlugin
*
p
,
VLCLog
*
p_vlclog
)
:
VLCInterface
<
VLCMessages
,
IVLCMessages
>
(
p
),
_p_vlclog
(
p_vlclog
)
{
}
// IVLCMessages methods
STDMETHODIMP
get__NewEnum
(
LPUNKNOWN
*
);
STDMETHODIMP
clear
();
STDMETHODIMP
get_count
(
long
*
);
STDMETHODIMP
iterator
(
IVLCMessageIterator
**
);
protected:
VLCLog
*
_p_vlclog
;
};
class
VLCLog
:
public
VLCInterface
<
VLCLog
,
IVLCLog
>
{
public:
friend
class
VLCMessages
;
friend
class
VLCMessageIterator
;
VLCLog
(
VLCPlugin
*
p
)
:
VLCInterface
<
VLCLog
,
IVLCLog
>
(
p
),
_p_log
(
NULL
),
_p_vlcmessages
(
new
VLCMessages
(
p
,
this
))
{
}
virtual
~
VLCLog
();
// IVLCLog methods
STDMETHODIMP
get_messages
(
IVLCMessages
**
);
STDMETHODIMP
get_verbosity
(
long
*
);
STDMETHODIMP
put_verbosity
(
long
);
protected:
libvlc_log_t
*
_p_log
;
IVLCMessages
*
_p_vlcmessages
;
};
class
VLCMarquee
:
public
VLCInterface
<
VLCMarquee
,
IVLCMarquee
>
class
VLCMarquee
:
public
VLCInterface
<
VLCMarquee
,
IVLCMarquee
>
{
{
public:
public:
...
@@ -484,7 +377,6 @@ public:
...
@@ -484,7 +377,6 @@ public:
STDMETHODIMP
get_audio
(
IVLCAudio
**
);
STDMETHODIMP
get_audio
(
IVLCAudio
**
);
STDMETHODIMP
get_input
(
IVLCInput
**
);
STDMETHODIMP
get_input
(
IVLCInput
**
);
STDMETHODIMP
get_log
(
IVLCLog
**
);
STDMETHODIMP
get_playlist
(
IVLCPlaylist
**
);
STDMETHODIMP
get_playlist
(
IVLCPlaylist
**
);
STDMETHODIMP
get_subtitle
(
IVLCSubtitle
**
);
STDMETHODIMP
get_subtitle
(
IVLCSubtitle
**
);
STDMETHODIMP
get_video
(
IVLCVideo
**
);
STDMETHODIMP
get_video
(
IVLCVideo
**
);
...
@@ -498,7 +390,6 @@ private:
...
@@ -498,7 +390,6 @@ private:
IVLCAudio
*
_p_vlcaudio
;
IVLCAudio
*
_p_vlcaudio
;
IVLCInput
*
_p_vlcinput
;
IVLCInput
*
_p_vlcinput
;
IVLCLog
*
_p_vlclog
;
IVLCPlaylist
*
_p_vlcplaylist
;
IVLCPlaylist
*
_p_vlcplaylist
;
IVLCSubtitle
*
_p_vlcsubtitle
;
IVLCSubtitle
*
_p_vlcsubtitle
;
IVLCVideo
*
_p_vlcvideo
;
IVLCVideo
*
_p_vlcvideo
;
...
...
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