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
0ca95eda
Commit
0ca95eda
authored
Feb 26, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync libvlc_MediaPlayer events between activex and mozilla
parent
1ce563c4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
155 additions
and
151 deletions
+155
-151
projects/activex/axvlc.idl
projects/activex/axvlc.idl
+58
-58
projects/activex/axvlc.tlb
projects/activex/axvlc.tlb
+0
-0
projects/activex/axvlc_idl.h
projects/activex/axvlc_idl.h
+18
-18
projects/activex/plugin.cpp
projects/activex/plugin.cpp
+54
-54
projects/activex/plugin.h
projects/activex/plugin.h
+20
-20
src/control/event.c
src/control/event.c
+5
-1
No files found.
projects/activex/axvlc.idl
View file @
0ca95eda
...
...
@@ -169,26 +169,26 @@ library AXVLC
const
int
DISPID_StopEvent
=
102
;
/*
async
events
from
libvlc
*/
const
int
DISPID_NothingSpecialEvent
=
200
;
const
int
DISPID_OpeningEvent
=
201
;
const
int
DISPID_BufferingEvent
=
202
;
const
int
DISPID_PlayingEvent
=
203
;
const
int
DISPID_PausedEvent
=
204
;
const
int
DISPID_ForwardEvent
=
205
;
const
int
DISPID_BackwardEvent
=
206
;
const
int
DISPID_EncounteredErrorEvent
=
207
;
const
int
DISPID_EndReachedEvent
=
208
;
const
int
DISPID_StoppedEvent
=
209
;
const
int
DISPID_TimeChangedEvent
=
210
;
const
int
DISPID_PositionChangedEvent
=
211
;
const
int
DISPID_SeekableChangedEvent
=
212
;
const
int
DISPID_PausableChangedEvent
=
213
;
const
int
DISPID_MouseButtonEvent
=
214
;
const
int
DISPID_MouseMovedEvent
=
215
;
const
int
DISPID_MouseClickedEvent
=
216
;
const
int
DISPID_MouseGrabEvent
=
217
;
const
int
DISPID_
MediaPlayer
NothingSpecialEvent
=
200
;
const
int
DISPID_
MediaPlayer
OpeningEvent
=
201
;
const
int
DISPID_
MediaPlayer
BufferingEvent
=
202
;
const
int
DISPID_
MediaPlayer
PlayingEvent
=
203
;
const
int
DISPID_
MediaPlayer
PausedEvent
=
204
;
const
int
DISPID_
MediaPlayer
ForwardEvent
=
205
;
const
int
DISPID_
MediaPlayer
BackwardEvent
=
206
;
const
int
DISPID_
MediaPlayer
EncounteredErrorEvent
=
207
;
const
int
DISPID_
MediaPlayer
EndReachedEvent
=
208
;
const
int
DISPID_
MediaPlayer
StoppedEvent
=
209
;
const
int
DISPID_
MediaPlayer
TimeChangedEvent
=
210
;
const
int
DISPID_
MediaPlayer
PositionChangedEvent
=
211
;
const
int
DISPID_
MediaPlayer
SeekableChangedEvent
=
212
;
const
int
DISPID_
MediaPlayer
PausableChangedEvent
=
213
;
const
int
DISPID_M
ediaPlayerM
ouseButtonEvent
=
214
;
const
int
DISPID_M
ediaPlayerM
ouseMovedEvent
=
215
;
const
int
DISPID_M
ediaPlayerM
ouseClickedEvent
=
216
;
const
int
DISPID_M
ediaPlayerM
ouseGrabEvent
=
217
;
[
uuid
(
DF48072F
-
5
EF8
-434e-9
B40
-
E2F3AE759B5F
),
...
...
@@ -206,46 +206,46 @@ library AXVLC
void
stop
()
;
/*
asyn
events
from
libvlc
*/
[
id
(
DISPID_NothingSpecialEvent
),
helpstring
(
"Idle state"
)
]
void
idle
()
;
[
id
(
DISPID_OpeningEvent
),
helpstring
(
"Opening media"
)
]
void
o
pening
()
;
[
id
(
DISPID_BufferingEvent
),
helpstring
(
"Buffering media"
)
]
void
b
uffering
()
;
[
id
(
DISPID_PlayingEvent
),
helpstring
(
"Media is playing"
)
]
void
p
laying
()
;
[
id
(
DISPID_PausedEvent
),
helpstring
(
"Media is paused"
)
]
void
p
aused
()
;
[
id
(
DISPID_ForwardEvent
),
helpstring
(
"Forward playback"
)
]
void
f
orward
()
;
[
id
(
DISPID_BackwardEvent
),
helpstring
(
"Backward playback"
)
]
void
b
ackward
()
;
[
id
(
DISPID_EncounteredErrorEvent
),
helpstring
(
"An error has been encountered"
)
]
void
e
rror
()
;
[
id
(
DISPID_EndReachedEvent
),
helpstring
(
"End of playback reached"
)
]
void
end
ed
()
;
[
id
(
DISPID_StoppedEvent
),
helpstring
(
"Playback stopped"
)
]
void
s
topped
()
;
[
id
(
DISPID_TimeChangedEvent
),
helpstring
(
"Time changed"
)
]
void
TimeChanged
(
[
in
]
long
time
)
;
[
id
(
DISPID_PositionChangedEvent
),
helpstring
(
"Position changed"
)
]
void
PositionChanged
(
[
in
]
long
position
)
;
[
id
(
DISPID_SeekableChangedEvent
),
helpstring
(
"Seek changed"
)
]
void
SeekableChanged
(
[
in
]
VARIANT_BOOL
seekable
)
;
[
id
(
DISPID_PausableChangedEvent
),
helpstring
(
"Pause setting changed"
)
]
void
PausableChanged
(
[
in
]
VARIANT_BOOL
pausable
)
;
[
id
(
DISPID_MouseButtonEvent
),
helpstring
(
"Mouse button pressed"
)
]
void
MouseButton
(
[
in
]
VARIANT_BOOL
btn_right
,
[
in
]
VARIANT_BOOL
btn_center
,
[
id
(
DISPID_
MediaPlayer
NothingSpecialEvent
),
helpstring
(
"Idle state"
)
]
void
MediaPlayerNothingSpecial
()
;
[
id
(
DISPID_
MediaPlayer
OpeningEvent
),
helpstring
(
"Opening media"
)
]
void
MediaPlayerO
pening
()
;
[
id
(
DISPID_
MediaPlayer
BufferingEvent
),
helpstring
(
"Buffering media"
)
]
void
MediaPlayerB
uffering
()
;
[
id
(
DISPID_
MediaPlayer
PlayingEvent
),
helpstring
(
"Media is playing"
)
]
void
MediaPlayerP
laying
()
;
[
id
(
DISPID_
MediaPlayer
PausedEvent
),
helpstring
(
"Media is paused"
)
]
void
MediaPlayerP
aused
()
;
[
id
(
DISPID_
MediaPlayer
ForwardEvent
),
helpstring
(
"Forward playback"
)
]
void
MediaPlayerF
orward
()
;
[
id
(
DISPID_
MediaPlayer
BackwardEvent
),
helpstring
(
"Backward playback"
)
]
void
MediaPlayerB
ackward
()
;
[
id
(
DISPID_
MediaPlayer
EncounteredErrorEvent
),
helpstring
(
"An error has been encountered"
)
]
void
MediaPlayerEncounteredE
rror
()
;
[
id
(
DISPID_
MediaPlayer
EndReachedEvent
),
helpstring
(
"End of playback reached"
)
]
void
MediaPlayerEndReach
ed
()
;
[
id
(
DISPID_
MediaPlayer
StoppedEvent
),
helpstring
(
"Playback stopped"
)
]
void
MediaPlayerS
topped
()
;
[
id
(
DISPID_
MediaPlayer
TimeChangedEvent
),
helpstring
(
"Time changed"
)
]
void
MediaPlayer
TimeChanged
(
[
in
]
long
time
)
;
[
id
(
DISPID_
MediaPlayer
PositionChangedEvent
),
helpstring
(
"Position changed"
)
]
void
MediaPlayer
PositionChanged
(
[
in
]
long
position
)
;
[
id
(
DISPID_
MediaPlayer
SeekableChangedEvent
),
helpstring
(
"Seek changed"
)
]
void
MediaPlayer
SeekableChanged
(
[
in
]
VARIANT_BOOL
seekable
)
;
[
id
(
DISPID_
MediaPlayer
PausableChangedEvent
),
helpstring
(
"Pause setting changed"
)
]
void
MediaPlayer
PausableChanged
(
[
in
]
VARIANT_BOOL
pausable
)
;
[
id
(
DISPID_M
ediaPlayerM
ouseButtonEvent
),
helpstring
(
"Mouse button pressed"
)
]
void
M
ediaPlayerM
ouseButton
(
[
in
]
VARIANT_BOOL
btn_right
,
[
in
]
VARIANT_BOOL
btn_center
,
[
in
]
VARIANT_BOOL
btn_left
,
[
in
]
VARIANT_BOOL
btn_wheel_up
,
[
in
]
VARIANT_BOOL
bnt_wheel_down
)
;
[
id
(
DISPID_MouseMovedEvent
),
helpstring
(
"Mouse moved"
)
]
void
MouseMoved
(
[
in
]
long
x
,
[
in
]
long
y
)
;
[
id
(
DISPID_MouseClickedEvent
),
helpstring
(
"Mouse clicked"
)
]
void
MouseClicked
(
[
in
]
long
x
,
[
in
]
long
y
)
;
[
id
(
DISPID_MouseGrabEvent
),
helpstring
(
"Mouse grabs object in video output"
)
]
void
MouseGrab
(
[
in
]
long
x
,
[
in
]
long
y
)
;
[
id
(
DISPID_M
ediaPlayerM
ouseMovedEvent
),
helpstring
(
"Mouse moved"
)
]
void
M
ediaPlayerM
ouseMoved
(
[
in
]
long
x
,
[
in
]
long
y
)
;
[
id
(
DISPID_M
ediaPlayerM
ouseClickedEvent
),
helpstring
(
"Mouse clicked"
)
]
void
M
ediaPlayerM
ouseClicked
(
[
in
]
long
x
,
[
in
]
long
y
)
;
[
id
(
DISPID_M
ediaPlayerM
ouseGrabEvent
),
helpstring
(
"Mouse grabs object in video output"
)
]
void
M
ediaPlayerM
ouseGrab
(
[
in
]
long
x
,
[
in
]
long
y
)
;
}
;
[
...
...
projects/activex/axvlc.tlb
View file @
0ca95eda
No preview for this file type
projects/activex/axvlc_idl.h
View file @
0ca95eda
...
...
@@ -793,41 +793,41 @@ void __RPC_STUB IVLCControl_put_AutoLoop_Stub(
#define DISPID_StopEvent (102)
#define DISPID_NothingSpecialEvent (200)
#define DISPID_
MediaPlayer
NothingSpecialEvent (200)
#define DISPID_OpeningEvent (201)
#define DISPID_
MediaPlayer
OpeningEvent (201)
#define DISPID_BufferingEvent (202)
#define DISPID_
MediaPlayer
BufferingEvent (202)
#define DISPID_PlayingEvent (203)
#define DISPID_
MediaPlayer
PlayingEvent (203)
#define DISPID_PausedEvent (204)
#define DISPID_
MediaPlayer
PausedEvent (204)
#define DISPID_ForwardEvent (205)
#define DISPID_
MediaPlayer
ForwardEvent (205)
#define DISPID_BackwardEvent (206)
#define DISPID_
MediaPlayer
BackwardEvent (206)
#define DISPID_EncounteredErrorEvent (207)
#define DISPID_
MediaPlayer
EncounteredErrorEvent (207)
#define DISPID_EndReachedEvent (208)
#define DISPID_
MediaPlayer
EndReachedEvent (208)
#define DISPID_StoppedEvent (209)
#define DISPID_
MediaPlayer
StoppedEvent (209)
#define DISPID_TimeChangedEvent (210)
#define DISPID_
MediaPlayer
TimeChangedEvent (210)
#define DISPID_PositionChangedEvent (211)
#define DISPID_
MediaPlayer
PositionChangedEvent (211)
#define DISPID_SeekableChangedEvent (212)
#define DISPID_
MediaPlayer
SeekableChangedEvent (212)
#define DISPID_PausableChangedEvent (213)
#define DISPID_
MediaPlayer
PausableChangedEvent (213)
#define DISPID_MouseButtonEvent (214)
#define DISPID_M
ediaPlayerM
ouseButtonEvent (214)
#define DISPID_MouseMovedEvent (215)
#define DISPID_M
ediaPlayerM
ouseMovedEvent (215)
#define DISPID_MouseClickedEvent (216)
#define DISPID_M
ediaPlayerM
ouseClickedEvent (216)
#define DISPID_MouseGrabEvent (217)
#define DISPID_M
ediaPlayerM
ouseGrabEvent (217)
/*****************************************************************************
* DVLCEvents dispinterface
...
...
projects/activex/plugin.cpp
View file @
0ca95eda
...
...
@@ -1007,64 +1007,64 @@ void VLCPlugin::fireOnStopEvent(void)
/*
* Async events
*/
void
VLCPlugin
::
fireOn
Idle
Event
()
void
VLCPlugin
::
fireOn
MediaPlayerNothingSpecial
Event
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_NothingSpecialEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
NothingSpecialEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnOpeningEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
OpeningEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_OpeningEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
OpeningEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnBufferingEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
BufferingEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_BufferingEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
BufferingEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnPlayingEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
PlayingEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_PlayingEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
PlayingEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnPausedEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
PausedEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_PausedEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
PausedEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnErrorEvent
()
void
VLCPlugin
::
fireOn
MediaPlayerEncountered
ErrorEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_EncounteredErrorEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
EncounteredErrorEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOn
End
edEvent
()
void
VLCPlugin
::
fireOn
MediaPlayerEndReach
edEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_EndReachedEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
EndReachedEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnStoppedEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
StoppedEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_StoppedEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
StoppedEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnForwardEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
ForwardEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_ForwardEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
ForwardEvent
,
&
dispparamsNoArgs
);
};
void
VLCPlugin
::
fireOnBackwardEvent
()
void
VLCPlugin
::
fireOn
MediaPlayer
BackwardEvent
()
{
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
vlcConnectionPointContainer
->
fireEvent
(
DISPID_BackwardEvent
,
&
dispparamsNoArgs
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
BackwardEvent
,
&
dispparamsNoArgs
);
};
static
void
handle_input_state_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
...
...
@@ -1073,100 +1073,100 @@ static void handle_input_state_event(const libvlc_event_t* event, void *param)
switch
(
event
->
type
)
{
case
libvlc_MediaPlayerNothingSpecial
:
plugin
->
fireOn
Idle
Event
();
plugin
->
fireOn
MediaPlayerNothingSpecial
Event
();
break
;
case
libvlc_MediaPlayerOpening
:
plugin
->
fireOnOpeningEvent
();
plugin
->
fireOn
MediaPlayer
OpeningEvent
();
break
;
case
libvlc_MediaPlayerBuffering
:
plugin
->
fireOnBufferingEvent
();
plugin
->
fireOn
MediaPlayer
BufferingEvent
();
break
;
case
libvlc_MediaPlayerPlaying
:
plugin
->
fireOnPlayingEvent
();
plugin
->
fireOn
MediaPlayer
PlayingEvent
();
break
;
case
libvlc_MediaPlayerPaused
:
plugin
->
fireOnPausedEvent
();
plugin
->
fireOn
MediaPlayer
PausedEvent
();
break
;
case
libvlc_MediaPlayerStopped
:
plugin
->
fireOnStoppedEvent
();
plugin
->
fireOn
MediaPlayer
StoppedEvent
();
break
;
case
libvlc_MediaPlayerForward
:
plugin
->
fireOnForwardEvent
();
plugin
->
fireOn
MediaPlayer
ForwardEvent
();
break
;
case
libvlc_MediaPlayerBackward
:
plugin
->
fireOnBackwardEvent
();
plugin
->
fireOn
MediaPlayer
BackwardEvent
();
break
;
case
libvlc_MediaPlayerEndReached
:
plugin
->
fireOn
End
edEvent
();
plugin
->
fireOn
MediaPlayerEndReach
edEvent
();
break
;
case
libvlc_MediaPlayerEncounteredError
:
plugin
->
fireOnErrorEvent
();
plugin
->
fireOn
MediaPlayerEncountered
ErrorEvent
();
break
;
}
}
void
VLCPlugin
::
fireOnTimeChangedEvent
(
long
time
)
void
VLCPlugin
::
fireOn
MediaPlayer
TimeChangedEvent
(
long
time
)
{
VARIANT
varPos
;
DISPPARAMS
params
=
{
&
varPos
,
NULL
,
1
,
0
};
varPos
.
vt
=
VT_I4
;
varPos
.
lVal
=
time
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_TimeChangedEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
TimeChangedEvent
,
&
params
);
};
static
void
handle_time_changed_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnTimeChangedEvent
(
event
->
u
.
media_player_time_changed
.
new_time
);
plugin
->
fireOn
MediaPlayer
TimeChangedEvent
(
event
->
u
.
media_player_time_changed
.
new_time
);
}
void
VLCPlugin
::
fireOnPositionChangedEvent
(
long
position
)
void
VLCPlugin
::
fireOn
MediaPlayer
PositionChangedEvent
(
long
position
)
{
VARIANT
varPos
;
DISPPARAMS
params
=
{
&
varPos
,
NULL
,
1
,
0
};
varPos
.
vt
=
VT_I4
;
varPos
.
lVal
=
position
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_PositionChangedEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
PositionChangedEvent
,
&
params
);
};
static
void
handle_position_changed_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnPositionChangedEvent
(
event
->
u
.
media_player_position_changed
.
new_position
);
plugin
->
fireOn
MediaPlayer
PositionChangedEvent
(
event
->
u
.
media_player_position_changed
.
new_position
);
}
void
VLCPlugin
::
fireOnSeekableChangedEvent
(
VARIANT_BOOL
seekable
)
void
VLCPlugin
::
fireOn
MediaPlayer
SeekableChangedEvent
(
VARIANT_BOOL
seekable
)
{
VARIANT
varSeek
;
DISPPARAMS
params
=
{
&
varSeek
,
NULL
,
1
,
0
};
varSeek
.
vt
=
VT_BOOL
;
varSeek
.
boolVal
=
seekable
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_SeekableChangedEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
SeekableChangedEvent
,
&
params
);
};
static
void
handle_seekable_changed_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnSeekableChangedEvent
(
event
->
u
.
media_player_seekable_changed
.
new_seekable
);
plugin
->
fireOn
MediaPlayer
SeekableChangedEvent
(
event
->
u
.
media_player_seekable_changed
.
new_seekable
);
}
void
VLCPlugin
::
fireOnPausableChangedEvent
(
VARIANT_BOOL
pausable
)
void
VLCPlugin
::
fireOn
MediaPlayer
PausableChangedEvent
(
VARIANT_BOOL
pausable
)
{
VARIANT
varPause
;
DISPPARAMS
params
=
{
&
varPause
,
NULL
,
1
,
0
};
varPause
.
vt
=
VT_BOOL
;
varPause
.
boolVal
=
pausable
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_PausableChangedEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_
MediaPlayer
PausableChangedEvent
,
&
params
);
};
static
void
handle_pausable_changed_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnPausableChangedEvent
(
event
->
u
.
media_player_pausable_changed
.
new_pausable
);
plugin
->
fireOn
MediaPlayer
PausableChangedEvent
(
event
->
u
.
media_player_pausable_changed
.
new_pausable
);
}
/* mouse events */
void
VLCPlugin
::
fireOnMouseButtonEvent
(
VARIANT_BOOL
btn_right
,
VARIANT_BOOL
btn_center
,
void
VLCPlugin
::
fireOnM
ediaPlayerM
ouseButtonEvent
(
VARIANT_BOOL
btn_right
,
VARIANT_BOOL
btn_center
,
VARIANT_BOOL
btn_left
,
VARIANT_BOOL
btn_wheel_up
,
VARIANT_BOOL
btn_wheel_down
)
{
...
...
@@ -1182,10 +1182,10 @@ void VLCPlugin::fireOnMouseButtonEvent(VARIANT_BOOL btn_right, VARIANT_BOOL btn_
varButton
[
3
].
boolVal
=
btn_wheel_up
;
varButton
[
4
].
vt
=
VT_BOOL
;
varButton
[
4
].
boolVal
=
btn_wheel_down
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_MouseButtonEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_M
ediaPlayerM
ouseButtonEvent
,
&
params
);
};
void
VLCPlugin
::
fireOnMouseMovedEvent
(
long
x
,
long
y
)
void
VLCPlugin
::
fireOnM
ediaPlayerM
ouseMovedEvent
(
long
x
,
long
y
)
{
VARIANT
varCoords
[
2
];
DISPPARAMS
params
=
{
varCoords
,
NULL
,
3
,
0
};
...
...
@@ -1193,10 +1193,10 @@ void VLCPlugin::fireOnMouseMovedEvent(long x, long y)
varCoords
[
0
].
intVal
=
x
;
varCoords
[
1
].
vt
=
VT_INT
;
varCoords
[
1
].
intVal
=
y
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_MouseMovedEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_M
ediaPlayerM
ouseMovedEvent
,
&
params
);
};
void
VLCPlugin
::
fireOnMouseClickedEvent
(
long
x
,
long
y
)
void
VLCPlugin
::
fireOnM
ediaPlayerM
ouseClickedEvent
(
long
x
,
long
y
)
{
VARIANT
varCoords
[
2
];
DISPPARAMS
params
=
{
varCoords
,
NULL
,
3
,
0
};
...
...
@@ -1204,10 +1204,10 @@ void VLCPlugin::fireOnMouseClickedEvent(long x, long y)
varCoords
[
0
].
intVal
=
x
;
varCoords
[
1
].
vt
=
VT_INT
;
varCoords
[
1
].
intVal
=
y
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_MouseClickedEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_M
ediaPlayerM
ouseClickedEvent
,
&
params
);
};
void
VLCPlugin
::
fireOnMouseGrabEvent
(
long
x
,
long
y
)
void
VLCPlugin
::
fireOnM
ediaPlayerM
ouseGrabEvent
(
long
x
,
long
y
)
{
VARIANT
varCoords
[
2
];
DISPPARAMS
params
=
{
varCoords
,
NULL
,
3
,
0
};
...
...
@@ -1215,7 +1215,7 @@ void VLCPlugin::fireOnMouseGrabEvent(long x, long y)
varCoords
[
0
].
intVal
=
x
;
varCoords
[
1
].
vt
=
VT_INT
;
varCoords
[
1
].
intVal
=
y
;
vlcConnectionPointContainer
->
fireEvent
(
DISPID_MouseGrabEvent
,
&
params
);
vlcConnectionPointContainer
->
fireEvent
(
DISPID_M
ediaPlayerM
ouseGrabEvent
,
&
params
);
};
#define B(val) ((val) ? 0xFFFF : 0x0000)
...
...
@@ -1228,7 +1228,7 @@ static void handle_mouse_button_pressed_event(const libvlc_event_t* event, void
btn_left
=
B
(
event
->
u
.
media_player_mouse_button
.
mb_left
);
btn_wheel_up
=
B
(
event
->
u
.
media_player_mouse_button
.
mb_wheel_up
);
btn_wheel_down
=
B
(
event
->
u
.
media_player_mouse_button
.
mb_wheel_down
);
plugin
->
fireOnMouseButtonEvent
(
btn_right
,
btn_center
,
btn_left
,
plugin
->
fireOnM
ediaPlayerM
ouseButtonEvent
(
btn_right
,
btn_center
,
btn_left
,
btn_wheel_up
,
btn_wheel_down
);
}
#undef B
...
...
@@ -1236,21 +1236,21 @@ static void handle_mouse_button_pressed_event(const libvlc_event_t* event, void
static
void
handle_mouse_moved_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnMouseMovedEvent
(
event
->
u
.
media_player_mouse_moved
.
x
,
plugin
->
fireOnM
ediaPlayerM
ouseMovedEvent
(
event
->
u
.
media_player_mouse_moved
.
x
,
event
->
u
.
media_player_mouse_moved
.
y
);
}
static
void
handle_mouse_clicked_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnMouseClickedEvent
(
event
->
u
.
media_player_mouse_clicked
.
x
,
plugin
->
fireOnM
ediaPlayerM
ouseClickedEvent
(
event
->
u
.
media_player_mouse_clicked
.
x
,
event
->
u
.
media_player_mouse_clicked
.
y
);
}
static
void
handle_mouse_grab_event
(
const
libvlc_event_t
*
event
,
void
*
param
)
{
VLCPlugin
*
plugin
=
(
VLCPlugin
*
)
param
;
plugin
->
fireOnMouseGrabEvent
(
event
->
u
.
media_player_mouse_grab
.
x
,
plugin
->
fireOnM
ediaPlayerM
ouseGrabEvent
(
event
->
u
.
media_player_mouse_grab
.
x
,
event
->
u
.
media_player_mouse_grab
.
y
);
}
...
...
projects/activex/plugin.h
View file @
0ca95eda
...
...
@@ -239,28 +239,28 @@ public:
void
fireOnStopEvent
(
void
);
// async events;
void
fireOn
Idle
Event
();
void
fireOnOpeningEvent
();
void
fireOnBufferingEvent
();
void
fireOnPlayingEvent
();
void
fireOnPausedEvent
();
void
fireOn
Error
Event
();
void
fireOn
Ende
dEvent
();
void
fireOn
Stopped
Event
();
void
fireOn
Forwar
dEvent
();
void
fireOn
Backwar
dEvent
();
void
fireOnTimeChangedEvent
(
long
time
);
void
fireOnPositionChangedEvent
(
long
position
);
void
fireOnSeekableChangedEvent
(
VARIANT_BOOL
seekable
);
void
fireOnPausableChangedEvent
(
VARIANT_BOOL
pausable
);
void
fireOnMouseButtonEvent
(
VARIANT_BOOL
btn_right
,
VARIANT_BOOL
btn_center
,
void
fireOn
MediaPlayerNothingSpecial
Event
();
void
fireOn
MediaPlayer
OpeningEvent
();
void
fireOn
MediaPlayer
BufferingEvent
();
void
fireOn
MediaPlayer
PlayingEvent
();
void
fireOn
MediaPlayer
PausedEvent
();
void
fireOn
MediaPlayerForward
Event
();
void
fireOn
MediaPlayerBackwar
dEvent
();
void
fireOn
MediaPlayerEncounteredError
Event
();
void
fireOn
MediaPlayerEndReache
dEvent
();
void
fireOn
MediaPlayerStoppe
dEvent
();
void
fireOn
MediaPlayer
TimeChangedEvent
(
long
time
);
void
fireOn
MediaPlayer
PositionChangedEvent
(
long
position
);
void
fireOn
MediaPlayer
SeekableChangedEvent
(
VARIANT_BOOL
seekable
);
void
fireOn
MediaPlayer
PausableChangedEvent
(
VARIANT_BOOL
pausable
);
void
fireOnM
ediaPlayerM
ouseButtonEvent
(
VARIANT_BOOL
btn_right
,
VARIANT_BOOL
btn_center
,
VARIANT_BOOL
btn_left
,
VARIANT_BOOL
btn_wheel_up
,
VARIANT_BOOL
bnt_wheel_down
);
void
fireOnMouseMovedEvent
(
long
x
,
long
y
);
void
fireOnMouseClickedEvent
(
long
x
,
long
y
);
void
fireOnMouseGrabEvent
(
long
x
,
long
y
);
void
fireOnM
ediaPlayerM
ouseMovedEvent
(
long
x
,
long
y
);
void
fireOnM
ediaPlayerM
ouseClickedEvent
(
long
x
,
long
y
);
void
fireOnM
ediaPlayerM
ouseGrabEvent
(
long
x
,
long
y
);
// controlling IUnknown interface
LPUNKNOWN
pUnkOuter
;
...
...
src/control/event.c
View file @
0ca95eda
/*****************************************************************************
* event.c: New libvlc event control API
*****************************************************************************
* Copyright (C) 2007 the VideoLAN team
* Copyright (C) 2007
-2010
the VideoLAN team
* $Id $
*
* Authors: Filippo Carone <filippo@carone.org>
...
...
@@ -274,6 +274,10 @@ static const event_name_t event_list[] = {
DEF
(
MediaPlayerTitleChanged
)
DEF
(
MediaPlayerSnapshotTaken
)
DEF
(
MediaPlayerLengthChanged
)
DEF
(
MediaPlayerMouseMoved
)
DEF
(
MediaPlayerMouseButton
)
DEF
(
MediaPlayerMouseClick
)
DEF
(
MediaPlayerMouseGrab
)
DEF
(
MediaListItemAdded
)
DEF
(
MediaListWillAddItem
)
...
...
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