Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
dd4e4a5e
Commit
dd4e4a5e
authored
Feb 28, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use our endianism macros
parent
a3311dd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
modules/stream_out/rtpfmt.c
modules/stream_out/rtpfmt.c
+6
-13
No files found.
modules/stream_out/rtpfmt.c
View file @
dd4e4a5e
...
...
@@ -55,11 +55,9 @@ int rtp_packetize_mpa( sout_stream_id_t *id,
/* rtp common header */
rtp_packetize_common
(
id
,
out
,
(
i
==
i_count
-
1
)
?
1
:
0
,
in
->
i_pts
);
/* mbz set to 0 */
out
->
p_buffer
[
12
]
=
0
;
out
->
p_buffer
[
13
]
=
0
;
SetWBE
(
out
->
p_buffer
+
12
,
0
);
/* fragment offset in the current frame */
out
->
p_buffer
[
14
]
=
(
(
i
*
i_max
)
>>
8
)
&
0xff
;
out
->
p_buffer
[
15
]
=
(
(
i
*
i_max
)
)
&
0xff
;
SetWBE
(
out
->
p_buffer
+
14
,
i
*
i_max
);
memcpy
(
&
out
->
p_buffer
[
16
],
p_data
,
i_payload
);
out
->
i_buffer
=
16
+
i_payload
;
...
...
@@ -145,6 +143,7 @@ int rtp_packetize_mpv( sout_stream_id_t *id, block_t *in )
{
int
i_payload
=
__MIN
(
i_max
,
i_data
);
block_t
*
out
=
block_Alloc
(
16
+
i_payload
);
/* MBZ:5 T:1 TR:10 AN:1 N:1 S:1 B:1 E:1 P:3 FBV:1 BFC:3 FFV:1 FFC:3 */
uint32_t
h
=
(
i_temporal_ref
<<
16
)
|
(
b_sequence_start
<<
13
)
|
(
b_start_slice
<<
12
)
|
...
...
@@ -156,11 +155,7 @@ int rtp_packetize_mpv( sout_stream_id_t *id, block_t *in )
rtp_packetize_common
(
id
,
out
,
(
i
==
i_count
-
1
)
?
1
:
0
,
in
->
i_pts
>
0
?
in
->
i_pts
:
in
->
i_dts
);
/* MBZ:5 T:1 TR:10 AN:1 N:1 S:1 B:1 E:1 P:3 FBV:1 BFC:3 FFV:1 FFC:3 */
out
->
p_buffer
[
12
]
=
(
h
>>
24
)
&
0xff
;
out
->
p_buffer
[
13
]
=
(
h
>>
16
)
&
0xff
;
out
->
p_buffer
[
14
]
=
(
h
>>
8
)
&
0xff
;
out
->
p_buffer
[
15
]
=
(
h
)
&
0xff
;
SetDWBE
(
out
->
p_buffer
+
12
,
h
);
memcpy
(
&
out
->
p_buffer
[
16
],
p_data
,
i_payload
);
...
...
@@ -320,8 +315,7 @@ int rtp_packetize_mp4a( sout_stream_id_t *id, block_t *in )
out
->
p_buffer
[
12
]
=
0
;
out
->
p_buffer
[
13
]
=
2
*
8
;
/* for each AU length 13 bits + idx 3bits, */
out
->
p_buffer
[
14
]
=
(
in
->
i_buffer
>>
5
)
&
0xff
;
out
->
p_buffer
[
15
]
=
(
(
in
->
i_buffer
&
0xff
)
<<
3
)
|
0
;
SetWBE
(
out
->
p_buffer
+
14
,
(
in
->
i_buffer
<<
3
)
|
0
);
memcpy
(
&
out
->
p_buffer
[
16
],
p_data
,
i_payload
);
...
...
@@ -384,8 +378,7 @@ int rtp_packetize_h263( sout_stream_id_t *id, block_t *in )
in
->
i_pts
>
0
?
in
->
i_pts
:
in
->
i_dts
);
/* h263 header */
out
->
p_buffer
[
12
]
=
(
h
>>
8
)
&
0xff
;
out
->
p_buffer
[
13
]
=
(
h
)
&
0xff
;
SetWBE
(
out
->
p_buffer
+
12
,
h
);
memcpy
(
&
out
->
p_buffer
[
RTP_H263_PAYLOAD_START
],
p_data
,
i_payload
);
out
->
i_buffer
=
RTP_H263_PAYLOAD_START
+
i_payload
;
...
...
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