Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
40a91e26
Commit
40a91e26
authored
Jun 07, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: don't use input_ToggleES.
parent
c57da819
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
69 deletions
+21
-69
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.cpp
+8
-60
modules/gui/gtk/menu.c
modules/gui/gtk/menu.c
+9
-8
modules/gui/kde/interface.cpp
modules/gui/kde/interface.cpp
+4
-1
No files found.
modules/gui/beos/VlcWrapper.cpp
View file @
40a91e26
...
...
@@ -201,70 +201,18 @@ BList * VlcWrapper::GetChannels( int i_cat )
void
VlcWrapper
::
ToggleLanguage
(
int
i_language
)
{
es_descriptor_t
*
p_es
=
NULL
;
es_descriptor_t
*
p_es_old
=
NULL
;
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
for
(
unsigned
int
i
=
0
;
i
<
p_input
->
stream
.
i_selected_es_number
;
i
++
)
{
if
(
p_input
->
stream
.
pp_selected_es
[
i
]
->
i_cat
==
AUDIO_ES
)
{
p_es_old
=
p_input
->
stream
.
pp_selected_es
[
i
];
break
;
}
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
if
(
i_language
!=
-
1
)
{
p_es
=
p_input
->
stream
.
pp_es
[
i_language
];
}
if
(
p_es
==
p_es_old
)
{
return
;
}
if
(
p_es_old
)
{
input_ToggleES
(
p_input
,
p_es_old
,
VLC_FALSE
);
}
if
(
p_es
)
{
input_ToggleES
(
p_input
,
p_es
,
VLC_TRUE
);
}
if
(
i_language
<
0
)
var_SetInteger
(
p_input
,
"audio-es"
,
-
1
);
/* Disable audio */
else
var_SetInteger
(
p_input
,
"audio-es"
,
i_language
);
}
void
VlcWrapper
::
ToggleSubtitle
(
int
i_subtitle
)
{
es_descriptor_t
*
p_es
=
NULL
;
es_descriptor_t
*
p_es_old
=
NULL
;
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
for
(
unsigned
int
i
=
0
;
i
<
p_input
->
stream
.
i_selected_es_number
;
i
++
)
{
if
(
p_input
->
stream
.
pp_selected_es
[
i
]
->
i_cat
==
SPU_ES
)
{
p_es_old
=
p_input
->
stream
.
pp_selected_es
[
i
];
break
;
}
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
if
(
i_subtitle
!=
-
1
)
{
p_es
=
p_input
->
stream
.
pp_es
[
i_subtitle
];
}
if
(
p_es
==
p_es_old
)
{
return
;
}
if
(
p_es_old
)
{
input_ToggleES
(
p_input
,
p_es_old
,
VLC_FALSE
);
}
if
(
p_es
)
{
input_ToggleES
(
p_input
,
p_es
,
VLC_TRUE
);
}
if
(
i_language
<
0
)
var_SetInteger
(
p_input
,
"spu-es"
,
-
1
);
/* Disable SPU */
else
var_SetInteger
(
p_input
,
"spu-es"
,
i_subtitle
);
}
const
char
*
VlcWrapper
::
GetTimeAsString
()
...
...
modules/gui/gtk/menu.c
View file @
40a91e26
...
...
@@ -82,7 +82,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf );
* user_data to transmit intf_* and we need to refresh the other menu.
****************************************************************************/
#define GTKLANGTOGGLE( window, menu, type,
callback, b_update )
\
#define GTKLANGTOGGLE( window, menu, type,
var_name, callback, b_update )
\
intf_thread_t * p_intf; \
GtkWidget * p_menu; \
es_descriptor_t * p_es; \
...
...
@@ -94,9 +94,10 @@ gint GtkSetupMenus( intf_thread_t * p_intf );
p_menu = GTK_WIDGET( gtk_object_get_data( \
GTK_OBJECT( p_intf->p_sys->window ), (menu) ) ); \
p_es = (es_descriptor_t*)user_data; \
\
input_ToggleES( p_intf->p_sys->p_input, \
p_es, menuitem->active ); \
if( p_es && menuitem->active ) \
var_SetInteger( p_intf->p_sys->p_input, var_name, p_es->i_id ); \
else \
var_SetInteger( p_intf->p_sys->p_input, var_name, -1 ); \
\
p_intf->p_sys->b_update = menuitem->active; \
\
...
...
@@ -114,13 +115,13 @@ gint GtkSetupMenus( intf_thread_t * p_intf );
void
GtkMenubarAudioToggle
(
GtkCheckMenuItem
*
menuitem
,
gpointer
user_data
)
{
GTKLANGTOGGLE
(
p_popup
,
"popup_language"
,
AUDIO_ES
,
GTKLANGTOGGLE
(
p_popup
,
"popup_language"
,
AUDIO_ES
,
"audio-es"
,
GtkPopupAudioToggle
,
b_audio_update
);
}
void
GtkPopupAudioToggle
(
GtkCheckMenuItem
*
menuitem
,
gpointer
user_data
)
{
GTKLANGTOGGLE
(
p_window
,
"menubar_audio"
,
AUDIO_ES
,
GTKLANGTOGGLE
(
p_window
,
"menubar_audio"
,
AUDIO_ES
,
"audio-es"
,
GtkMenubarAudioToggle
,
b_audio_update
);
}
...
...
@@ -130,13 +131,13 @@ void GtkPopupAudioToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
void
GtkMenubarSubtitleToggle
(
GtkCheckMenuItem
*
menuitem
,
gpointer
user_data
)
{
GTKLANGTOGGLE
(
p_popup
,
"popup_subpictures"
,
SPU_ES
,
GTKLANGTOGGLE
(
p_popup
,
"popup_subpictures"
,
SPU_ES
,
"spu-es"
,
GtkPopupSubtitleToggle
,
b_spu_update
);
}
void
GtkPopupSubtitleToggle
(
GtkCheckMenuItem
*
menuitem
,
gpointer
user_data
)
{
GTKLANGTOGGLE
(
p_window
,
"menubar_subpictures"
,
SPU_ES
,
GTKLANGTOGGLE
(
p_window
,
"menubar_subpictures"
,
SPU_ES
,
"spu-es"
,
GtkMenubarSubtitleToggle
,
b_spu_update
);
}
...
...
modules/gui/kde/interface.cpp
View file @
40a91e26
...
...
@@ -494,7 +494,10 @@ void KInterface::languageMenus(KActionMenu *root, es_descriptor_t *p_es,
void
KInterface
::
slotSetLanguage
(
bool
on
,
es_descriptor_t
*
p_es
)
{
input_ToggleES
(
p_intf
->
p_sys
->
p_input
,
p_es
,
on
);
if
(
p_es
)
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"audio-es"
,
p_es
->
i_id
);
else
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"audio-es"
,
-
1
);
}
void
KInterface
::
slotSliderChanged
(
int
position
)
...
...
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