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
8917116d
Commit
8917116d
authored
Feb 10, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TS mux: reduce indentation
parent
c42b122e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
202 additions
and
216 deletions
+202
-216
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+202
-216
No files found.
modules/mux/mpeg/ts.c
View file @
8917116d
...
@@ -1271,30 +1271,22 @@ static int Mux( sout_mux_t *p_mux )
...
@@ -1271,30 +1271,22 @@ static int Mux( sout_mux_t *p_mux )
for
(;;)
for
(;;)
{
{
sout_buffer_chain_t
chain_ts
;
sout_buffer_chain_t
chain_ts
;
int
i_packet_count
;
mtime_t
i_shaping_delay
=
p_pcr_stream
->
b_key_frame
int
i_packet_pos
;
?
p_pcr_stream
->
i_pes_length
mtime_t
i_pcr_dts
;
:
p_sys
->
i_shaping_delay
;
mtime_t
i_pcr_length
;
mtime_t
i_shaping_delay
;
if
(
p_pcr_stream
->
b_key_frame
)
{
i_shaping_delay
=
p_pcr_stream
->
i_pes_length
;
}
else
{
i_shaping_delay
=
p_sys
->
i_shaping_delay
;
}
/* 1: get enough PES packet for all input */
for
(;;)
{
bool
b_ok
=
true
;
bool
b_ok
=
true
;
/* Accumulate enough data in the pcr stream (>i_shaping_delay) */
/* Accumulate enough data in the pcr stream (>i_shaping_delay) */
/* Accumulate enough data in all other stream ( >= length of pcr)*/
/* Accumulate enough data in all other stream ( >= length of pcr)*/
for
(
int
i
=
-
1
;
i
<
p_mux
->
i_nb_inputs
;
i
++
)
for
(
int
i
=
-
1
;
!
b_ok
||
i
<
p_mux
->
i_nb_inputs
;
i
++
)
{
{
if
(
i
==
p_mux
->
i_nb_inputs
)
{
/* get enough PES packet for all input */
b_ok
=
true
;
i
=
-
1
;
}
sout_input_t
*
p_input
;
sout_input_t
*
p_input
;
ts_stream_t
*
p_stream
;
ts_stream_t
*
p_stream
;
int64_t
i_spu_delay
=
0
;
int64_t
i_spu_delay
=
0
;
...
@@ -1514,20 +1506,14 @@ static int Mux( sout_mux_t *p_mux )
...
@@ -1514,20 +1506,14 @@ static int Mux( sout_mux_t *p_mux )
}
}
}
}
if
(
b_ok
)
{
break
;
}
}
/* save */
/* save */
i_pcr_dts
=
p_pcr_stream
->
i_pes_dts
;
mtime_t
i_pcr_dts
=
p_pcr_stream
->
i_pes_dts
;
i_pcr_length
=
p_pcr_stream
->
i_pes_length
;
mtime_t
i_pcr_length
=
p_pcr_stream
->
i_pes_length
;
p_pcr_stream
->
b_key_frame
=
0
;
p_pcr_stream
->
b_key_frame
=
0
;
/* msg_Dbg( p_mux, "starting muxing %lldms", i_pcr_length / 1000 ); */
/* msg_Dbg( p_mux, "starting muxing %lldms", i_pcr_length / 1000 ); */
/* 2: calculate non accurate total size of muxed ts */
/* 2: calculate non accurate total size of muxed ts */
i_packet_count
=
0
;
i
nt
i
_packet_count
=
0
;
for
(
int
i
=
0
;
i
<
p_mux
->
i_nb_inputs
;
i
++
)
for
(
int
i
=
0
;
i
<
p_mux
->
i_nb_inputs
;
i
++
)
{
{
ts_stream_t
*
p_stream
=
(
ts_stream_t
*
)
p_mux
->
pp_inputs
[
i
]
->
p_sys
;
ts_stream_t
*
p_stream
=
(
ts_stream_t
*
)
p_mux
->
pp_inputs
[
i
]
->
p_sys
;
...
@@ -1560,7 +1546,7 @@ static int Mux( sout_mux_t *p_mux )
...
@@ -1560,7 +1546,7 @@ static int Mux( sout_mux_t *p_mux )
/* append PAT/PMT -> FIXME with big pcr delay it won't have enough pat/pmt */
/* append PAT/PMT -> FIXME with big pcr delay it won't have enough pat/pmt */
GetPAT
(
p_mux
,
&
chain_ts
);
GetPAT
(
p_mux
,
&
chain_ts
);
GetPMT
(
p_mux
,
&
chain_ts
);
GetPMT
(
p_mux
,
&
chain_ts
);
i_packet_pos
=
0
;
i
nt
i
_packet_pos
=
0
;
i_packet_count
+=
chain_ts
.
i_depth
;
i_packet_count
+=
chain_ts
.
i_depth
;
/* msg_Dbg( p_mux, "estimated pck=%d", i_packet_count ); */
/* msg_Dbg( p_mux, "estimated pck=%d", i_packet_count ); */
...
...
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