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
694d473d
Commit
694d473d
authored
Jan 20, 2000
by
Vincent Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Timeout pour les changements de vlan
parent
92c69994
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
include/config.h
include/config.h
+4
-0
src/input/input_vlan.c
src/input/input_vlan.c
+25
-5
No files found.
include/config.h
View file @
694d473d
...
...
@@ -211,6 +211,10 @@
#define INPUT_VLAN_PORT_VAR "vlc_vlan_port"
#define INPUT_VLAN_PORT_DEFAULT 6010
/* Delay between vlan changes - this is required to avoid flooding the VLAN
* server */
#define INPUT_VLAN_CHANGE_DELAY 5000000
/*******************************************************************************
* Audio configuration
*******************************************************************************/
...
...
src/input/input_vlan.c
View file @
694d473d
...
...
@@ -34,7 +34,8 @@
*******************************************************************************/
typedef
struct
input_vlan_s
{
int
i_dummy
;
int
i_vlan_id
;
/* current vlan number */
mtime_t
last_change
;
/* last change date */
}
input_vlan_t
;
/*******************************************************************************
...
...
@@ -59,6 +60,10 @@ int input_VlanCreate( void )
return
(
1
);
}
/* Initialize structure */
p_main
->
p_vlan
->
i_vlan_id
=
0
;
p_main
->
p_vlan
->
last_change
=
0
;
intf_Msg
(
"VLANs initialized
\n
"
);
return
(
0
);
}
...
...
@@ -71,6 +76,12 @@ int input_VlanCreate( void )
*******************************************************************************/
void
input_VlanDestroy
(
void
)
{
/* Return to default vlan */
if
(
p_main
->
p_vlan
->
i_vlan_id
!=
0
)
{
input_VlanJoin
(
0
);
}
/* Free structure */
free
(
p_main
->
p_vlan
);
}
...
...
@@ -88,7 +99,16 @@ void input_VlanDestroy( void )
*******************************************************************************/
int
input_VlanJoin
(
int
i_vlan_id
)
{
intf_Msg
(
"Joining VLAN %d (channel %d)
\n
"
,
i_vlan_id
+
2
,
i_vlan_id
);
/* If last change is too recent, wait a while */
if
(
mdate
()
-
p_main
->
p_vlan
->
last_change
<
INPUT_VLAN_CHANGE_DELAY
)
{
intf_Msg
(
"Waiting before changing VLAN...
\n
"
);
mwait
(
p_main
->
p_vlan
->
last_change
+
INPUT_VLAN_CHANGE_DELAY
);
}
p_main
->
p_vlan
->
last_change
=
mdate
();
p_main
->
p_vlan
->
i_vlan_id
=
i_vlan_id
;
intf_Msg
(
"Joining VLAN %d (channel %d)
\n
"
,
i_vlan_id
+
2
,
i_vlan_id
);
return
(
ZeTrucMucheFunction
(
i_vlan_id
)
);
// ?? join vlan
}
...
...
@@ -100,8 +120,7 @@ int input_VlanJoin( int i_vlan_id )
*******************************************************************************/
void
input_VlanLeave
(
int
i_vlan_id
)
{
intf_Msg
(
"Leaving VLAN %d (channel %d)
\n
"
,
i_vlan_id
+
2
,
i_vlan_id
);
ZeTrucMucheFunction
(
0
);
// ?? join default vlan
// ??
}
/* following functions are local */
...
...
@@ -115,7 +134,8 @@ static int ZeTrucMucheFunction( int Channel)
struct
sockaddr_in
sa_client
;
char
mess
[
80
];
return
(
0
);
/*
*Looking for informations about the eth0 interface
*/
...
...
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