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
23ba8c3e
Commit
23ba8c3e
authored
Jan 13, 2003
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* MacOSX interface: fixed a stupid bug
* Win32 interface: completed support for channel selection
parent
4e82695c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
98 deletions
+108
-98
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+2
-2
modules/gui/win32/mainframe.dfm
modules/gui/win32/mainframe.dfm
+3
-0
modules/gui/win32/menu.cpp
modules/gui/win32/menu.cpp
+25
-10
modules/gui/win32/win32.cpp
modules/gui/win32/win32.cpp
+78
-86
No files found.
modules/gui/macosx/intf.m
View file @
23ba8c3e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
* intf.m: MacOS X interface plugin
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.2
2 2003/01/12 18:25:05 jlj
Exp $
* $Id: intf.m,v 1.2
3 2003/01/13 17:11:14 ipkiss
Exp $
*
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
...
@@ -782,7 +782,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -782,7 +782,7 @@ static void Run( intf_thread_t *p_intf )
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_selected_es_number
;
i
++
)
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_selected_es_number
;
i
++
)
{
{
if
(
p_input
->
stream
.
pp_selected_es
[
i
]
->
i_cat
==
SPU
_ES
)
if
(
p_input
->
stream
.
pp_selected_es
[
i
]
->
i_cat
==
AUDIO
_ES
)
{
{
p_audio_es
=
p_input
->
stream
.
pp_selected_es
[
i
];
p_audio_es
=
p_input
->
stream
.
pp_selected_es
[
i
];
}
}
...
...
modules/gui/win32/mainframe.dfm
View file @
23ba8c3e
...
@@ -2391,6 +2391,7 @@ object MainFrameDlg: TMainFrameDlg
...
@@ -2391,6 +2391,7 @@ object MainFrameDlg: TMainFrameDlg
object PopupADevice: TMenuItem
object PopupADevice: TMenuItem
Tag = 3
Tag = 3
Caption = 'Device'
Caption = 'Device'
Enabled = False
end
end
object VolumeUp1: TMenuItem
object VolumeUp1: TMenuItem
Tag = 3
Tag = 3
...
@@ -2407,10 +2408,12 @@ object MainFrameDlg: TMainFrameDlg
...
@@ -2407,10 +2408,12 @@ object MainFrameDlg: TMainFrameDlg
object PopupChannel: TMenuItem
object PopupChannel: TMenuItem
Tag = 3
Tag = 3
Caption = 'Channels'
Caption = 'Channels'
Enabled = False
end
end
end
end
object PopupVDevice: TMenuItem
object PopupVDevice: TMenuItem
Caption = 'Screen'
Caption = 'Screen'
Enabled = False
end
end
object N1: TMenuItem
object N1: TMenuItem
Caption = '-'
Caption = '-'
...
...
modules/gui/win32/menu.cpp
View file @
23ba8c3e
/*****************************************************************************
/*****************************************************************************
* menu.cpp: functions to handle menu items
* menu.cpp: functions to handle menu items
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002
-2003
VideoLAN
* $Id: menu.cpp,v 1.
3 2003/01/08 02:16:09
ipkiss Exp $
* $Id: menu.cpp,v 1.
4 2003/01/13 17:11:14
ipkiss Exp $
*
*
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
*
*
...
@@ -239,6 +239,11 @@ __fastcall TMenusGen::TMenusGen( intf_thread_t *_p_intf ) : TObject()
...
@@ -239,6 +239,11 @@ __fastcall TMenusGen::TMenusGen( intf_thread_t *_p_intf ) : TObject()
}
}
/*****************************************************************************
* SetupMenus: This function dynamically generates some menus
*****************************************************************************
* The lock on p_input->stream must be taken before you call this function
*****************************************************************************/
void
__fastcall
TMenusGen
::
SetupMenus
()
void
__fastcall
TMenusGen
::
SetupMenus
()
{
{
TMainFrameDlg
*
p_window
=
p_intf
->
p_sys
->
p_window
;
TMainFrameDlg
*
p_window
=
p_intf
->
p_sys
->
p_window
;
...
@@ -349,7 +354,7 @@ void __fastcall TMenusGen::SetupMenus()
...
@@ -349,7 +354,7 @@ void __fastcall TMenusGen::SetupMenus()
p_aout
=
(
aout_instance_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_AOUT
,
p_aout
=
(
aout_instance_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
if
(
p_aout
!=
NULL
)
if
(
p_aout
!=
NULL
)
{
{
vlc_value_t
val
;
vlc_value_t
val
;
val
.
b_bool
=
0
;
val
.
b_bool
=
0
;
...
@@ -378,7 +383,7 @@ void __fastcall TMenusGen::SetupMenus()
...
@@ -378,7 +383,7 @@ void __fastcall TMenusGen::SetupMenus()
p_vout
=
(
vout_thread_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_VOUT
,
p_vout
=
(
vout_thread_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
if
(
p_vout
!=
NULL
)
if
(
p_vout
!=
NULL
)
{
{
vlc_value_t
val
;
vlc_value_t
val
;
val
.
b_bool
=
0
;
val
.
b_bool
=
0
;
...
@@ -447,8 +452,17 @@ void __fastcall TMenusGen::VarChange( vlc_object_t *p_object,
...
@@ -447,8 +452,17 @@ void __fastcall TMenusGen::VarChange( vlc_object_t *p_object,
vlc_value_t
val
;
vlc_value_t
val
;
int
i_index
;
int
i_index
;
/* We must delete all the '&' characters in the caption string, because
* Borland automatically adds one when (and only when!) you click on
* the menuitem. Grrrrr... */
AnsiString
Caption
=
Item
->
Caption
;
while
(
Caption
.
LastDelimiter
(
"&"
)
!=
0
)
{
Caption
.
Delete
(
Caption
.
LastDelimiter
(
"&"
),
1
);
}
val
.
psz_string
=
Caption
.
c_str
();
/* set the new value */
/* set the new value */
val
.
psz_string
=
Item
->
Name
.
c_str
();
if
(
var_Set
(
p_object
,
psz_variable
,
val
)
<
0
)
if
(
var_Set
(
p_object
,
psz_variable
,
val
)
<
0
)
{
{
msg_Warn
(
p_object
,
"cannot set variable (%s)"
,
val
.
psz_string
);
msg_Warn
(
p_object
,
"cannot set variable (%s)"
,
val
.
psz_string
);
...
@@ -546,27 +560,27 @@ void __fastcall TMenusGen::SetupVarMenu( vlc_object_t *p_object,
...
@@ -546,27 +560,27 @@ void __fastcall TMenusGen::SetupVarMenu( vlc_object_t *p_object,
{
{
TMenuItem
*
Item
;
TMenuItem
*
Item
;
vlc_value_t
val
;
vlc_value_t
val
;
char
*
psz_value
;
char
*
psz_value
=
NULL
;
int
i
;
int
i
;
/* remove previous menu */
/* remove previous menu */
Root
->
Clear
();
Root
->
Clear
();
/* get the current value */
/* get the current value */
if
(
var_Get
(
p_object
,
psz_variable
,
&
val
)
<
0
)
if
(
var_Get
(
p_object
,
psz_variable
,
&
val
)
<
0
)
{
{
return
;
return
;
}
}
psz_value
=
val
.
psz_string
;
psz_value
=
val
.
psz_string
;
if
(
var_Change
(
p_object
,
psz_variable
,
VLC_VAR_GETLIST
,
&
val
)
<
0
)
if
(
var_Change
(
p_object
,
psz_variable
,
VLC_VAR_GETLIST
,
&
val
)
<
0
)
{
{
free
(
psz_value
);
free
(
psz_value
);
return
;
return
;
}
}
/* append a menuitem for each option */
/* append a menuitem for each option */
for
(
i
=
0
;
i
<
val
.
p_list
->
i_count
;
i
++
)
for
(
i
=
0
;
i
<
val
.
p_list
->
i_count
;
i
++
)
{
{
Item
=
new
TMenuItem
(
Root
);
Item
=
new
TMenuItem
(
Root
);
Item
->
Caption
=
val
.
p_list
->
p_values
[
i
].
psz_string
;
Item
->
Caption
=
val
.
p_list
->
p_values
[
i
].
psz_string
;
...
@@ -585,7 +599,7 @@ void __fastcall TMenusGen::SetupVarMenu( vlc_object_t *p_object,
...
@@ -585,7 +599,7 @@ void __fastcall TMenusGen::SetupVarMenu( vlc_object_t *p_object,
/* clean up everything */
/* clean up everything */
var_Change
(
p_object
,
psz_variable
,
VLC_VAR_FREELIST
,
&
val
);
var_Change
(
p_object
,
psz_variable
,
VLC_VAR_FREELIST
,
&
val
);
free
(
psz_value
);
//
free( psz_value );
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -929,3 +943,4 @@ void __fastcall TMenusGen::NavigationMenu( TMenuItem *Root,
...
@@ -929,3 +943,4 @@ void __fastcall TMenusGen::NavigationMenu( TMenuItem *Root,
Root
->
Enabled
=
true
;
Root
->
Enabled
=
true
;
}
}
modules/gui/win32/win32.cpp
View file @
23ba8c3e
/*****************************************************************************
/*****************************************************************************
* win32.cpp : Win32 interface plugin for vlc
* win32.cpp : Win32 interface plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002
-2003
VideoLAN
* $Id: win32.cpp,v 1.
7 2003/01/08 02:16:09
ipkiss Exp $
* $Id: win32.cpp,v 1.
8 2003/01/13 17:11:14
ipkiss Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
*
...
@@ -129,9 +129,6 @@ static void Run( intf_thread_t *p_intf )
...
@@ -129,9 +129,6 @@ static void Run( intf_thread_t *p_intf )
*****************************************************************************/
*****************************************************************************/
int
Win32Manage
(
intf_thread_t
*
p_intf
)
int
Win32Manage
(
intf_thread_t
*
p_intf
)
{
{
aout_instance_t
*
p_aout
;
vout_thread_t
*
p_vout
;
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
/* If the "display popup" flag has changed */
/* If the "display popup" flag has changed */
...
@@ -163,19 +160,20 @@ int Win32Manage( intf_thread_t *p_intf )
...
@@ -163,19 +160,20 @@ int Win32Manage( intf_thread_t *p_intf )
p_intf
->
p_sys
->
p_input
=
NULL
;
p_intf
->
p_sys
->
p_input
=
NULL
;
}
}
if
(
p_intf
->
p_sys
->
p_input
)
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
&&
!
p_intf
->
p_sys
->
p_input
->
b_die
)
{
{
input_thread_t
*
p_input
=
p_intf
->
p_sys
->
p_input
;
vlc_bool_t
b_need_menus
=
0
;
input_thread_t
*
p_input
=
p_intf
->
p_sys
->
p_input
;
aout_instance_t
*
p_aout
=
NULL
;
vout_thread_t
*
p_vout
=
NULL
;
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
!
p_input
->
b_die
)
{
/* New input or stream map change */
/* New input or stream map change */
if
(
p_input
->
stream
.
b_changed
)
if
(
p_input
->
stream
.
b_changed
)
{
{
p_intf
->
p_sys
->
p_window
->
ModeManage
();
p_intf
->
p_sys
->
p_window
->
ModeManage
();
p_intf
->
p_sys
->
p_menus
->
SetupMenus
()
;
b_need_menus
=
1
;
p_intf
->
p_sys
->
b_playing
=
1
;
p_intf
->
p_sys
->
b_playing
=
1
;
}
}
...
@@ -210,27 +208,14 @@ int Win32Manage( intf_thread_t *p_intf )
...
@@ -210,27 +208,14 @@ int Win32Manage( intf_thread_t *p_intf )
/* Update the old value */
/* Update the old value */
p_intf
->
p_sys
->
OldValue
=
NewValue
;
p_intf
->
p_sys
->
OldValue
=
NewValue
;
}
}
/* Update the display */
// TrackBar->Invalidate();
# undef p_area
# undef p_area
}
if
(
p_intf
->
p_sys
->
i_part
!=
p_input
->
stream
.
p_selected_area
->
i_part
)
{
// p_intf->p_sys->b_chapter_update = 1;
p_intf
->
p_sys
->
p_menus
->
SetupMenus
();
}
}
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
if
(
p_intf
->
p_sys
->
i_part
!=
p_input
->
stream
.
p_selected_area
->
i_part
)
}
else
if
(
p_intf
->
p_sys
->
b_playing
&&
!
p_intf
->
b_die
)
{
{
p_intf
->
p_sys
->
p_window
->
ModeManage
()
;
p_intf
->
p_sys
->
b_chapter_update
=
1
;
p_intf
->
p_sys
->
b_playing
=
0
;
b_need_menus
=
1
;
}
}
/* Does the audio output require to update the menus ? */
/* Does the audio output require to update the menus ? */
...
@@ -242,10 +227,8 @@ int Win32Manage( intf_thread_t *p_intf )
...
@@ -242,10 +227,8 @@ int Win32Manage( intf_thread_t *p_intf )
if
(
var_Get
(
(
vlc_object_t
*
)
p_aout
,
"intf-change"
,
&
val
)
>=
0
if
(
var_Get
(
(
vlc_object_t
*
)
p_aout
,
"intf-change"
,
&
val
)
>=
0
&&
val
.
b_bool
)
&&
val
.
b_bool
)
{
{
#if 0
p_intf
->
p_sys
->
b_aout_update
=
1
;
p_intf
->
p_sys
->
b_aout_update
=
1
;
p_intf->p_sys->p_menus->SetupMenus();
b_need_menus
=
1
;
#endif
}
}
vlc_object_release
(
(
vlc_object_t
*
)
p_aout
);
vlc_object_release
(
(
vlc_object_t
*
)
p_aout
);
...
@@ -260,15 +243,24 @@ int Win32Manage( intf_thread_t *p_intf )
...
@@ -260,15 +243,24 @@ int Win32Manage( intf_thread_t *p_intf )
if
(
var_Get
(
(
vlc_object_t
*
)
p_vout
,
"intf-change"
,
&
val
)
>=
0
if
(
var_Get
(
(
vlc_object_t
*
)
p_vout
,
"intf-change"
,
&
val
)
>=
0
&&
val
.
b_bool
)
&&
val
.
b_bool
)
{
{
#if 0
p_intf
->
p_sys
->
b_vout_update
=
1
;
p_intf
->
p_sys
->
b_vout_update
=
1
;
p_intf->p_sys->p_menus->SetupMenus();
b_need_menus
=
1
;
#endif
}
}
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
}
}
if
(
b_need_menus
)
p_intf
->
p_sys
->
p_menus
->
SetupMenus
();
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
else
if
(
p_intf
->
p_sys
->
b_playing
&&
!
p_intf
->
b_die
)
{
p_intf
->
p_sys
->
p_window
->
ModeManage
();
p_intf
->
p_sys
->
b_playing
=
0
;
}
if
(
p_intf
->
b_die
)
if
(
p_intf
->
b_die
)
{
{
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
vlc_mutex_unlock
(
&
p_intf
->
change_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