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
24cddfa0
Commit
24cddfa0
authored
May 16, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'origin/1.0-bugfix'
parents
d1d3d7b4
6dce48f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
69 deletions
+70
-69
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+1
-1
modules/gui/pda/pda_support.c
modules/gui/pda/pda_support.c
+3
-1
modules/misc/gtk_main.c
modules/misc/gtk_main.c
+3
-3
src/osd/osd.c
src/osd/osd.c
+63
-64
No files found.
modules/gui/pda/pda_callbacks.c
View file @
24cddfa0
...
@@ -136,7 +136,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
...
@@ -136,7 +136,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
(
const
char
*
)
name
,
(
const
char
*
)
name
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
(
mtime_t
)
0
,
(
mtime_t
)
0
,
i_
options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
i_
size
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
true
,
pl_Unlocked
);
true
,
pl_Unlocked
);
}
}
...
...
modules/gui/pda/pda_support.c
View file @
24cddfa0
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <unistd.h>
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gtk/gtk.h>
...
@@ -75,6 +76,7 @@ GtkWidget*
...
@@ -75,6 +76,7 @@ GtkWidget*
create_pixmap
(
GtkWidget
*
widget
,
create_pixmap
(
GtkWidget
*
widget
,
const
gchar
*
filename
)
const
gchar
*
filename
)
{
{
VLC_UNUSED
(
widget
);
gchar
*
pathname
=
NULL
;
gchar
*
pathname
=
NULL
;
GtkWidget
*
pixmap
;
GtkWidget
*
pixmap
;
...
@@ -136,7 +138,7 @@ glade_set_atk_action_description (AtkAction *action,
...
@@ -136,7 +138,7 @@ glade_set_atk_action_description (AtkAction *action,
for
(
i
=
0
;
i
<
n_actions
;
i
++
)
for
(
i
=
0
;
i
<
n_actions
;
i
++
)
{
{
if
(
!
strcmp
(
atk_action_get_name
(
action
,
i
),
action_name
))
if
(
!
strcmp
(
atk_action_get_name
(
action
,
i
),
action_name
))
atk_action_set_description
(
action
,
i
,
description
)
atk_action_set_description
(
action
,
i
,
description
)
;
}
}
}
}
modules/misc/gtk_main.c
View file @
24cddfa0
...
@@ -94,7 +94,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -94,7 +94,7 @@ static int Open( vlc_object_t *p_this )
if
(
i_refcount
>
0
)
if
(
i_refcount
>
0
)
{
{
i_refcount
++
;
i_refcount
++
;
vlc_mutex_unlock
(
lock
);
vlc_mutex_unlock
(
&
gtk_
lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -110,11 +110,11 @@ static int Open( vlc_object_t *p_this )
...
@@ -110,11 +110,11 @@ static int Open( vlc_object_t *p_this )
/* Launch the gtk_main() thread. It will not return until it has
/* Launch the gtk_main() thread. It will not return until it has
* called gdk_threads_enter(), which ensures us thread safety. */
* called gdk_threads_enter(), which ensures us thread safety. */
if
(
vlc_thread_create
(
p_gtk_main
,
"gtk_main"
,
GtkMain
,
if
(
vlc_thread_create
(
p_gtk_main
,
"gtk_main"
,
GtkMain
,
VLC_THREAD_PRIORITY_LOW
,
true
)
)
VLC_THREAD_PRIORITY_LOW
)
)
{
{
vlc_object_release
(
p_gtk_main
);
vlc_object_release
(
p_gtk_main
);
i_refcount
--
;
i_refcount
--
;
vlc_mutex_unlock
(
lock
);
vlc_mutex_unlock
(
&
gtk_
lock
);
return
VLC_ETHREAD
;
return
VLC_ETHREAD
;
}
}
...
...
src/osd/osd.c
View file @
24cddfa0
...
@@ -57,6 +57,15 @@ static bool osd_isVisible( osd_menu_t *p_osd )
...
@@ -57,6 +57,15 @@ static bool osd_isVisible( osd_menu_t *p_osd )
return
val
.
b_bool
;
return
val
.
b_bool
;
}
}
static
vlc_mutex_t
*
osd_GetMutex
(
vlc_object_t
*
p_this
)
{
vlc_value_t
lockval
;
var_Create
(
p_this
->
p_libvlc
,
"osd_mutex"
,
VLC_VAR_MUTEX
);
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
return
lockval
.
p_address
;
}
/*****************************************************************************
/*****************************************************************************
* Wrappers for loading and unloading osd parser modules.
* Wrappers for loading and unloading osd parser modules.
*****************************************************************************/
*****************************************************************************/
...
@@ -138,16 +147,16 @@ static osd_state_t *osd_StateChange( osd_button_t *p_button, const int i_state )
...
@@ -138,16 +147,16 @@ static osd_state_t *osd_StateChange( osd_button_t *p_button, const int i_state )
osd_menu_t
*
__osd_MenuCreate
(
vlc_object_t
*
p_this
,
const
char
*
psz_file
)
osd_menu_t
*
__osd_MenuCreate
(
vlc_object_t
*
p_this
,
const
char
*
psz_file
)
{
{
osd_menu_t
*
p_osd
=
NULL
;
osd_menu_t
*
p_osd
=
NULL
;
vlc_value_t
lockval
,
val
;
vlc_value_t
val
;
vlc_mutex_t
*
p_lock
;
int
i_volume
=
0
;
int
i_volume
=
0
;
int
i_steps
=
0
;
int
i_steps
=
0
;
/* to be sure to avoid multiple creation */
/* to be sure to avoid multiple creation */
var_Create
(
p_this
->
p_libvlc
,
"osd_mutex"
,
VLC_VAR_MUTEX
);
p_lock
=
osd_GetMutex
(
p_this
);
var_Create
(
p_this
->
p_libvlc
,
"osd"
,
VLC_VAR_ADDRESS
);
vlc_mutex_lock
(
p_lock
);
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
lockval
.
p_address
);
var_Create
(
p_this
->
p_libvlc
,
"osd"
,
VLC_VAR_ADDRESS
);
var_Get
(
p_this
->
p_libvlc
,
"osd"
,
&
val
);
var_Get
(
p_this
->
p_libvlc
,
"osd"
,
&
val
);
if
(
val
.
p_address
==
NULL
)
if
(
val
.
p_address
==
NULL
)
{
{
...
@@ -199,23 +208,23 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
...
@@ -199,23 +208,23 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
else
else
p_osd
=
val
.
p_address
;
p_osd
=
val
.
p_address
;
vlc_object_hold
(
p_osd
);
vlc_object_hold
(
p_osd
);
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
return
p_osd
;
return
p_osd
;
error:
error:
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
__osd_MenuDelete
(
p_this
,
p_osd
);
__osd_MenuDelete
(
p_this
,
p_osd
);
return
NULL
;
return
NULL
;
}
}
void
__osd_MenuDelete
(
vlc_object_t
*
p_this
,
osd_menu_t
*
p_osd
)
void
__osd_MenuDelete
(
vlc_object_t
*
p_this
,
osd_menu_t
*
p_osd
)
{
{
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
;
if
(
!
p_osd
||
!
p_this
)
return
;
if
(
!
p_osd
||
!
p_this
)
return
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
p_lock
=
osd_GetMutex
(
p_this
);
vlc_mutex_lock
(
lockval
.
p_address
);
vlc_mutex_lock
(
p_lock
);
if
(
vlc_internals
(
VLC_OBJECT
(
p_osd
)
)
->
i_refcount
==
1
)
if
(
vlc_internals
(
VLC_OBJECT
(
p_osd
)
)
->
i_refcount
==
1
)
{
{
...
@@ -229,7 +238,7 @@ void __osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd )
...
@@ -229,7 +238,7 @@ void __osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd )
}
}
vlc_object_release
(
p_osd
);
vlc_object_release
(
p_osd
);
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
static
osd_menu_t
*
osd_Find
(
vlc_object_t
*
p_this
)
static
osd_menu_t
*
osd_Find
(
vlc_object_t
*
p_this
)
...
@@ -276,14 +285,13 @@ void __osd_MenuShow( vlc_object_t *p_this )
...
@@ -276,14 +285,13 @@ void __osd_MenuShow( vlc_object_t *p_this )
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
)
if
(
p_osd
==
NULL
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuShow failed"
);
msg_Err
(
p_this
,
"osd_MenuShow failed"
);
return
;
return
;
}
}
...
@@ -311,21 +319,20 @@ void __osd_MenuShow( vlc_object_t *p_this )
...
@@ -311,21 +319,20 @@ void __osd_MenuShow( vlc_object_t *p_this )
}
}
osd_SetMenuVisible
(
p_osd
,
true
);
osd_SetMenuVisible
(
p_osd
,
true
);
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
void
__osd_MenuHide
(
vlc_object_t
*
p_this
)
void
__osd_MenuHide
(
vlc_object_t
*
p_this
)
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
)
if
(
p_osd
==
NULL
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuHide failed"
);
msg_Err
(
p_this
,
"osd_MenuHide failed"
);
return
;
return
;
}
}
...
@@ -338,22 +345,21 @@ void __osd_MenuHide( vlc_object_t *p_this )
...
@@ -338,22 +345,21 @@ void __osd_MenuHide( vlc_object_t *p_this )
0
,
0
,
NULL
);
0
,
0
,
NULL
);
osd_SetMenuUpdate
(
p_osd
,
true
);
osd_SetMenuUpdate
(
p_osd
,
true
);
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
void
__osd_MenuActivate
(
vlc_object_t
*
p_this
)
void
__osd_MenuActivate
(
vlc_object_t
*
p_this
)
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuActivate failed"
);
msg_Err
(
p_this
,
"osd_MenuActivate failed"
);
return
;
return
;
}
}
...
@@ -367,13 +373,13 @@ void __osd_MenuActivate( vlc_object_t *p_this )
...
@@ -367,13 +373,13 @@ void __osd_MenuActivate( vlc_object_t *p_this )
*/
*/
if
(
p_button
&&
p_button
->
p_up
)
if
(
p_button
&&
p_button
->
p_up
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
__osd_MenuUp
(
p_this
);
/* "menu select" means go to menu item above. */
__osd_MenuUp
(
p_this
);
/* "menu select" means go to menu item above. */
return
;
return
;
}
}
if
(
p_button
&&
p_button
->
p_down
)
if
(
p_button
&&
p_button
->
p_down
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
__osd_MenuDown
(
p_this
);
/* "menu select" means go to menu item below. */
__osd_MenuDown
(
p_this
);
/* "menu select" means go to menu item below. */
return
;
return
;
}
}
...
@@ -393,22 +399,21 @@ void __osd_MenuActivate( vlc_object_t *p_this )
...
@@ -393,22 +399,21 @@ void __osd_MenuActivate( vlc_object_t *p_this )
msg_Dbg
(
p_osd
,
"select (%d, %s)"
,
config_GetInt
(
p_osd
,
p_button
->
psz_action
),
p_button
->
psz_action
);
msg_Dbg
(
p_osd
,
"select (%d, %s)"
,
config_GetInt
(
p_osd
,
p_button
->
psz_action
),
p_button
->
psz_action
);
#endif
#endif
}
}
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
void
__osd_MenuNext
(
vlc_object_t
*
p_this
)
void
__osd_MenuNext
(
vlc_object_t
*
p_this
)
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuNext failed"
);
msg_Err
(
p_this
,
"osd_MenuNext failed"
);
return
;
return
;
}
}
...
@@ -438,21 +443,20 @@ void __osd_MenuNext( vlc_object_t *p_this )
...
@@ -438,21 +443,20 @@ void __osd_MenuNext( vlc_object_t *p_this )
msg_Dbg
(
p_osd
,
"direction right [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
msg_Dbg
(
p_osd
,
"direction right [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
#endif
#endif
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
void
__osd_MenuPrev
(
vlc_object_t
*
p_this
)
void
__osd_MenuPrev
(
vlc_object_t
*
p_this
)
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuPrev failed"
);
msg_Err
(
p_this
,
"osd_MenuPrev failed"
);
return
;
return
;
}
}
...
@@ -482,24 +486,23 @@ void __osd_MenuPrev( vlc_object_t *p_this )
...
@@ -482,24 +486,23 @@ void __osd_MenuPrev( vlc_object_t *p_this )
msg_Dbg
(
p_osd
,
"direction left [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
msg_Dbg
(
p_osd
,
"direction left [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
#endif
#endif
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
void
__osd_MenuUp
(
vlc_object_t
*
p_this
)
void
__osd_MenuUp
(
vlc_object_t
*
p_this
)
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_value_t
lockval
;
#if defined(OSD_MENU_DEBUG)
#if defined(OSD_MENU_DEBUG)
vlc_value_t
val
;
vlc_value_t
val
;
#endif
#endif
vlc_mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
);
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuActivate failed"
);
msg_Err
(
p_this
,
"osd_MenuActivate failed"
);
return
;
return
;
}
}
...
@@ -547,25 +550,24 @@ void __osd_MenuUp( vlc_object_t *p_this )
...
@@ -547,25 +550,24 @@ void __osd_MenuUp( vlc_object_t *p_this )
msg_Dbg
(
p_osd
,
"direction up [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
msg_Dbg
(
p_osd
,
"direction up [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
#endif
#endif
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
void
__osd_MenuDown
(
vlc_object_t
*
p_this
)
void
__osd_MenuDown
(
vlc_object_t
*
p_this
)
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_value_t
lockval
;
#if defined(OSD_MENU_DEBUG)
#if defined(OSD_MENU_DEBUG)
vlc_value_t
val
;
vlc_value_t
val
;
#endif
#endif
vlc_mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
);
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_MenuActivate failed"
);
msg_Err
(
p_this
,
"osd_MenuActivate failed"
);
return
;
return
;
}
}
...
@@ -613,7 +615,7 @@ void __osd_MenuDown( vlc_object_t *p_this )
...
@@ -613,7 +615,7 @@ void __osd_MenuDown( vlc_object_t *p_this )
msg_Dbg
(
p_osd
,
"direction down [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
msg_Dbg
(
p_osd
,
"direction down [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
#endif
#endif
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
static
int
osd_VolumeStep
(
vlc_object_t
*
p_this
,
int
i_volume
,
int
i_steps
)
static
int
osd_VolumeStep
(
vlc_object_t
*
p_this
,
int
i_volume
,
int
i_steps
)
...
@@ -635,17 +637,16 @@ void __osd_Volume( vlc_object_t *p_this )
...
@@ -635,17 +637,16 @@ void __osd_Volume( vlc_object_t *p_this )
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
=
NULL
;
osd_button_t
*
p_button
=
NULL
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
int
i_volume
=
0
;
int
i_volume
=
0
;
int
i_steps
=
0
;
int
i_steps
=
0
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
)
if
(
p_osd
==
NULL
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"OSD menu volume update failed"
);
msg_Err
(
p_this
,
"OSD menu volume update failed"
);
return
;
return
;
}
}
...
@@ -672,7 +673,7 @@ void __osd_Volume( vlc_object_t *p_this )
...
@@ -672,7 +673,7 @@ void __osd_Volume( vlc_object_t *p_this )
osd_SetMenuVisible
(
p_osd
,
true
);
osd_SetMenuVisible
(
p_osd
,
true
);
}
}
}
}
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
osd_button_t
*
__osd_ButtonFind
(
vlc_object_t
*
p_this
,
int
i_x
,
int
i_y
,
osd_button_t
*
__osd_ButtonFind
(
vlc_object_t
*
p_this
,
int
i_x
,
int
i_y
,
...
@@ -681,15 +682,14 @@ osd_button_t *__osd_ButtonFind( vlc_object_t *p_this, int i_x, int i_y,
...
@@ -681,15 +682,14 @@ osd_button_t *__osd_ButtonFind( vlc_object_t *p_this, int i_x, int i_y,
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_button
;
osd_button_t
*
p_button
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_ButtonFind failed"
);
msg_Err
(
p_this
,
"osd_ButtonFind failed"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -740,12 +740,12 @@ osd_button_t *__osd_ButtonFind( vlc_object_t *p_this, int i_x, int i_y,
...
@@ -740,12 +740,12 @@ osd_button_t *__osd_ButtonFind( vlc_object_t *p_this, int i_x, int i_y,
if
(
(
i_x
>=
i_x_offset
)
&&
(
i_x
<=
i_x_offset
+
i_width
)
&&
if
(
(
i_x
>=
i_x_offset
)
&&
(
i_x
<=
i_x_offset
+
i_width
)
&&
(
i_y
>=
i_y_offset
)
&&
(
i_y
<=
i_y_offset
+
i_height
)
)
(
i_y
>=
i_y_offset
)
&&
(
i_y
<=
i_y_offset
+
i_height
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
return
p_button
;
return
p_button
;
}
}
}
}
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
return
NULL
;
return
NULL
;
}
}
...
@@ -756,15 +756,14 @@ void __osd_ButtonSelect( vlc_object_t *p_this, osd_button_t *p_button )
...
@@ -756,15 +756,14 @@ void __osd_ButtonSelect( vlc_object_t *p_this, osd_button_t *p_button )
{
{
osd_menu_t
*
p_osd
;
osd_menu_t
*
p_osd
;
osd_button_t
*
p_old
;
osd_button_t
*
p_old
;
vlc_
value_t
lockval
;
vlc_
mutex_t
*
p_lock
=
osd_GetMutex
(
p_this
)
;
var_Get
(
p_this
->
p_libvlc
,
"osd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
p_lock
);
vlc_mutex_lock
(
lockval
.
p_address
);
p_osd
=
osd_Find
(
p_this
);
p_osd
=
osd_Find
(
p_this
);
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
if
(
p_osd
==
NULL
||
!
osd_isVisible
(
p_osd
)
)
{
{
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
msg_Err
(
p_this
,
"osd_ButtonSelect failed"
);
msg_Err
(
p_this
,
"osd_ButtonSelect failed"
);
return
;
return
;
}
}
...
@@ -791,5 +790,5 @@ void __osd_ButtonSelect( vlc_object_t *p_this, osd_button_t *p_button )
...
@@ -791,5 +790,5 @@ void __osd_ButtonSelect( vlc_object_t *p_this, osd_button_t *p_button )
msg_Dbg
(
p_osd
,
"button selected is [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
msg_Dbg
(
p_osd
,
"button selected is [button %s]"
,
p_osd
->
p_state
->
p_visible
->
psz_action
);
#endif
#endif
vlc_mutex_unlock
(
lockval
.
p_address
);
vlc_mutex_unlock
(
p_lock
);
}
}
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