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
31456021
Commit
31456021
authored
Feb 10, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force RTP for UDP-Lite, as we have no legacy issue (suggestion from Md)
parent
97577c7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
22 deletions
+19
-22
modules/access/udp.c
modules/access/udp.c
+5
-8
modules/access_output/udp.c
modules/access_output/udp.c
+14
-14
No files found.
modules/access/udp.c
View file @
31456021
...
...
@@ -95,7 +95,6 @@ vlc_module_begin();
add_shortcut
(
"rtp4"
);
add_shortcut
(
"rtp6"
);
add_shortcut
(
"udplite"
);
add_shortcut
(
"rtplite"
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -136,7 +135,7 @@ static int Open( vlc_object_t *p_this )
char
*
psz_parser
;
const
char
*
psz_server_addr
,
*
psz_bind_addr
=
""
;
int
i_bind_port
,
i_server_port
=
0
;
int
fam
=
AF_UNSPEC
,
proto
=
IPPROTO_UDP
,
cscov
=
8
;
int
fam
=
AF_UNSPEC
,
proto
=
IPPROTO_UDP
;
if
(
strlen
(
p_access
->
psz_access
)
>=
3
)
{
...
...
@@ -152,11 +151,7 @@ static int Open( vlc_object_t *p_this )
}
if
(
strcmp
(
p_access
->
psz_access
+
3
,
"lite"
)
==
0
)
proto
=
IPPROTO_UDPLITE
;
}
if
(
strncmp
(
p_access
->
psz_access
,
"rtp"
,
3
)
==
0
)
/* Checksum coverage: RTP header is AT LEAST 12 bytes
* in addition to UDP header (8 bytes) */
cscov
+=
12
;
}
i_bind_port
=
var_CreateGetInteger
(
p_access
,
"server-port"
);
...
...
@@ -222,7 +217,9 @@ static int Open( vlc_object_t *p_this )
#ifdef UDPLITE_RECV_CSCOV
if
(
proto
==
IPPROTO_UDPLITE
)
setsockopt
(
p_sys
->
fd
,
SOL_UDPLITE
,
UDPLITE_RECV_CSCOV
,
&
cscov
,
sizeof
(
cscov
));
/* UDP header: 8 bytes + RTP header: 12 bytes (or more) */
setsockopt
(
p_sys
->
fd
,
SOL_UDPLITE
,
UDPLITE_RECV_CSCOV
,
&
(
int
){
20
},
sizeof
(
int
));
#endif
/* FIXME */
...
...
modules/access_output/udp.c
View file @
31456021
...
...
@@ -117,7 +117,6 @@ vlc_module_begin();
add_shortcut
(
"udp"
);
add_shortcut
(
"rtp"
);
// Will work only with ts muxer
add_shortcut
(
"udplite"
);
add_shortcut
(
"rtplite"
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -205,25 +204,26 @@ static int Open( vlc_object_t *p_this )
config_ChainParse
(
p_access
,
""
,
ppsz_core_options
,
p_access
->
p_cfg
);
if
(
!
(
p_sys
=
malloc
(
sizeof
(
sout_access_out_sys_t
)
)
)
)
if
(
!
(
p_sys
=
calloc
(
1
,
sizeof
(
sout_access_out_sys_t
)
)
)
)
{
msg_Err
(
p_access
,
"not enough memory"
);
return
VLC_EGENERIC
;
}
memset
(
p_sys
,
0
,
sizeof
(
sout_access_out_sys_t
)
);
p_access
->
p_sys
=
p_sys
;
if
(
p_access
->
psz_access
!=
NULL
)
{
if
(
strncmp
(
p_access
->
psz_access
,
"rtp"
,
3
)
==
0
)
if
(
strcmp
(
p_access
->
psz_access
,
"rtp"
)
==
0
)
p_sys
->
b_rtpts
=
VLC_TRUE
;
if
(
strcmp
(
p_access
->
psz_access
,
"udplite"
)
==
0
)
{
p_sys
->
b_rtpts
=
1
;
cscov
+=
RTP_HEADER_LENGTH
;
}
if
((
strlen
(
p_access
->
psz_access
)
>=
3
)
&&
(
strcmp
(
p_access
->
psz_access
+
3
,
"lite"
)
==
0
))
protoname
=
"UDP-Lite"
;
proto
=
IPPROTO_UDPLITE
;
p_sys
->
b_rtpts
=
VLC_TRUE
;
}
}
if
(
p_sys
->
b_rtpts
)
cscov
+=
RTP_HEADER_LENGTH
;
psz_parser
=
strdup
(
p_access
->
psz_name
);
...
...
@@ -270,7 +270,7 @@ static int Open( vlc_object_t *p_this )
i_handle
=
net_ConnectDgram
(
p_this
,
psz_dst_addr
,
i_dst_port
,
-
1
,
proto
);
if
(
i_handle
==
-
1
)
{
msg_Err
(
p_access
,
"failed to create
UDP socket"
);
msg_Err
(
p_access
,
"failed to create
%s socket"
,
protoname
);
return
VLC_EGENERIC
;
}
...
...
@@ -310,8 +310,8 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_seek
=
Seek
;
msg_Dbg
(
p_access
,
"
udp
access output opened(%s:%d)"
,
psz_dst_addr
,
i_dst_port
);
msg_Dbg
(
p_access
,
"
%s
access output opened(%s:%d)"
,
p
rotoname
,
p
sz_dst_addr
,
i_dst_port
);
free
(
psz_dst_addr
);
...
...
@@ -354,7 +354,7 @@ static void Close( vlc_object_t * p_this )
/* update p_sout->i_out_pace_nocontrol */
p_access
->
p_sout
->
i_out_pace_nocontrol
--
;
msg_Dbg
(
p_access
,
"
udp
access output closed"
);
msg_Dbg
(
p_access
,
"
UDP
access output closed"
);
free
(
p_sys
);
}
...
...
@@ -383,7 +383,7 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
{
if
(
p_sys
->
p_buffer
->
i_dts
+
p_sys
->
p_thread
->
i_caching
<
mdate
()
)
{
msg_Dbg
(
p_access
,
"late packet for
udp
input ("
I64Fd
")"
,
msg_Dbg
(
p_access
,
"late packet for
UDP
input ("
I64Fd
")"
,
mdate
()
-
p_sys
->
p_buffer
->
i_dts
-
p_sys
->
p_thread
->
i_caching
);
}
...
...
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