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
b60815ca
Commit
b60815ca
authored
Jun 02, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./plugins/macosx: rewrote the net panel for OS X
parent
5cfee589
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
116 deletions
+105
-116
ChangeLog
ChangeLog
+1
-0
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
+1
-9
plugins/macosx/intf_controller.m
plugins/macosx/intf_controller.m
+7
-2
plugins/macosx/intf_open.h
plugins/macosx/intf_open.h
+2
-10
plugins/macosx/intf_open.m
plugins/macosx/intf_open.m
+52
-77
plugins/macosx/intf_vlc_wrapper.h
plugins/macosx/intf_vlc_wrapper.h
+3
-2
plugins/macosx/intf_vlc_wrapper.m
plugins/macosx/intf_vlc_wrapper.m
+39
-16
No files found.
ChangeLog
View file @
b60815ca
...
...
@@ -36,6 +36,7 @@ HEAD
0.4.1
Not released yet
* ./plugins/macosx: rewrote the net panel for OS X
* ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
which caused subtitles to appear slanted in odd width windows.
* ./plugins/gtk/gtk_display.c, ./plugins/win32/mainframe.cpp: we deactivate
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
View file @
b60815ca
...
...
@@ -41,8 +41,7 @@
openDiscTypeChanged = id;
openFile = id;
openNet = id;
openNetBroadcast = id;
openNetChannel = id;
openNetProtocol = id;
panelCancel = id;
panelOk = id;
};
...
...
@@ -54,17 +53,10 @@
o_disc_panel = id;
o_disc_title = id;
o_disc_type = id;
o_net_channel_addr = id;
o_net_channel_checkbox = id;
o_net_channel_port = id;
o_net_channel_port_label = id;
o_net_channel_pstepper = id;
o_net_panel = id;
o_net_protocol = id;
o_net_server_addr = id;
o_net_server_addr_label = id;
o_net_server_baddr = id;
o_net_server_bcheckbox = id;
o_net_server_port = id;
o_net_server_port_label = id;
o_net_server_pstepper = id;
...
...
plugins/macosx/intf_controller.m
View file @
b60815ca
...
...
@@ -2,7 +2,7 @@
* intf_controller.c: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_controller.m,v 1.
7 2002/06/02 12:16:31
massiot Exp $
* $Id: intf_controller.m,v 1.
8 2002/06/02 22:31:52
massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -248,13 +248,18 @@
-
(
BOOL
)
validateMenuItem
:(
id
)
sender
{
NSMenuItem
*
o_item
=
(
NSMenuItem
*
)
sender
;
int
tag
=
[
o_item
tag
];
if
(
[
o_item
tag
]
==
12
||
[
o_item
tag
]
==
13
)
if
(
tag
==
12
||
tag
==
13
)
{
if
(
!
config_GetIntVariable
(
"network-channel"
)
)
{
return
NO
;
}
if
(
tag
==
12
&&
!
p_main
->
p_intf
->
p_sys
->
i_channel
)
{
return
NO
;
}
}
return
YES
;
...
...
plugins/macosx/intf_open.h
View file @
b60815ca
...
...
@@ -2,7 +2,7 @@
* intf_open.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_open.h,v 1.
2 2002/05/06 22:59:46
massiot Exp $
* $Id: intf_open.h,v 1.
3 2002/06/02 22:31:52
massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
...
...
@@ -41,15 +41,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
IBOutlet
id
o_net_panel
;
IBOutlet
id
o_net_protocol
;
IBOutlet
id
o_net_channel_addr
;
IBOutlet
id
o_net_channel_checkbox
;
IBOutlet
id
o_net_channel_port
;
IBOutlet
id
o_net_channel_port_label
;
IBOutlet
id
o_net_channel_pstepper
;
IBOutlet
id
o_net_server_addr
;
IBOutlet
id
o_net_server_addr_label
;
IBOutlet
id
o_net_server_baddr
;
IBOutlet
id
o_net_server_bcheckbox
;
IBOutlet
id
o_net_server_port
;
IBOutlet
id
o_net_server_port_label
;
IBOutlet
id
o_net_server_pstepper
;
...
...
@@ -65,8 +58,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
-
(
IBAction
)
openFile
:(
id
)
sender
;
-
(
IBAction
)
openNet
:(
id
)
sender
;
-
(
IBAction
)
openNetBroadcast
:(
id
)
sender
;
-
(
IBAction
)
openNetChannel
:(
id
)
sender
;
-
(
IBAction
)
openNetProtocol
:(
id
)
sender
;
-
(
IBAction
)
panelCancel
:(
id
)
sender
;
-
(
IBAction
)
panelOk
:(
id
)
sender
;
...
...
plugins/macosx/intf_open.m
View file @
b60815ca
...
...
@@ -2,7 +2,7 @@
* intf_open.c: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_open.m,v 1.
3 2002/05/23 22:18:55 jlj
Exp $
* $Id: intf_open.m,v 1.
4 2002/06/02 22:31:52 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
...
...
@@ -139,18 +139,12 @@ static Intf_Open *o_open = nil;
-
(
void
)
awakeFromNib
{
[
o_net_channel_pstepper
setEnabled
:
FALSE
];
[
o_net_server_addr
addItemWithObjectValue
:
@"vls"
];
[
o_net_server_addr
selectItemAtIndex
:
0
];
[
o_net_server_baddr
setStringValue
:
@"138.195.159.255"
];
[
o_net_server_addr
setEnabled
:
NSOffState
];
[
o_net_server_addr_label
setStringValue
:
@"Address"
];
[
o_net_server_port
setEnabled
:
NSOnState
];
[
o_net_server_port
setIntValue
:
1234
];
[
o_net_server_pstepper
setEnabled
:
NSOnState
];
[
o_net_server_pstepper
setIntValue
:
[
o_net_server_port
intValue
]];
[
o_net_channel_addr
setStringValue
:
@"vlcs"
];
[
o_net_channel_port
setIntValue
:
6010
];
[
o_net_channel_pstepper
setIntValue
:
[
o_net_channel_port
intValue
]];
}
-
(
IBAction
)
openDisc
:(
id
)
sender
...
...
@@ -242,89 +236,70 @@ static Intf_Open *o_open = nil;
if
(
i_result
)
{
BOOL
b_channel
;
BOOL
b_broadcast
;
NSString
*
o_protocol
;
int
i_port
=
[
o_net_server_port
intValue
];
NSString
*
o_addr
=
[
o_net_server_addr
stringValue
];
o_protocol
=
[[
o_net_protocol
selectedCell
]
title
];
b_channel
=
[
o_net_channel_checkbox
state
]
==
NSOnState
;
b_broadcast
=
[
o_net_server_bcheckbox
state
]
==
NSOnState
;
if
(
[
o_protocol
isEqualToString
:
@"
TS
"
]
)
if
(
[
o_protocol
isEqualToString
:
@"
UDP
"
]
)
{
o_protocol
=
@"udpstream"
;
[[
Intf_VLCWrapper
instance
]
openNet
:
@""
port
:
i_port
];
}
else
if
(
[
o_protocol
isEqualToString
:
@"
RTP
"
]
)
else
if
(
[
o_protocol
isEqualToString
:
@"
UDP - multicast
"
]
)
{
o_protocol
=
@"rtp"
;
[[
Intf_VLCWrapper
instance
]
openNet
:
o_addr
port
:
i_port
];
}
if
(
b_channel
)
else
if
(
[
o_protocol
isEqualToString
:
@"Channel server"
]
)
{
NSString
*
o_channel_addr
=
[
o_net_channel_addr
stringValue
];
int
i_channel_port
=
[
o_net_channel_port
intValue
];
[[
Intf_VLCWrapper
instance
]
openNetChannel:
o_channel_addr
port
:
i_channel_port
];
[[
Intf_VLCWrapper
instance
]
openNetChannel
:
o_addr
port
:
i_port
];
}
else
else
if
(
[
o_protocol
isEqualToString
:
@"HTTP"
]
)
{
NSString
*
o_addr
=
[
o_net_server_addr
stringValue
];
int
i_port
=
[
o_net_server_port
intValue
];
if
(
b_broadcast
)
{
NSString
*
o_baddr
=
[
o_net_server_baddr
stringValue
];
[[
Intf_VLCWrapper
instance
]
openNet:
o_protocol
addr
:
o_addr
port:
i_port
baddr
:
o_baddr
];
}
else
{
[[
Intf_VLCWrapper
instance
]
openNet:
o_protocol
addr
:
o_addr
port:
i_port
baddr
:
nil
];
}
}
[[
Intf_VLCWrapper
instance
]
openNetHTTP
:
o_addr
];
}
}
}
-
(
IBAction
)
openNetBroadcast
:(
id
)
sender
{
BOOL
b_broadcast
;
b_broadcast
=
[
o_net_server_bcheckbox
state
]
==
NSOnState
;
[
o_net_server_baddr
setEnabled
:
b_broadcast
];
}
-
(
IBAction
)
openNetChannel
:(
id
)
sender
-
(
IBAction
)
openNetProtocol
:(
id
)
sender
{
BOOL
b_channel
;
BOOL
b_broadcast
;
NSColor
*
o_color
;
b_channel
=
[
o_net_channel_checkbox
state
]
==
NSOnState
;
b_broadcast
=
[
o_net_server_bcheckbox
state
]
==
NSOnState
;
o_color
=
b_channel
?
[
NSColor
controlTextColor
]
:
[
NSColor
disabledControlTextColor
];
NSString
*
o_protocol
;
[
o_net_channel_addr
setEnabled
:
b_channel
];
[
o_net_channel_port
setEnabled
:
b_channel
];
[
o_net_channel_port_label
setTextColor
:
o_color
];
[
o_net_channel_pstepper
setEnabled
:
b_channel
];
o_protocol
=
[[
o_net_protocol
selectedCell
]
title
];
o_color
=
!
b_channel
?
[
NSColor
controlTextColor
]
:
[
NSColor
disabledControlTextColor
];
[
o_net_server_addr
setEnabled
:
!
b_channel
];
[
o_net_server_addr_label
setTextColor
:
o_color
];
[
o_net_server_port
setEnabled
:
!
b_channel
];
[
o_net_server_port_label
setTextColor
:
o_color
];
[
o_net_server_pstepper
setEnabled
:
!
b_channel
];
[
o_net_server_bcheckbox
setEnabled
:
!
b_channel
];
[
o_net_server_baddr
setEnabled
:
b_broadcast
&&
!
b_channel
];
if
(
[
o_protocol
isEqualToString
:
@"UDP"
]
)
{
[
o_net_server_addr
setEnabled
:
NSOffState
];
[
o_net_server_port
setEnabled
:
NSOnState
];
[
o_net_server_port
setIntValue
:
1234
];
[
o_net_server_pstepper
setEnabled
:
NSOnState
];
}
else
if
(
[
o_protocol
isEqualToString
:
@"UDP - multicast"
]
)
{
[
o_net_server_addr
setEnabled
:
NSOnState
];
[
o_net_server_addr_label
setStringValue
:
@"Mult. addr."
];
[
o_net_server_port
setEnabled
:
NSOnState
];
[
o_net_server_port
setIntValue
:
1234
];
[
o_net_server_pstepper
setEnabled
:
NSOnState
];
}
else
if
(
[
o_protocol
isEqualToString
:
@"Channel server"
]
)
{
[
o_net_server_addr
setEnabled
:
NSOnState
];
[
o_net_server_addr_label
setStringValue
:
@"Server"
];
[
o_net_server_addr
setStringValue
:
@"vlcs"
];
[
o_net_server_port
setEnabled
:
NSOnState
];
[
o_net_server_port
setIntValue
:
6010
];
[
o_net_server_pstepper
setEnabled
:
NSOnState
];
}
else
if
(
[
o_protocol
isEqualToString
:
@"HTTP"
]
)
{
[
o_net_server_addr
setEnabled
:
NSOnState
];
[
o_net_server_addr_label
setStringValue
:
@"URL"
];
[
o_net_server_addr
setStringValue
:
@"http://"
];
[
o_net_server_port
setEnabled
:
NSOffState
];
[
o_net_server_pstepper
setEnabled
:
NSOffState
];
}
[
o_net_server_pstepper
setIntValue
:
[
o_net_server_port
intValue
]];
}
-
(
IBAction
)
panelCancel
:(
id
)
sender
...
...
plugins/macosx/intf_vlc_wrapper.h
View file @
b60815ca
...
...
@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.1
0 2002/06/02 12:16:31
massiot Exp $
* $Id: intf_vlc_wrapper.h,v 1.1
1 2002/06/02 22:31:52
massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -72,8 +72,9 @@
/* open file/disc/network */
-
(
void
)
openFiles
:(
NSArray
*
)
o_files
;
-
(
void
)
openDisc
:(
NSString
*
)
o_type
device
:(
NSString
*
)
o_device
title
:(
int
)
i_title
chapter
:(
int
)
i_chapter
;
-
(
void
)
openNet
:(
NSString
*
)
o_
protocol
addr
:(
NSString
*
)
o_addr
port
:(
int
)
i_port
baddr
:(
NSString
*
)
o_baddr
;
-
(
void
)
openNet
:(
NSString
*
)
o_
addr
port
:(
int
)
i_port
;
-
(
void
)
openNetChannel
:(
NSString
*
)
o_addr
port
:(
int
)
i_port
;
-
(
void
)
openNetHTTP
:(
NSString
*
)
o_addr
;
/* menus management */
-
(
void
)
toggleProgram
:(
id
)
sender
;
...
...
plugins/macosx/intf_vlc_wrapper.m
View file @
b60815ca
...
...
@@ -2,7 +2,7 @@
* intf_vlc_wrapper.c: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.m,v 1.1
1 2002/06/02 12:16:31
massiot Exp $
* $Id: intf_vlc_wrapper.m,v 1.1
2 2002/06/02 22:31:52
massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -578,7 +578,7 @@ static Intf_VLCWrapper *o_intf = nil;
}
}
-
(
void
)
openNet
:(
NSString
*
)
o_
protocol
addr
:(
NSString
*
)
o_addr
port
:(
int
)
i_port
baddr
:(
NSString
*
)
o_baddr
-
(
void
)
openNet
:(
NSString
*
)
o_
addr
port
:(
int
)
i_port
{
NSString
*
o_source
;
int
i_end
=
p_main
->
p_playlist
->
i_size
;
...
...
@@ -589,18 +589,10 @@ static Intf_VLCWrapper *o_intf = nil;
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
}
config_PutIntVariable
(
"network
_
channel"
,
0
);
config_PutIntVariable
(
"network
-
channel"
,
0
);
if
(
o_baddr
!=
nil
)
{
o_source
=
[
NSString
stringWithFormat
:
@"%@://%@@:%i/%@"
,
o_protocol
,
o_addr
,
i_port
,
o_baddr
];
}
else
{
o_source
=
[
NSString
stringWithFormat
:
@"%@://%@@:%i"
,
o_protocol
,
o_addr
,
i_port
];
}
o_source
=
[
NSString
stringWithFormat
:
@"udpstream:@%@:%i"
,
o_addr
,
i_port
];
if
(
p_intf
->
p_sys
->
b_loop
)
{
...
...
@@ -627,15 +619,46 @@ static Intf_VLCWrapper *o_intf = nil;
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
}
config_PutIntVariable
(
"network
_
channel"
,
1
);
config_PutIntVariable
(
"network
-
channel"
,
1
);
if
(
p_main
->
p_channel
==
NULL
)
{
network_ChannelCreate
();
}
config_PutPszVariable
(
"channel_server"
,
(
char
*
)[
o_addr
lossyCString
]
);
config_PutIntVariable
(
"channel_port"
,
i_port
);
config_PutPszVariable
(
"channel-server"
,
(
char
*
)[
o_addr
lossyCString
]
);
config_PutIntVariable
(
"channel-port"
,
i_port
);
}
-
(
void
)
openNetHTTP
:(
NSString
*
)
o_addr
{
NSString
*
o_source
;
int
i_end
=
p_main
->
p_playlist
->
i_size
;
intf_thread_t
*
p_intf
=
p_main
->
p_intf
;
if
(
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
{
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
}
config_PutIntVariable
(
"network-channel"
,
0
);
if
(
p_intf
->
p_sys
->
b_loop
)
{
intf_PlaylistDelete
(
p_main
->
p_playlist
,
p_main
->
p_playlist
->
i_size
-
1
);
}
intf_PlaylistAdd
(
p_main
->
p_playlist
,
PLAYLIST_END
,
[
o_addr
fileSystemRepresentation
]
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
if
(
p_intf
->
p_sys
->
b_loop
)
{
intf_PlaylistAdd
(
p_main
->
p_playlist
,
PLAYLIST_END
,
"vlc:loop"
);
}
}
-
(
void
)
toggleProgram
:(
id
)
sender
...
...
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