Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
817653d9
Commit
817653d9
authored
Oct 27, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- add log APIs to Activex
- cleanup
parent
54ca1c9a
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1775 additions
and
173 deletions
+1775
-173
activex/axvlc.idl
activex/axvlc.idl
+117
-18
activex/axvlc.tlb
activex/axvlc.tlb
+0
-0
activex/axvlc_idl.c
activex/axvlc_idl.c
+4
-0
activex/axvlc_idl.h
activex/axvlc_idl.h
+656
-54
activex/supporterrorinfo.cpp
activex/supporterrorinfo.cpp
+4
-0
activex/test.html
activex/test.html
+78
-64
activex/vlccontrol.cpp
activex/vlccontrol.cpp
+1
-1
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+657
-18
activex/vlccontrol2.h
activex/vlccontrol2.h
+258
-18
No files found.
activex/axvlc.idl
View file @
817653d9
...
@@ -36,6 +36,10 @@ library AXVLC
...
@@ -36,6 +36,10 @@ library AXVLC
interface
IVLCControl
;
interface
IVLCControl
;
interface
IVLCAudio
;
interface
IVLCAudio
;
interface
IVLCInput
;
interface
IVLCInput
;
interface
IVLCLog
;
interface
IVLCMessage
;
interface
IVLCMessageIterator
;
interface
IVLCMessages
;
interface
IVLCPlaylist
;
interface
IVLCPlaylist
;
interface
IVLCVideo
;
interface
IVLCVideo
;
interface
IVLCControl2
;
interface
IVLCControl2
;
...
@@ -192,9 +196,9 @@ library AXVLC
...
@@ -192,9 +196,9 @@ library AXVLC
HRESULT
mute
(
[
in
]
VARIANT_BOOL
muted
)
;
HRESULT
mute
(
[
in
]
VARIANT_BOOL
muted
)
;
[
propget
,
helpstring
(
"Returns/sets audio volume as a percent value."
)
]
[
propget
,
helpstring
(
"Returns/sets audio volume as a percent value."
)
]
HRESULT
volume
(
[
out
,
retval
]
int
*
volume
)
;
HRESULT
volume
(
[
out
,
retval
]
long
*
volume
)
;
[
propput
,
helpstring
(
"Returns/sets audio volume as a percent value."
)
]
[
propput
,
helpstring
(
"Returns/sets audio volume as a percent value."
)
]
HRESULT
volume
(
[
in
]
int
volume
)
;
HRESULT
volume
(
[
in
]
long
volume
)
;
[
helpstring
(
"Mute/unmute audio playback."
)
]
[
helpstring
(
"Mute/unmute audio playback."
)
]
HRESULT
toggleMute
()
;
HRESULT
toggleMute
()
;
...
@@ -215,9 +219,9 @@ library AXVLC
...
@@ -215,9 +219,9 @@ library AXVLC
HRESULT
length
(
[
out
,
retval
]
double
*
length
)
;
HRESULT
length
(
[
out
,
retval
]
double
*
length
)
;
[
propget
,
helpstring
(
"Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0."
)
]
[
propget
,
helpstring
(
"Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0."
)
]
HRESULT
position
(
[
out
,
retval
]
float
*
position
)
;
HRESULT
position
(
[
out
,
retval
]
double
*
position
)
;
[
propput
,
helpstring
(
"Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0."
)
]
[
propput
,
helpstring
(
"Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0."
)
]
HRESULT
position
(
[
in
]
float
position
)
;
HRESULT
position
(
[
in
]
double
position
)
;
[
propget
,
helpstring
(
"Returns/sets playback time in current clip, in milliseconds."
)
]
[
propget
,
helpstring
(
"Returns/sets playback time in current clip, in milliseconds."
)
]
HRESULT
time
(
[
out
,
retval
]
double
*
time
)
;
HRESULT
time
(
[
out
,
retval
]
double
*
time
)
;
...
@@ -225,20 +229,112 @@ library AXVLC
...
@@ -225,20 +229,112 @@ library AXVLC
HRESULT
time
(
[
in
]
double
time
)
;
HRESULT
time
(
[
in
]
double
time
)
;
[
propget
,
helpstring
(
"Returns current playback state."
)
]
[
propget
,
helpstring
(
"Returns current playback state."
)
]
HRESULT
state
(
[
out
,
retval
]
int
*
state
)
;
HRESULT
state
(
[
out
,
retval
]
long
*
state
)
;
[
propget
,
helpstring
(
"Returns/sets current playback rate, normal rate is 1.0 "
)
]
[
propget
,
helpstring
(
"Returns/sets current playback rate, normal rate is 1.0 "
)
]
HRESULT
rate
(
[
out
,
retval
]
float
*
rate
)
;
HRESULT
rate
(
[
out
,
retval
]
double
*
rate
)
;
[
propput
,
helpstring
(
"Returns/sets current playback rate, normal rate is 1.0."
)
]
[
propput
,
helpstring
(
"Returns/sets current playback rate, normal rate is 1.0."
)
]
HRESULT
rate
(
[
in
]
float
rate
)
;
HRESULT
rate
(
[
in
]
double
rate
)
;
[
propget
,
helpstring
(
"Returns current playback frames per seconds if available."
)
]
[
propget
,
helpstring
(
"Returns current playback frames per seconds if available."
)
]
HRESULT
fps
(
[
out
,
retval
]
float
*
fps
)
;
HRESULT
fps
(
[
out
,
retval
]
double
*
fps
)
;
[
propget
,
helpstring
(
"Returns whether current playback displays video."
)
]
[
propget
,
helpstring
(
"Returns whether current playback displays video."
)
]
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"
),
hidden
,
dual
,
nonextensible
,
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"
),
hidden
,
dual
,
nonextensible
,
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 APIs"
),
hidden
,
dual
,
nonextensible
,
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"
),
hidden
,
dual
,
nonextensible
,
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
(
54613049
-
40B
F
-
4035
-
9
E70
-
0
A9312C0188D
),
uuid
(
54613049
-
40B
F
-
4035
-
9
E70
-
0
A9312C0188D
),
...
@@ -251,19 +347,19 @@ library AXVLC
...
@@ -251,19 +347,19 @@ library AXVLC
interface
IVLCPlaylist
:
IDispatch
interface
IVLCPlaylist
:
IDispatch
{
{
[
propget
,
helpstring
(
"Returns number of items in playlist."
)
]
[
propget
,
helpstring
(
"Returns number of items in playlist."
)
]
HRESULT
itemCount
(
[
out
,
retval
]
int
*
count
)
;
HRESULT
itemCount
(
[
out
,
retval
]
long
*
count
)
;
[
propget
,
helpstring
(
"Returns whether playback displays video."
)
]
[
propget
,
helpstring
(
"Returns whether playback displays video."
)
]
HRESULT
isPlaying
(
[
out
,
retval
]
VARIANT_BOOL
*
playing
)
;
HRESULT
isPlaying
(
[
out
,
retval
]
VARIANT_BOOL
*
playing
)
;
[
helpstring
(
"Add a playlist item."
)
]
[
helpstring
(
"Add a playlist item."
)
]
HRESULT
add
(
[
in
]
BSTR
uri
,
[
in
,
optional
]
VARIANT
name
,
[
in
,
optional
]
VARIANT
options
,
[
out
,
retval
]
int
*
item
)
;
HRESULT
add
(
[
in
]
BSTR
uri
,
[
in
,
optional
]
VARIANT
name
,
[
in
,
optional
]
VARIANT
options
,
[
out
,
retval
]
long
*
item
)
;
[
helpstring
(
"Play/Resume the playlist."
)
]
[
helpstring
(
"Play/Resume the playlist."
)
]
HRESULT
play
()
;
HRESULT
play
()
;
[
helpstring
(
"Play item in playlist."
)
]
[
helpstring
(
"Play item in playlist."
)
]
HRESULT
playItem
(
[
in
]
int
item
)
;
HRESULT
playItem
(
[
in
]
long
item
)
;
[
helpstring
(
"Play/Pause current clip."
)
]
[
helpstring
(
"Play/Pause current clip."
)
]
HRESULT
togglePause
()
;
HRESULT
togglePause
()
;
...
@@ -281,7 +377,7 @@ library AXVLC
...
@@ -281,7 +377,7 @@ library AXVLC
HRESULT
clear
()
;
HRESULT
clear
()
;
[
helpstring
(
"remove item from playlist."
)
]
[
helpstring
(
"remove item from playlist."
)
]
HRESULT
removeItem
(
[
in
]
int
item
)
;
HRESULT
removeItem
(
[
in
]
long
item
)
;
}
;
}
;
[
[
...
@@ -301,10 +397,10 @@ library AXVLC
...
@@ -301,10 +397,10 @@ library AXVLC
HRESULT
fullscreen
(
[
in
]
VARIANT_BOOL
fullscreen
)
;
HRESULT
fullscreen
(
[
in
]
VARIANT_BOOL
fullscreen
)
;
[
propget
,
helpstring
(
"Returns video original width."
)
]
[
propget
,
helpstring
(
"Returns video original width."
)
]
HRESULT
width
(
[
out
,
retval
]
int
*
width
)
;
HRESULT
width
(
[
out
,
retval
]
long
*
width
)
;
[
propget
,
helpstring
(
"Returns video original height."
)
]
[
propget
,
helpstring
(
"Returns video original height."
)
]
HRESULT
height
(
[
out
,
retval
]
int
*
height
)
;
HRESULT
height
(
[
out
,
retval
]
long
*
height
)
;
[
helpstring
(
"toggle fullscreen/windowed state."
)
]
[
helpstring
(
"toggle fullscreen/windowed state."
)
]
HRESULT
toggleFullscreen
()
;
HRESULT
toggleFullscreen
()
;
...
@@ -336,9 +432,9 @@ library AXVLC
...
@@ -336,9 +432,9 @@ library AXVLC
HRESULT
BaseURL
(
[
in
]
BSTR
url
)
;
HRESULT
BaseURL
(
[
in
]
BSTR
url
)
;
[
id
(
DISPID_StartTime
),
propget
,
helpstring
(
"Returns/sets playback start time of URL."
)
]
[
id
(
DISPID_StartTime
),
propget
,
helpstring
(
"Returns/sets playback start time of URL."
)
]
HRESULT
StartTime
(
[
out
,
retval
]
int
*
seconds
)
;
HRESULT
StartTime
(
[
out
,
retval
]
long
*
seconds
)
;
[
id
(
DISPID_StartTime
),
propput
,
helpstring
(
"Returns/sets playback start time of URL."
)
]
[
id
(
DISPID_StartTime
),
propput
,
helpstring
(
"Returns/sets playback start time of URL."
)
]
HRESULT
StartTime
(
[
in
]
int
seconds
)
;
HRESULT
StartTime
(
[
in
]
long
seconds
)
;
[
id
(
DISPID_MRL
),
propget
,
helpstring
(
"Returns/sets the default MRL in playlist"
)
]
[
id
(
DISPID_MRL
),
propget
,
helpstring
(
"Returns/sets the default MRL in playlist"
)
]
HRESULT
MRL
(
[
out
,
retval
]
BSTR
*
mrl
)
;
HRESULT
MRL
(
[
out
,
retval
]
BSTR
*
mrl
)
;
...
@@ -354,9 +450,9 @@ library AXVLC
...
@@ -354,9 +450,9 @@ library AXVLC
HRESULT
Visible
(
[
in
]
VARIANT_BOOL
visible
)
;
HRESULT
Visible
(
[
in
]
VARIANT_BOOL
visible
)
;
[
id
(
DISPID_Volume
),
propget
,
helpstring
(
"Returns/sets default audio volume."
)
]
[
id
(
DISPID_Volume
),
propget
,
helpstring
(
"Returns/sets default audio volume."
)
]
HRESULT
Volume
(
[
out
,
retval
]
int
*
volume
)
;
HRESULT
Volume
(
[
out
,
retval
]
long
*
volume
)
;
[
id
(
DISPID_Volume
),
propput
,
helpstring
(
"Returns/sets default audio volume."
)
]
[
id
(
DISPID_Volume
),
propput
,
helpstring
(
"Returns/sets default audio volume."
)
]
HRESULT
Volume
(
[
in
]
int
volume
)
;
HRESULT
Volume
(
[
in
]
long
volume
)
;
[
propget
,
helpstring
(
"Returns the audio object."
)
]
[
propget
,
helpstring
(
"Returns the audio object."
)
]
HRESULT
audio
(
[
out
,
retval
]
IVLCAudio
**
obj
)
;
HRESULT
audio
(
[
out
,
retval
]
IVLCAudio
**
obj
)
;
...
@@ -364,6 +460,9 @@ library AXVLC
...
@@ -364,6 +460,9 @@ 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
)
;
...
...
activex/axvlc.tlb
View file @
817653d9
No preview for this file type
activex/axvlc_idl.c
View file @
817653d9
...
@@ -15,6 +15,10 @@ DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x
...
@@ -15,6 +15,10 @@ 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_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_IVLCVideo
,
0x0aaedf0b
,
0xd333
,
0x4b27
,
0xa0
,
0xc6
,
0xbb
,
0xf3
,
0x14
,
0x13
,
0xa4
,
0x2e
);
DEFINE_GUID
(
IID_IVLCVideo
,
0x0aaedf0b
,
0xd333
,
0x4b27
,
0xa0
,
0xc6
,
0xbb
,
0xf3
,
0x14
,
0x13
,
0xa4
,
0x2e
);
DEFINE_GUID
(
IID_IVLCControl2
,
0x2d719729
,
0x5333
,
0x406c
,
0xbf
,
0x12
,
0x8d
,
0xe7
,
0x87
,
0xfd
,
0x65
,
0xe3
);
DEFINE_GUID
(
IID_IVLCControl2
,
0x2d719729
,
0x5333
,
0x406c
,
0xbf
,
0x12
,
0x8d
,
0xe7
,
0x87
,
0xfd
,
0x65
,
0xe3
);
...
...
activex/axvlc_idl.h
View file @
817653d9
This diff is collapsed.
Click to expand it.
activex/supporterrorinfo.cpp
View file @
817653d9
...
@@ -32,6 +32,10 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
...
@@ -32,6 +32,10 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
{
{
if
(
(
riid
==
IID_IVLCAudio
)
if
(
(
riid
==
IID_IVLCAudio
)
||
(
riid
==
IID_IVLCInput
)
||
(
riid
==
IID_IVLCInput
)
||
(
riid
==
IID_IVLCLog
)
||
(
riid
==
IID_IVLCMessage
)
||
(
riid
==
IID_IVLCMessageIterator
)
||
(
riid
==
IID_IVLCMessages
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCPlaylist
)
||
(
riid
==
IID_IVLCVideo
)
||
(
riid
==
IID_IVLCVideo
)
||
(
riid
==
IID_IVLCControl2
)
)
||
(
riid
==
IID_IVLCControl2
)
)
...
...
activex/test.html
View file @
817653d9
...
@@ -96,6 +96,16 @@ function monitor()
...
@@ -96,6 +96,16 @@ function monitor()
{
{
var vlc = document.getElementById("vlc");
var vlc = document.getElementById("vlc");
var newState = vlc.input.state;
var newState = vlc.input.state;
if( vlc.log.messages.count > 0 )
{
var iter = vlc.log.messages.iterator();
while( iter.hasNext )
{
var msg = iter.next();
alert( msg );
}
vlc.log.messages.clear();
}
if( prevState != newState )
if( prevState != newState )
{
{
if( newState == 0 )
if( newState == 0 )
...
@@ -138,11 +148,13 @@ function monitor()
...
@@ -138,11 +148,13 @@ function monitor()
function doGo(targetURL)
function doGo(targetURL)
{
{
var vlc = document.getElementById("vlc");
var vlc = document.getElementById("vlc");
var options = new Array(":vout
-filter=deinterlace", ":deinterlace-mode=linear
");
var options = new Array(":vout
=directx
");
vlc.playlist.clear();
vlc.playlist.clear();
//vlc.playlist.add(targetURL, null, options);
//vlc.playlist.add(targetURL, null, options);
vlc.playlist.add(targetURL);
vlc.playlist.add(targetURL);
vlc.playlist.play();
vlc.playlist.play();
vlc.log.verbosity = 3;
vlc.log.messages.clear();
if( monitorTimerId == 0 )
if( monitorTimerId == 0 )
{
{
monitor();
monitor();
...
@@ -157,6 +169,7 @@ function doPlayOrPause()
...
@@ -157,6 +169,7 @@ function doPlayOrPause()
}
}
else
else
{
{
vlc.log.messages.clear();
vlc.playlist.play();
vlc.playlist.play();
if( monitorTimerId == 0 )
if( monitorTimerId == 0 )
{
{
...
@@ -238,6 +251,7 @@ function onPause()
...
@@ -238,6 +251,7 @@ function onPause()
};
};
function onStop()
function onStop()
{
{
vlc.log.verbosity = -1;
if( slider.Enabled )
if( slider.Enabled )
{
{
slider.Value = slider.Min;
slider.Value = slider.Min;
...
...
activex/vlccontrol.cpp
View file @
817653d9
...
@@ -845,7 +845,7 @@ STDMETHODIMP VLCControl::get_VersionInfo(BSTR *version)
...
@@ -845,7 +845,7 @@ STDMETHODIMP VLCControl::get_VersionInfo(BSTR *version)
const
char
*
versionStr
=
VLC_Version
();
const
char
*
versionStr
=
VLC_Version
();
if
(
NULL
!=
versionStr
)
if
(
NULL
!=
versionStr
)
{
{
*
version
=
BSTRFromCStr
(
_p_instance
->
getCodePage
()
,
versionStr
);
*
version
=
BSTRFromCStr
(
CP_UTF8
,
versionStr
);
return
NULL
==
*
version
?
E_OUTOFMEMORY
:
NOERROR
;
return
NULL
==
*
version
?
E_OUTOFMEMORY
:
NOERROR
;
}
}
...
...
activex/vlccontrol2.cpp
View file @
817653d9
This diff is collapsed.
Click to expand it.
activex/vlccontrol2.h
View file @
817653d9
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include "axvlc_idl.h"
#include "axvlc_idl.h"
#include <vlc/libvlc.h>
class
VLCAudio
:
public
IVLCAudio
class
VLCAudio
:
public
IVLCAudio
{
{
public:
public:
...
@@ -61,8 +63,8 @@ public:
...
@@ -61,8 +63,8 @@ public:
// IVLCAudio methods
// IVLCAudio methods
STDMETHODIMP
get_mute
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_mute
(
VARIANT_BOOL
*
);
STDMETHODIMP
put_mute
(
VARIANT_BOOL
);
STDMETHODIMP
put_mute
(
VARIANT_BOOL
);
STDMETHODIMP
get_volume
(
int
*
);
STDMETHODIMP
get_volume
(
long
*
);
STDMETHODIMP
put_volume
(
int
);
STDMETHODIMP
put_volume
(
long
);
STDMETHODIMP
toggleMute
();
STDMETHODIMP
toggleMute
();
protected:
protected:
...
@@ -110,14 +112,14 @@ public:
...
@@ -110,14 +112,14 @@ public:
// IVLCInput methods
// IVLCInput methods
STDMETHODIMP
get_length
(
double
*
);
STDMETHODIMP
get_length
(
double
*
);
STDMETHODIMP
get_position
(
float
*
);
STDMETHODIMP
get_position
(
double
*
);
STDMETHODIMP
put_position
(
float
);
STDMETHODIMP
put_position
(
double
);
STDMETHODIMP
get_time
(
double
*
);
STDMETHODIMP
get_time
(
double
*
);
STDMETHODIMP
put_time
(
double
);
STDMETHODIMP
put_time
(
double
);
STDMETHODIMP
get_state
(
int
*
);
STDMETHODIMP
get_state
(
long
*
);
STDMETHODIMP
get_rate
(
float
*
);
STDMETHODIMP
get_rate
(
double
*
);
STDMETHODIMP
put_rate
(
float
);
STDMETHODIMP
put_rate
(
double
);
STDMETHODIMP
get_fps
(
float
*
);
STDMETHODIMP
get_fps
(
double
*
);
STDMETHODIMP
get_hasVout
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_hasVout
(
VARIANT_BOOL
*
);
protected:
protected:
...
@@ -129,6 +131,242 @@ private:
...
@@ -129,6 +131,242 @@ private:
};
};
class
VLCMessage
:
public
IVLCMessage
{
public:
VLCMessage
(
VLCPlugin
*
p_instance
,
struct
libvlc_log_message_t
&
msg
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
),
_refcount
(
1
),
_msg
(
msg
)
{};
virtual
~
VLCMessage
();
// IUnknown methods
STDMETHODIMP
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
if
(
NULL
==
ppv
)
return
E_POINTER
;
if
(
(
IID_IUnknown
==
riid
)
||
(
IID_IDispatch
==
riid
)
||
(
IID_IVLCMessage
==
riid
)
)
{
AddRef
();
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
this
);
return
NOERROR
;
}
// behaves as a standalone object
return
E_NOINTERFACE
;
};
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
InterlockedIncrement
(
&
_refcount
);
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
_refcount
);
if
(
0
==
refcount
)
{
delete
this
;
return
0
;
}
return
refcount
;
};
// IDispatch methods
STDMETHODIMP
GetTypeInfoCount
(
UINT
*
);
STDMETHODIMP
GetTypeInfo
(
UINT
,
LCID
,
LPTYPEINFO
*
);
STDMETHODIMP
GetIDsOfNames
(
REFIID
,
LPOLESTR
*
,
UINT
,
LCID
,
DISPID
*
);
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
// 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
*
);
protected:
HRESULT
loadTypeInfo
();
private:
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
LONG
_refcount
;
struct
libvlc_log_message_t
_msg
;
};
class
VLCLog
;
class
VLCMessageIterator
:
public
IVLCMessageIterator
{
public:
VLCMessageIterator
(
VLCPlugin
*
p_instance
,
VLCLog
*
p_vlclog
);
virtual
~
VLCMessageIterator
();
// IUnknown methods
STDMETHODIMP
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
if
(
NULL
==
ppv
)
return
E_POINTER
;
if
(
(
IID_IUnknown
==
riid
)
||
(
IID_IDispatch
==
riid
)
||
(
IID_IVLCMessageIterator
==
riid
)
)
{
AddRef
();
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
this
);
return
NOERROR
;
}
// behaves as a standalone object
return
E_NOINTERFACE
;
};
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
InterlockedIncrement
(
&
_refcount
);
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
_refcount
);
if
(
0
==
refcount
)
{
delete
this
;
return
0
;
}
return
refcount
;
};
// IDispatch methods
STDMETHODIMP
GetTypeInfoCount
(
UINT
*
);
STDMETHODIMP
GetTypeInfo
(
UINT
,
LCID
,
LPTYPEINFO
*
);
STDMETHODIMP
GetIDsOfNames
(
REFIID
,
LPOLESTR
*
,
UINT
,
LCID
,
DISPID
*
);
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
// IVLCMessageIterator methods
STDMETHODIMP
get_hasNext
(
VARIANT_BOOL
*
);
STDMETHODIMP
next
(
IVLCMessage
**
);
protected:
HRESULT
loadTypeInfo
();
private:
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
LONG
_refcount
;
VLCLog
*
_p_vlclog
;
libvlc_log_iterator_t
*
_p_iter
;
};
class
VLCMessages
:
public
IVLCMessages
{
public:
VLCMessages
(
VLCPlugin
*
p_instance
,
VLCLog
*
p_vlclog
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
),
_p_vlclog
(
p_vlclog
)
{};
virtual
~
VLCMessages
();
// IUnknown methods
STDMETHODIMP
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
if
(
NULL
==
ppv
)
return
E_POINTER
;
if
(
(
IID_IUnknown
==
riid
)
||
(
IID_IDispatch
==
riid
)
||
(
IID_IVLCMessages
==
riid
)
)
{
AddRef
();
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
this
);
return
NOERROR
;
}
// behaves as a standalone object
return
E_NOINTERFACE
;
};
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
_p_instance
->
pUnkOuter
->
AddRef
();
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
return
_p_instance
->
pUnkOuter
->
Release
();
};
// IDispatch methods
STDMETHODIMP
GetTypeInfoCount
(
UINT
*
);
STDMETHODIMP
GetTypeInfo
(
UINT
,
LCID
,
LPTYPEINFO
*
);
STDMETHODIMP
GetIDsOfNames
(
REFIID
,
LPOLESTR
*
,
UINT
,
LCID
,
DISPID
*
);
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
// IVLCMessages methods
STDMETHODIMP
get__NewEnum
(
LPUNKNOWN
*
);
STDMETHODIMP
clear
();
STDMETHODIMP
get_count
(
long
*
);
STDMETHODIMP
iterator
(
IVLCMessageIterator
**
);
protected:
HRESULT
loadTypeInfo
();
VLCLog
*
_p_vlclog
;
private:
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
};
class
VLCLog
:
public
IVLCLog
{
public:
friend
class
VLCMessages
;
friend
class
VLCMessageIterator
;
VLCLog
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
),
_p_log
(
NULL
)
{
_p_vlcmessages
=
new
VLCMessages
(
p_instance
,
this
);
};
virtual
~
VLCLog
();
// IUnknown methods
STDMETHODIMP
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
if
(
NULL
==
ppv
)
return
E_POINTER
;
if
(
(
IID_IUnknown
==
riid
)
||
(
IID_IDispatch
==
riid
)
||
(
IID_IVLCLog
==
riid
)
)
{
AddRef
();
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
this
);
return
NOERROR
;
}
// behaves as a standalone object
return
E_NOINTERFACE
;
};
STDMETHODIMP_
(
ULONG
)
AddRef
(
void
)
{
return
_p_instance
->
pUnkOuter
->
AddRef
();
};
STDMETHODIMP_
(
ULONG
)
Release
(
void
)
{
return
_p_instance
->
pUnkOuter
->
Release
();
};
// IDispatch methods
STDMETHODIMP
GetTypeInfoCount
(
UINT
*
);
STDMETHODIMP
GetTypeInfo
(
UINT
,
LCID
,
LPTYPEINFO
*
);
STDMETHODIMP
GetIDsOfNames
(
REFIID
,
LPOLESTR
*
,
UINT
,
LCID
,
DISPID
*
);
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
// IVLCLog methods
STDMETHODIMP
get_messages
(
IVLCMessages
**
);
STDMETHODIMP
get_verbosity
(
long
*
);
STDMETHODIMP
put_verbosity
(
long
);
protected:
HRESULT
loadTypeInfo
();
libvlc_log_t
*
_p_log
;
private:
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
VLCMessages
*
_p_vlcmessages
;
};
class
VLCPlaylist
:
public
IVLCPlaylist
class
VLCPlaylist
:
public
IVLCPlaylist
{
{
public:
public:
...
@@ -163,17 +401,17 @@ public:
...
@@ -163,17 +401,17 @@ public:
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
STDMETHODIMP
Invoke
(
DISPID
,
REFIID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
UINT
*
);
// IVLCPlaylist methods
// IVLCPlaylist methods
STDMETHODIMP
get_itemCount
(
int
*
);
STDMETHODIMP
get_itemCount
(
long
*
);
STDMETHODIMP
get_isPlaying
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_isPlaying
(
VARIANT_BOOL
*
);
STDMETHODIMP
add
(
BSTR
,
VARIANT
,
VARIANT
,
int
*
);
STDMETHODIMP
add
(
BSTR
,
VARIANT
,
VARIANT
,
long
*
);
STDMETHODIMP
play
();
STDMETHODIMP
play
();
STDMETHODIMP
playItem
(
int
);
STDMETHODIMP
playItem
(
long
);
STDMETHODIMP
togglePause
();
STDMETHODIMP
togglePause
();
STDMETHODIMP
stop
();
STDMETHODIMP
stop
();
STDMETHODIMP
next
();
STDMETHODIMP
next
();
STDMETHODIMP
prev
();
STDMETHODIMP
prev
();
STDMETHODIMP
clear
();
STDMETHODIMP
clear
();
STDMETHODIMP
removeItem
(
int
);
STDMETHODIMP
removeItem
(
long
);
protected:
protected:
HRESULT
loadTypeInfo
();
HRESULT
loadTypeInfo
();
...
@@ -220,8 +458,8 @@ public:
...
@@ -220,8 +458,8 @@ public:
// IVLCVideo methods
// IVLCVideo methods
STDMETHODIMP
get_fullscreen
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_fullscreen
(
VARIANT_BOOL
*
);
STDMETHODIMP
put_fullscreen
(
VARIANT_BOOL
);
STDMETHODIMP
put_fullscreen
(
VARIANT_BOOL
);
STDMETHODIMP
get_width
(
int
*
);
STDMETHODIMP
get_width
(
long
*
);
STDMETHODIMP
get_height
(
int
*
);
STDMETHODIMP
get_height
(
long
*
);
STDMETHODIMP
toggleFullscreen
();
STDMETHODIMP
toggleFullscreen
();
protected:
protected:
...
@@ -275,16 +513,17 @@ public:
...
@@ -275,16 +513,17 @@ public:
STDMETHODIMP
put_BaseURL
(
BSTR
url
);
STDMETHODIMP
put_BaseURL
(
BSTR
url
);
STDMETHODIMP
get_MRL
(
BSTR
*
mrl
);
STDMETHODIMP
get_MRL
(
BSTR
*
mrl
);
STDMETHODIMP
put_MRL
(
BSTR
mrl
);
STDMETHODIMP
put_MRL
(
BSTR
mrl
);
STDMETHODIMP
get_StartTime
(
int
*
seconds
);
STDMETHODIMP
get_StartTime
(
long
*
seconds
);
STDMETHODIMP
put_StartTime
(
int
seconds
);
STDMETHODIMP
put_StartTime
(
long
seconds
);
STDMETHODIMP
get_VersionInfo
(
BSTR
*
version
);
STDMETHODIMP
get_VersionInfo
(
BSTR
*
version
);
STDMETHODIMP
get_Visible
(
VARIANT_BOOL
*
visible
);
STDMETHODIMP
get_Visible
(
VARIANT_BOOL
*
visible
);
STDMETHODIMP
put_Visible
(
VARIANT_BOOL
visible
);
STDMETHODIMP
put_Visible
(
VARIANT_BOOL
visible
);
STDMETHODIMP
get_Volume
(
int
*
volume
);
STDMETHODIMP
get_Volume
(
long
*
volume
);
STDMETHODIMP
put_Volume
(
int
volume
);
STDMETHODIMP
put_Volume
(
long
volume
);
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_video
(
IVLCVideo
**
);
STDMETHODIMP
get_video
(
IVLCVideo
**
);
...
@@ -297,6 +536,7 @@ private:
...
@@ -297,6 +536,7 @@ private:
VLCAudio
*
_p_vlcaudio
;
VLCAudio
*
_p_vlcaudio
;
VLCInput
*
_p_vlcinput
;
VLCInput
*
_p_vlcinput
;
VLCLog
*
_p_vlclog
;
VLCPlaylist
*
_p_vlcplaylist
;
VLCPlaylist
*
_p_vlcplaylist
;
VLCVideo
*
_p_vlcvideo
;
VLCVideo
*
_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