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
585f8158
Commit
585f8158
authored
Aug 28, 2000
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cleaned Octplane's crappy indentation.
* fixed the --server option which didn't work if a ~/.vlcrc existed.
parent
27fdf30e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
102 deletions
+112
-102
ChangeLog
ChangeLog
+6
-0
include/interface.h
include/interface.h
+2
-6
plugins/sdl/intf_sdl.c
plugins/sdl/intf_sdl.c
+1
-1
src/interface/interface.c
src/interface/interface.c
+103
-95
No files found.
ChangeLog
View file @
585f8158
...
...
@@ -8,6 +8,12 @@ O.1.99i :
* fixed the aliases install.
* renamed an inconsistent varaible in src/input/input_file.c.
* added support for I+ synchro (all Is and the first P).
* fixed a motion compensation bug which generated some distortion
on B images.
* fixed a motion compensation bug for skipped macroblocks.
* fixed a synchro bug for field images.
* cleaned Octplane's crappy indentation.
* fixed the --server option which didn't work if a ~/.vlcrc existed.
Tue, 22 Aug 2000 01:31:58 +0200
0.1.99h :
...
...
include/interface.h
View file @
585f8158
...
...
@@ -89,7 +89,7 @@ typedef struct intf_thread_s
p_input_thread_t
p_input
;
/* Specific functions */
keyparm
(
*
p_intf_get
K
ey
)(
struct
intf_thread_s
*
p_intf
,
int
r_key
)
;
keyparm
(
*
p_intf_get
_k
ey
)(
struct
intf_thread_s
*
p_intf
,
int
r_key
)
;
}
intf_thread_t
;
...
...
@@ -104,10 +104,6 @@ int intf_SelectChannel ( intf_thread_t * p_intf, int i_channel
int
intf_ProcessKey
(
intf_thread_t
*
p_intf
,
int
i_key
);
void
intf_AssignKey
(
intf_thread_t
*
p_intf
,
int
r_key
,
int
f_key
,
int
param
);
void
intf_AssignSKey
(
intf_thread_t
*
p_intf
,
int
r_key
,
int
f_key
);
keyparm
intf_getKey
(
intf_thread_t
*
p_intf
,
int
r_key
);
keyparm
intf_GetKey
(
intf_thread_t
*
p_intf
,
int
r_key
);
void
intf_AssignNormalKeys
(
intf_thread_t
*
p_intf
);
plugins/sdl/intf_sdl.c
View file @
585f8158
...
...
@@ -160,7 +160,7 @@ void intf_SDLManage( intf_thread_t *p_intf )
void
intf_SDL_Keymap
(
intf_thread_t
*
p_intf
)
{
p_intf
->
p_intf_get
Key
=
intf_g
etKey
;
p_intf
->
p_intf_get
_key
=
intf_G
etKey
;
intf_AssignKey
(
p_intf
,
SDLK_q
,
INTF_KEY_QUIT
,
NULL
);
intf_AssignKey
(
p_intf
,
SDLK_ESCAPE
,
INTF_KEY_QUIT
,
NULL
);
/* intf_AssignKey(p_intf,3,'Q'); */
...
...
src/interface/interface.c
View file @
585f8158
...
...
@@ -124,68 +124,78 @@ intf_thread_t* intf_Create( void )
}
}
if
(
i_best_score
==
0
)
{
if
(
i_best_score
==
0
)
{
free
(
p_intf
);
return
(
NULL
);
}
}
/* Get the plugin functions */
(
(
intf_getplugin_t
*
)
p_main
->
p_bank
->
p_info
[
i_best_index
]
->
intf_GetPlugin
)(
p_intf
);
/* Get the plugin functions */
(
(
intf_getplugin_t
*
)
p_main
->
p_bank
->
p_info
[
i_best_index
]
->
intf_GetPlugin
)(
p_intf
);
/* Initialize structure */
p_intf
->
b_die
=
0
;
p_intf
->
p_vout
=
NULL
;
p_intf
->
p_input
=
NULL
;
p_intf
->
p_keys
=
NULL
;
/* Initialize structure */
p_intf
->
b_die
=
0
;
p_intf
->
p_vout
=
NULL
;
p_intf
->
p_input
=
NULL
;
p_intf
->
p_keys
=
NULL
;
/* Load channels - the pointer will be set to NULL on failure. The
* return value is ignored since the program can work without
* channels */
LoadChannels
(
p_intf
,
main_GetPszVariable
(
INTF_CHANNELS_VAR
,
INTF_CHANNELS_DEFAULT
));
/* Load channels - the pointer will be set to NULL on failure. The
* return value is ignored since the program can work without
* channels */
LoadChannels
(
p_intf
,
main_GetPszVariable
(
INTF_CHANNELS_VAR
,
INTF_CHANNELS_DEFAULT
));
/* Start interfaces */
p_intf
->
p_console
=
intf_ConsoleCreate
();
if
(
p_intf
->
p_console
==
NULL
)
{
/* Start interfaces */
p_intf
->
p_console
=
intf_ConsoleCreate
();
if
(
p_intf
->
p_console
==
NULL
)
{
intf_ErrMsg
(
"error: can't create control console
\n
"
);
free
(
p_intf
);
return
(
NULL
);
}
if
(
p_intf
->
p_sys_create
(
p_intf
)
)
{
}
if
(
p_intf
->
p_sys_create
(
p_intf
)
)
{
intf_ErrMsg
(
"error: can't create interface
\n
"
);
intf_ConsoleDestroy
(
p_intf
->
p_console
);
free
(
p_intf
);
return
(
NULL
);
}
intf_Msg
(
"Interface initialized
\n
"
);
return
(
p_intf
);
}
/*****************************************************************************
* intf_Run
*****************************************************************************
* Initialization script and main interface loop.
*****************************************************************************/
void
intf_Run
(
intf_thread_t
*
p_intf
)
intf_Msg
(
"Interface initialized
\n
"
);
return
(
p_intf
);
}
/*****************************************************************************
* intf_Run
*****************************************************************************
* Initialization script and main interface loop.
*****************************************************************************/
void
intf_Run
(
intf_thread_t
*
p_intf
)
{
char
*
psz_server
=
main_GetPszVariable
(
INPUT_SERVER_VAR
,
NULL
);
/* If a server was specified */
if
(
psz_server
)
{
p_intf
->
p_input
=
input_CreateThread
(
INPUT_METHOD_TS_UCAST
,
psz_server
,
0
,
0
,
p_intf
->
p_vout
,
p_main
->
p_aout
,
NULL
);
}
/* Or if a file was specified */
else
if
(
p_main
->
p_playlist
->
p_list
)
{
if
(
p_main
->
p_playlist
->
p_list
)
{
p_intf
->
p_input
=
input_CreateThread
(
INPUT_METHOD_TS_FILE
,
NULL
,
0
,
0
,
p_main
->
p_intf
->
p_vout
,
p_main
->
p_aout
,
NULL
);
}
/* Execute the initialization script - if a positive number is returned,
* the script could be executed but failed */
else
if
(
intf_ExecScript
(
main_GetPszVariable
(
INTF_INIT_SCRIPT_VAR
,
INTF_INIT_SCRIPT_DEFAULT
)
)
>
0
)
{
}
/* Execute the initialization script - if a positive number is returned,
* the script could be executed but failed */
else
if
(
intf_ExecScript
(
main_GetPszVariable
(
INTF_INIT_SCRIPT_VAR
,
INTF_INIT_SCRIPT_DEFAULT
)
)
>
0
)
{
intf_ErrMsg
(
"warning: error(s) during startup script
\n
"
);
}
}
/* Main loop */
while
(
!
p_intf
->
b_die
)
{
/* Main loop */
while
(
!
p_intf
->
b_die
)
{
/* Flush waiting messages */
intf_FlushMsg
();
...
...
@@ -208,53 +218,52 @@ intf_thread_t* intf_Create( void )
/* Sleep to avoid using all CPU - since some interfaces needs to access
* keyboard events, a 100ms delay is a good compromise */
msleep
(
INTF_IDLE_SLEEP
);
}
}
}
/*****************************************************************************
* intf_Destroy: clean interface after main loop
*****************************************************************************
* This function destroys specific interfaces and close output devices.
*****************************************************************************/
void
intf_Destroy
(
intf_thread_t
*
p_intf
)
/*****************************************************************************
* intf_Destroy: clean interface after main loop
*****************************************************************************
* This function destroys specific interfaces and close output devices.
*****************************************************************************/
void
intf_Destroy
(
intf_thread_t
*
p_intf
)
{
p_intf_key
p_cur
;
p_intf_key
p_next
;
/* Destroy interfaces */
p_intf
->
p_sys_destroy
(
p_intf
);
intf_ConsoleDestroy
(
p_intf
->
p_console
);
/* Unload channels */
UnloadChannels
(
p_intf
);
/* Destroy keymap */
p_cur
=
p_intf
->
p_keys
;
while
(
p_cur
!=
NULL
)
{
p_intf_key
p_cur
;
p_intf_key
p_next
;
/* Destroy interfaces */
p_intf
->
p_sys_destroy
(
p_intf
);
intf_ConsoleDestroy
(
p_intf
->
p_console
);
/* Unload channels */
UnloadChannels
(
p_intf
);
/* Destroy keymap */
p_cur
=
p_intf
->
p_keys
;
while
(
p_cur
!=
NULL
)
{
p_next
=
p_cur
->
next
;
free
(
p_cur
);
p_cur
=
p_next
;
}
}
/* Free structure */
free
(
p_intf
);
}
free
(
p_intf
);
}
/*****************************************************************************
* intf_SelectChannel: change channel
*****************************************************************************
* Kill existing input, if any, and try to open a new one, using an input
* configuration table.
*****************************************************************************/
int
intf_SelectChannel
(
intf_thread_t
*
p_intf
,
int
i_channel
)
{
intf_channel_t
*
p_channel
;
/* channel */
/*****************************************************************************
* intf_SelectChannel: change channel
*****************************************************************************
* Kill existing input, if any, and try to open a new one, using an input
* configuration table.
*****************************************************************************/
int
intf_SelectChannel
(
intf_thread_t
*
p_intf
,
int
i_channel
)
{
intf_channel_t
*
p_channel
;
/* channel */
/* Look for channel in array */
if
(
p_intf
->
p_channel
!=
NULL
)
{
/* Look for channel in array */
if
(
p_intf
->
p_channel
!=
NULL
)
{
for
(
p_channel
=
p_intf
->
p_channel
;
p_channel
->
i_channel
!=
-
1
;
p_channel
++
)
{
if
(
p_channel
->
i_channel
==
i_channel
)
...
...
@@ -278,20 +287,19 @@ intf_thread_t* intf_Create( void )
return
(
p_intf
->
p_input
==
NULL
);
}
}
}
/* Channel does not exist */
intf_Msg
(
"Channel %d does not exist
\n
"
,
i_channel
);
return
(
1
);
}
/*****************************************************************************
* intf_AssignKey: assign standartkeys *
*****************************************************************************
* This function fills in the associative array that links the key pressed *
* and the key we use internally. Support one extra parameter. *
****************************************************************************/
/* Channel does not exist */
intf_Msg
(
"Channel %d does not exist
\n
"
,
i_channel
);
return
(
1
);
}
/*****************************************************************************
* intf_AssignKey: assign standartkeys *
*****************************************************************************
* This function fills in the associative array that links the key pressed *
* and the key we use internally. Support one extra parameter. *
****************************************************************************/
void
intf_AssignKey
(
intf_thread_t
*
p_intf
,
int
r_key
,
int
f_key
,
int
param
)
{
p_intf_key
p_cur
=
p_intf
->
p_keys
;
...
...
@@ -323,7 +331,7 @@ void intf_AssignKey( intf_thread_t *p_intf, int r_key, int f_key, int param)
}
/* Basic getKey function... */
keyparm
intf_
g
etKey
(
intf_thread_t
*
p_intf
,
int
r_key
)
keyparm
intf_
G
etKey
(
intf_thread_t
*
p_intf
,
int
r_key
)
{
keyparm
reply
;
...
...
@@ -334,8 +342,8 @@ keyparm intf_getKey( intf_thread_t *p_intf, int r_key)
}
if
(
current
==
NULL
)
{
/* didn't find any key in the array */
reply
.
key
=
INTF_KEY_UNKNOWN
;
reply
.
param
=
0
;
reply
.
key
=
INTF_KEY_UNKNOWN
;
reply
.
param
=
0
;
}
else
{
...
...
@@ -353,7 +361,7 @@ keyparm intf_getKey( intf_thread_t *p_intf, int r_key)
void
intf_AssignNormalKeys
(
intf_thread_t
*
p_intf
)
{
p_intf
->
p_intf_get
Key
=
intf_g
etKey
;
p_intf
->
p_intf_get
_key
=
intf_G
etKey
;
intf_AssignKey
(
p_intf
,
'Q'
,
INTF_KEY_QUIT
,
0
);
intf_AssignKey
(
p_intf
,
'q'
,
INTF_KEY_QUIT
,
0
);
...
...
@@ -393,7 +401,7 @@ int intf_ProcessKey( intf_thread_t *p_intf, int g_key )
static
int
i_volbackup
;
keyparm
k_reply
;
k_reply
=
intf_
g
etKey
(
p_intf
,
g_key
);
k_reply
=
intf_
G
etKey
(
p_intf
,
g_key
);
switch
(
k_reply
.
key
)
{
...
...
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