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
48b30bb9
Commit
48b30bb9
authored
Dec 20, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Mouse wheel seek patch for XVideo courtesy of Peter Surda. * Ported to SDL.
parent
3475fc64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
22 deletions
+72
-22
plugins/sdl/vout_sdl.c
plugins/sdl/vout_sdl.c
+48
-3
plugins/x11/vout_common.c
plugins/x11/vout_common.c
+24
-19
No files found.
plugins/sdl/vout_sdl.c
View file @
48b30bb9
...
...
@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.7
2 2001/12/19 18:14:23
sam Exp $
* $Id: vout_sdl.c,v 1.7
3 2001/12/20 15:43:15
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
...
...
@@ -54,6 +54,9 @@
#include "interface.h"
#include "stream_control.h"
/* needed by input_ext-intf.h... */
#include "input_ext-intf.h"
#include "modules.h"
#include "modules_export.h"
...
...
@@ -315,6 +318,21 @@ static void vout_Destroy( vout_thread_t *p_vout )
free
(
p_vout
->
p_sys
);
}
static
__inline__
void
vout_Seek
(
off_t
i_seek
)
{
#define area p_main->p_intf->p_input->stream.p_selected_area
off_t
i_tell
=
area
->
i_tell
;
i_tell
+=
i_seek
*
(
off_t
)
50
*
p_main
->
p_intf
->
p_input
->
stream
.
i_mux_rate
;
i_tell
=
(
i_tell
<=
area
->
i_start
)
?
area
->
i_start
:
(
i_tell
>=
area
->
i_size
)
?
area
->
i_size
:
i_tell
;
input_Seek
(
p_main
->
p_intf
->
p_input
,
i_tell
);
#undef area
}
/*****************************************************************************
* vout_Manage: handle Sys events
*****************************************************************************
...
...
@@ -366,7 +384,18 @@ static int vout_Manage( vout_thread_t *p_vout )
switch
(
event
.
button
.
button
)
{
case
SDL_BUTTON_LEFT
:
/* Handle clicks */
/* In this part we will eventually manage
* clicks for DVD navigation for instance. For the
* moment just pause the stream. */
input_SetStatus
(
p_main
->
p_intf
->
p_input
,
INPUT_STATUS_PAUSE
);
break
;
case
4
:
vout_Seek
(
15
);
break
;
case
5
:
vout_Seek
(
-
15
);
break
;
}
break
;
...
...
@@ -411,7 +440,23 @@ static int vout_Manage( vout_thread_t *p_vout )
case
SDLK_MENU
:
p_main
->
p_intf
->
b_menu_change
=
1
;
break
;
case
SDLK_LEFT
:
vout_Seek
(
-
5
);
break
;
case
SDLK_RIGHT
:
vout_Seek
(
5
);
break
;
case
SDLK_UP
:
vout_Seek
(
60
);
break
;
case
SDLK_DOWN
:
vout_Seek
(
-
60
);
break
;
case
SDLK_F10
:
network_ChannelJoin
(
0
);
break
;
case
SDLK_F1
:
network_ChannelJoin
(
1
);
break
;
case
SDLK_F2
:
network_ChannelJoin
(
2
);
break
;
...
...
plugins/x11/vout_common.c
View file @
48b30bb9
...
...
@@ -2,7 +2,7 @@
* vout_common.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_common.c,v 1.
6 2001/12/19 18:14:23
sam Exp $
* $Id: vout_common.c,v 1.
7 2001/12/20 15:43:15
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -83,31 +83,28 @@
#include "modules.h"
#include "modules_export.h"
/*****************************************************************************
* vout_Manage: handle X11 events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* X11 events and allows window resizing. It returns a non null value on
* error.
*****************************************************************************/
static
__inline__
void
vout_Seek
(
int
i_seek
)
static
__inline__
void
vout_Seek
(
off_t
i_seek
)
{
int
i_tell
=
p_main
->
p_intf
->
p_input
->
stream
.
p_selected_area
->
i_tell
;
#define area p_main->p_intf->p_input->stream.p_selected_area
off_t
i_tell
=
area
->
i_tell
;
i_tell
+=
i_seek
*
50
*
p_main
->
p_intf
->
p_input
->
stream
.
i_mux_rate
;
i_tell
+=
i_seek
*
(
off_t
)
50
*
p_main
->
p_intf
->
p_input
->
stream
.
i_mux_rate
;
if
(
i_tell
<
p_main
->
p_intf
->
p_input
->
stream
.
p_selected_area
->
i_start
)
{
i_tell
=
p_main
->
p_intf
->
p_input
->
stream
.
p_selected_area
->
i_start
;
}
else
if
(
i_tell
>
p_main
->
p_intf
->
p_input
->
stream
.
p_selected_area
->
i_size
)
{
i_tell
=
p_main
->
p_intf
->
p_input
->
stream
.
p_selected_area
->
i_size
;
}
i_tell
=
(
i_tell
<=
area
->
i_start
)
?
area
->
i_start
:
(
i_tell
>=
area
->
i_size
)
?
area
->
i_size
:
i_tell
;
input_Seek
(
p_main
->
p_intf
->
p_input
,
i_tell
);
#undef area
}
/*****************************************************************************
* vout_Manage: handle X11 events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* X11 events and allows window resizing. It returns a non null value on
* error.
*****************************************************************************/
int
_M
(
vout_Manage
)
(
vout_thread_t
*
p_vout
)
{
XEvent
xevent
;
/* X11 event */
...
...
@@ -252,6 +249,14 @@ int _M( vout_Manage ) ( vout_thread_t *p_vout )
input_SetStatus
(
p_main
->
p_intf
->
p_input
,
INPUT_STATUS_PAUSE
);
break
;
case
Button4
:
vout_Seek
(
15
);
break
;
case
Button5
:
vout_Seek
(
-
15
);
break
;
}
}
/* Mouse release */
...
...
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