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
4fa484f5
Commit
4fa484f5
authored
Jun 11, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless stream parameter
parent
baf568bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
41 deletions
+27
-41
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+2
-3
modules/stream_out/rtp.h
modules/stream_out/rtp.h
+11
-11
modules/stream_out/rtpfmt.c
modules/stream_out/rtpfmt.c
+14
-27
No files found.
modules/stream_out/rtp.c
View file @
4fa484f5
...
@@ -271,8 +271,7 @@ struct sout_stream_sys_t
...
@@ -271,8 +271,7 @@ struct sout_stream_sys_t
sout_stream_id_t
**
es
;
sout_stream_id_t
**
es
;
};
};
typedef
int
(
*
pf_rtp_packetizer_t
)(
sout_stream_t
*
,
sout_stream_id_t
*
,
typedef
int
(
*
pf_rtp_packetizer_t
)(
sout_stream_id_t
*
,
block_t
*
);
block_t
*
);
typedef
struct
rtp_sink_t
typedef
struct
rtp_sink_t
{
{
...
@@ -1274,7 +1273,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -1274,7 +1273,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
while
(
p_buffer
!=
NULL
)
while
(
p_buffer
!=
NULL
)
{
{
p_next
=
p_buffer
->
p_next
;
p_next
=
p_buffer
->
p_next
;
if
(
id
->
pf_packetize
(
p_stream
,
id
,
p_buffer
)
)
if
(
id
->
pf_packetize
(
id
,
p_buffer
)
)
break
;
break
;
block_Release
(
p_buffer
);
block_Release
(
p_buffer
);
...
...
modules/stream_out/rtp.h
View file @
4fa484f5
...
@@ -47,17 +47,17 @@ void rtp_packetize_common (sout_stream_id_t *id, block_t *out,
...
@@ -47,17 +47,17 @@ void rtp_packetize_common (sout_stream_id_t *id, block_t *out,
void
rtp_packetize_send
(
sout_stream_id_t
*
id
,
block_t
*
out
);
void
rtp_packetize_send
(
sout_stream_id_t
*
id
,
block_t
*
out
);
size_t
rtp_mtu
(
const
sout_stream_id_t
*
id
);
size_t
rtp_mtu
(
const
sout_stream_id_t
*
id
);
int
rtp_packetize_mpa
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_mpa
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_mpv
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_mpv
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_ac3
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_ac3
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_split
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_split
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_mp4a
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_mp4a
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_mp4a_latm
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_mp4a_latm
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_h263
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_h263
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_h264
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_h264
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_amr
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_amr
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_spx
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_spx
(
sout_stream_id_t
*
,
block_t
*
);
int
rtp_packetize_t140
(
sout_stream_
t
*
,
sout_stream_
id_t
*
,
block_t
*
);
int
rtp_packetize_t140
(
sout_stream_id_t
*
,
block_t
*
);
/* RTCP */
/* RTCP */
typedef
struct
rtcp_sender_t
rtcp_sender_t
;
typedef
struct
rtcp_sender_t
rtcp_sender_t
;
...
...
modules/stream_out/rtpfmt.c
View file @
4fa484f5
...
@@ -33,11 +33,11 @@
...
@@ -33,11 +33,11 @@
#include "rtp.h"
#include "rtp.h"
int
int
rtp_packetize_h264_nal
(
sout_stream_
t
*
p_stream
,
sout_stream_
id_t
*
id
,
rtp_packetize_h264_nal
(
sout_stream_id_t
*
id
,
const
uint8_t
*
p_data
,
int
i_data
,
int64_t
i_pts
,
const
uint8_t
*
p_data
,
int
i_data
,
int64_t
i_pts
,
int64_t
i_dts
,
bool
b_last
,
int64_t
i_length
);
int64_t
i_dts
,
bool
b_last
,
int64_t
i_length
);
int
rtp_packetize_mpa
(
sout_stream_
t
*
p_stream
,
sout_stream_
id_t
*
id
,
int
rtp_packetize_mpa
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
...
@@ -76,8 +76,7 @@ int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -76,8 +76,7 @@ int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
}
}
/* rfc2250 */
/* rfc2250 */
int
rtp_packetize_mpv
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_mpv
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
...
@@ -178,8 +177,7 @@ int rtp_packetize_mpv( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -178,8 +177,7 @@ int rtp_packetize_mpv( sout_stream_t *p_stream, sout_stream_id_t *id,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
rtp_packetize_ac3
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_ac3
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
...
@@ -215,8 +213,7 @@ int rtp_packetize_ac3( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -215,8 +213,7 @@ int rtp_packetize_ac3( sout_stream_t *p_stream, sout_stream_id_t *id,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
rtp_packetize_split
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_split
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
);
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
);
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
...
@@ -249,8 +246,7 @@ int rtp_packetize_split( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -249,8 +246,7 @@ int rtp_packetize_split( sout_stream_t *p_stream, sout_stream_id_t *id,
}
}
/* rfc3016 */
/* rfc3016 */
int
rtp_packetize_mp4a_latm
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_mp4a_latm
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
latmhdrsize
=
in
->
i_buffer
/
0xff
+
1
;
int
latmhdrsize
=
in
->
i_buffer
/
0xff
+
1
;
...
@@ -302,8 +298,7 @@ int rtp_packetize_mp4a_latm( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -302,8 +298,7 @@ int rtp_packetize_mp4a_latm( sout_stream_t *p_stream, sout_stream_id_t *id,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
rtp_packetize_mp4a
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_mp4a
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
...
@@ -347,8 +342,7 @@ int rtp_packetize_mp4a( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -347,8 +342,7 @@ int rtp_packetize_mp4a( sout_stream_t *p_stream, sout_stream_id_t *id,
/* rfc2429 */
/* rfc2429 */
#define RTP_H263_HEADER_SIZE (2) // plen = 0
#define RTP_H263_HEADER_SIZE (2) // plen = 0
#define RTP_H263_PAYLOAD_START (14) // plen = 0
#define RTP_H263_PAYLOAD_START (14) // plen = 0
int
rtp_packetize_h263
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_h263
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
uint8_t
*
p_data
=
in
->
p_buffer
;
uint8_t
*
p_data
=
in
->
p_buffer
;
int
i_data
=
in
->
i_buffer
;
int
i_data
=
in
->
i_buffer
;
...
@@ -409,7 +403,7 @@ int rtp_packetize_h263( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -409,7 +403,7 @@ int rtp_packetize_h263( sout_stream_t *p_stream, sout_stream_id_t *id,
/* rfc3984 */
/* rfc3984 */
int
int
rtp_packetize_h264_nal
(
sout_stream_
t
*
p_stream
,
sout_stream_
id_t
*
id
,
rtp_packetize_h264_nal
(
sout_stream_id_t
*
id
,
const
uint8_t
*
p_data
,
int
i_data
,
int64_t
i_pts
,
const
uint8_t
*
p_data
,
int
i_data
,
int64_t
i_pts
,
int64_t
i_dts
,
bool
b_last
,
int64_t
i_length
)
int64_t
i_dts
,
bool
b_last
,
int64_t
i_length
)
{
{
...
@@ -478,8 +472,7 @@ rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -478,8 +472,7 @@ rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
rtp_packetize_h264
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_h264
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
const
uint8_t
*
p_buffer
=
in
->
p_buffer
;
const
uint8_t
*
p_buffer
=
in
->
p_buffer
;
int
i_buffer
=
in
->
i_buffer
;
int
i_buffer
=
in
->
i_buffer
;
...
@@ -509,7 +502,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -509,7 +502,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
}
}
}
}
/* TODO add STAP-A to remove a lot of overhead with small slice/sei/... */
/* TODO add STAP-A to remove a lot of overhead with small slice/sei/... */
rtp_packetize_h264_nal
(
p_stream
,
id
,
p_buffer
,
i_size
,
rtp_packetize_h264_nal
(
id
,
p_buffer
,
i_size
,
(
in
->
i_pts
>
0
?
in
->
i_pts
:
in
->
i_dts
),
in
->
i_dts
,
(
in
->
i_pts
>
0
?
in
->
i_pts
:
in
->
i_dts
),
in
->
i_dts
,
(
i_size
>=
i_buffer
),
in
->
i_length
*
i_size
/
in
->
i_buffer
);
(
i_size
>=
i_buffer
),
in
->
i_length
*
i_size
/
in
->
i_buffer
);
...
@@ -519,8 +512,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -519,8 +512,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
rtp_packetize_amr
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_amr
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
...
@@ -558,8 +550,7 @@ int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -558,8 +550,7 @@ int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
int
rtp_packetize_t140
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_t140
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
const
size_t
i_max
=
rtp_mtu
(
id
);
const
size_t
i_max
=
rtp_mtu
(
id
);
const
uint8_t
*
p_data
=
in
->
p_buffer
;
const
uint8_t
*
p_data
=
in
->
p_buffer
;
...
@@ -605,8 +596,7 @@ int rtp_packetize_t140( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -605,8 +596,7 @@ int rtp_packetize_t140( sout_stream_t *p_stream, sout_stream_id_t *id,
}
}
int
rtp_packetize_spx
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
int
rtp_packetize_spx
(
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
uint8_t
*
p_buffer
=
in
->
p_buffer
;
uint8_t
*
p_buffer
=
in
->
p_buffer
;
int
i_data_size
,
i_payload_size
,
i_payload_padding
;
int
i_data_size
,
i_payload_size
,
i_payload_padding
;
...
@@ -615,10 +605,7 @@ int rtp_packetize_spx( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -615,10 +605,7 @@ int rtp_packetize_spx( sout_stream_t *p_stream, sout_stream_id_t *id,
block_t
*
p_out
;
block_t
*
p_out
;
if
(
in
->
i_buffer
>
rtp_mtu
(
id
)
)
if
(
in
->
i_buffer
>
rtp_mtu
(
id
)
)
{
msg_Warn
(
p_stream
,
"Cannot send packet larger than output MTU"
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
/*
/*
RFC for Speex in RTP says that each packet must end on an octet
RFC for Speex in RTP says that each packet must end on an octet
...
...
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