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
b555e6c3
Commit
b555e6c3
authored
May 14, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv.cpp: improve support for hotkeys for navigation (still missing the button highlight)
parent
4d750990
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
10 deletions
+102
-10
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+102
-10
No files found.
modules/demux/mkv.cpp
View file @
b555e6c3
...
...
@@ -1232,7 +1232,6 @@ public:
,
b_ui_hooked
(
false
)
,
p_input
(
NULL
)
,
b_pci_packet_set
(
false
)
,
i_curr_button
(
0
)
,
p_ev
(
NULL
)
{
vlc_mutex_init
(
&
demuxer
,
&
lock_demuxer
);
...
...
@@ -1296,7 +1295,6 @@ public:
input_thread_t
*
p_input
;
pci_t
pci_packet
;
bool
b_pci_packet_set
;
int16
i_curr_button
;
uint8_t
alpha
[
4
];
vlc_mutex_t
lock_demuxer
;
...
...
@@ -2374,23 +2372,118 @@ int demux_sys_t::EventThread( vlc_object_t *p_this )
}
}
uint16
i_curr_button
=
p_sys
->
dvd_interpretor
.
GetSPRM
(
0x88
);
switch
(
i_action
)
{
case
ACTIONID_NAV_LEFT
:
// dvdnav_left_button_select( NULL, pci );
if
(
i_curr_button
>
0
&&
i_curr_button
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
btni_t
*
p_button_ptr
=
&
(
pci
->
hli
.
btnit
[
i_curr_button
-
1
]);
if
(
p_button_ptr
->
left
>
0
&&
p_button_ptr
->
left
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
i_curr_button
=
p_button_ptr
->
left
;
p_sys
->
dvd_interpretor
.
SetSPRM
(
0x88
,
i_curr_button
);
btni_t
button_ptr
=
pci
->
hli
.
btnit
[
i_curr_button
-
1
];
if
(
button_ptr
.
auto_action_mode
)
{
vlc_mutex_unlock
(
&
p_ev
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock_demuxer
);
// process the button action
p_sys
->
dvd_interpretor
.
Interpret
(
button_ptr
.
cmd
.
bytes
,
8
);
vlc_mutex_unlock
(
&
p_sys
->
lock_demuxer
);
vlc_mutex_lock
(
&
p_ev
->
lock
);
}
}
}
break
;
case
ACTIONID_NAV_RIGHT
:
// dvdnav_right_button_select( NULL, pci );
if
(
i_curr_button
>
0
&&
i_curr_button
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
btni_t
*
p_button_ptr
=
&
(
pci
->
hli
.
btnit
[
i_curr_button
-
1
]);
if
(
p_button_ptr
->
right
>
0
&&
p_button_ptr
->
right
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
i_curr_button
=
p_button_ptr
->
right
;
p_sys
->
dvd_interpretor
.
SetSPRM
(
0x88
,
i_curr_button
);
btni_t
button_ptr
=
pci
->
hli
.
btnit
[
i_curr_button
-
1
];
if
(
button_ptr
.
auto_action_mode
)
{
vlc_mutex_unlock
(
&
p_ev
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock_demuxer
);
// process the button action
p_sys
->
dvd_interpretor
.
Interpret
(
button_ptr
.
cmd
.
bytes
,
8
);
vlc_mutex_unlock
(
&
p_sys
->
lock_demuxer
);
vlc_mutex_lock
(
&
p_ev
->
lock
);
}
}
}
break
;
case
ACTIONID_NAV_UP
:
// dvdnav_upper_button_select( NULL, pci );
if
(
i_curr_button
>
0
&&
i_curr_button
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
btni_t
*
p_button_ptr
=
&
(
pci
->
hli
.
btnit
[
i_curr_button
-
1
]);
if
(
p_button_ptr
->
up
>
0
&&
p_button_ptr
->
up
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
i_curr_button
=
p_button_ptr
->
up
;
p_sys
->
dvd_interpretor
.
SetSPRM
(
0x88
,
i_curr_button
);
btni_t
button_ptr
=
pci
->
hli
.
btnit
[
i_curr_button
-
1
];
if
(
button_ptr
.
auto_action_mode
)
{
vlc_mutex_unlock
(
&
p_ev
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock_demuxer
);
// process the button action
p_sys
->
dvd_interpretor
.
Interpret
(
button_ptr
.
cmd
.
bytes
,
8
);
vlc_mutex_unlock
(
&
p_sys
->
lock_demuxer
);
vlc_mutex_lock
(
&
p_ev
->
lock
);
}
}
}
break
;
case
ACTIONID_NAV_DOWN
:
// dvdnav_lower_button_select( NULL, pci );
if
(
i_curr_button
>
0
&&
i_curr_button
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
btni_t
*
p_button_ptr
=
&
(
pci
->
hli
.
btnit
[
i_curr_button
-
1
]);
if
(
p_button_ptr
->
down
>
0
&&
p_button_ptr
->
down
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
i_curr_button
=
p_button_ptr
->
down
;
p_sys
->
dvd_interpretor
.
SetSPRM
(
0x88
,
i_curr_button
);
btni_t
button_ptr
=
pci
->
hli
.
btnit
[
i_curr_button
-
1
];
if
(
button_ptr
.
auto_action_mode
)
{
vlc_mutex_unlock
(
&
p_ev
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock_demuxer
);
// process the button action
p_sys
->
dvd_interpretor
.
Interpret
(
button_ptr
.
cmd
.
bytes
,
8
);
vlc_mutex_unlock
(
&
p_sys
->
lock_demuxer
);
vlc_mutex_lock
(
&
p_ev
->
lock
);
}
}
}
break
;
case
ACTIONID_NAV_ACTIVATE
:
b_activated
=
VLC_TRUE
;
// dvdnav_button_activate( NULL, pci );
if
(
i_curr_button
>
0
&&
i_curr_button
<=
pci
->
hli
.
hl_gi
.
btn_ns
)
{
btni_t
button_ptr
=
pci
->
hli
.
btnit
[
i_curr_button
-
1
];
vlc_mutex_unlock
(
&
p_ev
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock_demuxer
);
// process the button action
p_sys
->
dvd_interpretor
.
Interpret
(
button_ptr
.
cmd
.
bytes
,
8
);
vlc_mutex_unlock
(
&
p_sys
->
lock_demuxer
);
vlc_mutex_lock
(
&
p_ev
->
lock
);
}
break
;
default:
break
;
...
...
@@ -2443,6 +2536,7 @@ int demux_sys_t::EventThread( vlc_object_t *p_this )
if
(
best
!=
0
)
{
btni_t
button_ptr
=
pci
->
hli
.
btnit
[
best
-
1
];
uint16
i_curr_button
=
p_sys
->
dvd_interpretor
.
GetSPRM
(
0x88
);
msg_Dbg
(
&
p_sys
->
demuxer
,
"Clicked button %d"
,
best
);
vlc_mutex_unlock
(
&
p_ev
->
lock
);
...
...
@@ -2455,7 +2549,7 @@ int demux_sys_t::EventThread( vlc_object_t *p_this )
msg_Dbg
(
&
p_sys
->
demuxer
,
"Processed button %d"
,
best
);
// select new button
if
(
best
!=
p_sys
->
i_curr_button
)
if
(
best
!=
i_curr_button
)
{
vlc_value_t
val
;
...
...
@@ -2485,8 +2579,6 @@ int demux_sys_t::EventThread( vlc_object_t *p_this )
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_sys
->
p_input
,
"highlight"
,
val
);
vlc_mutex_unlock
(
p_mutex
);
p_sys
->
i_curr_button
=
best
;
}
}
vlc_mutex_unlock
(
&
p_sys
->
lock_demuxer
);
...
...
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