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
72b30654
Commit
72b30654
authored
Feb 10, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export src/dst addr/port from UDP access output
parent
d83a78ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
modules/access_output/udp.c
modules/access_output/udp.c
+23
-1
No files found.
modules/access_output/udp.c
View file @
72b30654
...
@@ -252,12 +252,18 @@ static int Open( vlc_object_t *p_this )
...
@@ -252,12 +252,18 @@ static int Open( vlc_object_t *p_this )
i_dst_port
=
DEFAULT_PORT
;
i_dst_port
=
DEFAULT_PORT
;
}
}
if
(
var_Create
(
p_access
,
"dst-port"
,
VLC_VAR_INTEGER
)
||
var_Create
(
p_access
,
"src-port"
,
VLC_VAR_INTEGER
)
||
var_Create
(
p_access
,
"dst-addr"
,
VLC_VAR_STRING
)
||
var_Create
(
p_access
,
"src-addr"
,
VLC_VAR_STRING
))
return
VLC_ENOMEM
;
p_sys
->
p_thread
=
p_sys
->
p_thread
=
vlc_object_create
(
p_access
,
sizeof
(
sout_access_thread_t
)
);
vlc_object_create
(
p_access
,
sizeof
(
sout_access_thread_t
)
);
if
(
!
p_sys
->
p_thread
)
if
(
!
p_sys
->
p_thread
)
{
{
msg_Err
(
p_access
,
"out of memory"
);
msg_Err
(
p_access
,
"out of memory"
);
return
VLC_E
GENERIC
;
return
VLC_E
NOMEM
;
}
}
vlc_object_attach
(
p_sys
->
p_thread
,
p_access
);
vlc_object_attach
(
p_sys
->
p_thread
,
p_access
);
...
@@ -273,7 +279,23 @@ static int Open( vlc_object_t *p_this )
...
@@ -273,7 +279,23 @@ static int Open( vlc_object_t *p_this )
msg_Err
(
p_access
,
"failed to create %s socket"
,
protoname
);
msg_Err
(
p_access
,
"failed to create %s socket"
,
protoname
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
else
{
char
addr
[
NI_MAXNUMERICHOST
];
int
port
;
if
(
net_GetSockAddress
(
i_handle
,
addr
,
&
port
)
==
0
)
{
var_SetString
(
p_access
,
"src-addr"
,
addr
);
var_SetInteger
(
p_access
,
"src-port"
,
port
);
}
if
(
net_GetPeerAddress
(
i_handle
,
addr
,
&
port
)
==
0
)
{
var_SetString
(
p_access
,
"dst-addr"
,
addr
);
var_SetInteger
(
p_access
,
"dst-port"
,
port
);
}
}
p_sys
->
p_thread
->
i_handle
=
i_handle
;
p_sys
->
p_thread
->
i_handle
=
i_handle
;
net_StopRecv
(
i_handle
);
net_StopRecv
(
i_handle
);
...
...
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