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
696e01c8
Commit
696e01c8
authored
Oct 06, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg mux: remove useless references to p_sout
parent
d8249289
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
25 deletions
+17
-25
modules/mux/mpeg/pes.c
modules/mux/mpeg/pes.c
+2
-3
modules/mux/mpeg/pes.h
modules/mux/mpeg/pes.h
+1
-1
modules/mux/mpeg/ps.c
modules/mux/mpeg/ps.c
+1
-2
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+13
-19
No files found.
modules/mux/mpeg/pes.c
View file @
696e01c8
...
...
@@ -313,12 +313,11 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
* To allow unbounded PES packets in transport stream
* VIDEO_ES, set to INT_MAX.
*/
int
EStoPES
(
sout_instance_t
*
p_sout
,
block_t
**
pp_pes
,
block_t
*
p_es
,
int
EStoPES
(
block_t
**
pp_pes
,
block_t
*
p_es
,
es_format_t
*
p_fmt
,
int
i_stream_id
,
int
b_mpeg2
,
int
b_data_alignment
,
int
i_header_size
,
int
i_max_pes_size
)
{
VLC_UNUSED
(
p_sout
);
block_t
*
p_pes
;
mtime_t
i_pts
,
i_dts
,
i_length
;
...
...
@@ -407,7 +406,7 @@ int EStoPES ( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
}
else
{
p_pes
->
p_next
=
block_
New
(
p_sout
,
i_pes_header
+
i_pes_payload
);
p_pes
->
p_next
=
block_
Alloc
(
i_pes_header
+
i_pes_payload
);
p_pes
=
p_pes
->
p_next
;
p_pes
->
i_dts
=
0
;
...
...
modules/mux/mpeg/pes.h
View file @
696e01c8
...
...
@@ -35,7 +35,7 @@
#define PES_PAYLOAD_SIZE_MAX 65500
int
EStoPES
(
sout_instance_t
*
p_sout
,
block_t
**
pp_pes
,
block_t
*
p_es
,
int
EStoPES
(
block_t
**
pp_pes
,
block_t
*
p_es
,
es_format_t
*
p_fmt
,
int
i_stream_id
,
int
b_mpeg2
,
int
b_data_alignment
,
int
i_header_size
,
int
i_max_pes_size
);
modules/mux/mpeg/ps.c
View file @
696e01c8
...
...
@@ -511,8 +511,7 @@ static int Mux( sout_mux_t *p_mux )
/* Get and mux a packet */
p_data
=
block_FifoGet
(
p_input
->
p_fifo
);
EStoPES
(
p_mux
->
p_sout
,
&
p_data
,
p_data
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
EStoPES
(
&
p_data
,
p_data
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
p_sys
->
b_mpeg2
,
0
,
0
,
p_sys
->
i_pes_max_size
);
block_ChainAppend
(
&
p_ps
,
p_data
);
...
...
modules/mux/mpeg/ts.c
View file @
696e01c8
...
...
@@ -1331,7 +1331,7 @@ static bool MuxStreams(sout_mux_t *p_mux )
p_spu
->
p_buffer
[
1
]
=
1
;
p_spu
->
p_buffer
[
2
]
=
' '
;
EStoPES
(
p_mux
->
p_sout
,
&
p_spu
,
p_spu
,
p_input
->
p_fmt
,
EStoPES
(
&
p_spu
,
p_spu
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
1
,
0
,
0
,
0
);
p_data
->
p_next
=
p_spu
;
}
...
...
@@ -1377,8 +1377,7 @@ static bool MuxStreams(sout_mux_t *p_mux )
i_max_pes_size
=
INT_MAX
;
}
EStoPES
(
p_mux
->
p_sout
,
&
p_data
,
p_data
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
EStoPES
(
&
p_data
,
p_data
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
1
,
b_data_alignment
,
i_header_size
,
i_max_pes_size
);
...
...
@@ -1872,11 +1871,9 @@ static void TSSetPCR( block_t *p_ts, mtime_t i_dts )
p_ts
->
p_buffer
[
10
]
|=
(
i_pcr
<<
7
)
&
0x80
;
}
static
void
PEStoTS
(
sout_instance_t
*
p_sout
,
sout_buffer_chain_t
*
c
,
block_t
*
p_pes
,
static
void
PEStoTS
(
sout_buffer_chain_t
*
c
,
block_t
*
p_pes
,
ts_stream_t
*
p_stream
)
{
VLC_UNUSED
(
p_sout
);
/* get PES total size */
uint8_t
*
p_data
=
p_pes
->
p_buffer
;
int
i_size
=
p_pes
->
i_buffer
;
...
...
@@ -1898,7 +1895,7 @@ static void PEStoTS( sout_instance_t *p_sout,
int
i_copy
=
__MIN
(
i_size
,
184
);
bool
b_adaptation_field
=
i_size
<
184
;
block_t
*
p_ts
=
block_
New
(
p_sout
,
188
);
block_t
*
p_ts
=
block_
Alloc
(
188
);
p_ts
->
p_buffer
[
0
]
=
0x47
;
p_ts
->
p_buffer
[
1
]
=
(
b_new_pes
?
0x40
:
0x00
)
|
...
...
@@ -1953,10 +1950,8 @@ static void PEStoTS( sout_instance_t *p_sout,
}
}
static
block_t
*
WritePSISection
(
sout_instance_t
*
p_sout
,
dvbpsi_psi_section_t
*
p_section
)
static
block_t
*
WritePSISection
(
dvbpsi_psi_section_t
*
p_section
)
{
VLC_UNUSED
(
p_sout
);
block_t
*
p_psi
,
*
p_first
=
NULL
;
while
(
p_section
)
...
...
@@ -1964,7 +1959,7 @@ static block_t *WritePSISection( sout_instance_t *p_sout,
int
i_size
=
(
uint32_t
)(
p_section
->
p_payload_end
-
p_section
->
p_data
)
+
(
p_section
->
b_syntax_indicator
?
4
:
0
);
p_psi
=
block_
New
(
p_sout
,
i_size
+
1
);
p_psi
=
block_
Alloc
(
i_size
+
1
);
p_psi
->
i_pts
=
0
;
p_psi
->
i_dts
=
0
;
p_psi
->
i_length
=
0
;
...
...
@@ -2000,9 +1995,9 @@ static void GetPAT( sout_mux_t *p_mux,
p_section
=
dvbpsi_GenPATSections
(
&
pat
,
0
/* max program per section */
);
p_pat
=
WritePSISection
(
p_
mux
->
p_sout
,
p_
section
);
p_pat
=
WritePSISection
(
p_section
);
PEStoTS
(
p_mux
->
p_sout
,
c
,
p_pat
,
&
p_sys
->
pat
);
PEStoTS
(
c
,
p_pat
,
&
p_sys
->
pat
);
dvbpsi_DeletePSISections
(
p_section
);
dvbpsi_EmptyPAT
(
&
pat
);
...
...
@@ -2103,8 +2098,7 @@ static void GetPMTmpeg4(sout_mux_t *p_mux)
bits_write
(
&
bits
,
8
,
0x00
);
bits_write
(
&
bits
,
6
,
0x00
);
msg_Err
(
p_mux
->
p_sout
,
"Unsupported stream_type => "
"broken IOD"
);
msg_Err
(
p_mux
,
"Unsupported stream_type => broken IOD"
);
}
bits_write
(
&
bits
,
1
,
0x00
);
/* UpStream */
bits_write
(
&
bits
,
1
,
0x01
);
/* reserved */
...
...
@@ -2338,8 +2332,8 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
for
(
unsigned
i
=
0
;
i
<
p_sys
->
i_num_pmt
;
i
++
)
{
dvbpsi_psi_section_t
*
sect
=
dvbpsi_GenPMTSections
(
&
p_sys
->
dvbpmt
[
i
]
);
block_t
*
pmt
=
WritePSISection
(
p_mux
->
p_sout
,
sect
);
PEStoTS
(
p_mux
->
p_sout
,
c
,
pmt
,
&
p_sys
->
pmt
[
i
]
);
block_t
*
pmt
=
WritePSISection
(
sect
);
PEStoTS
(
c
,
pmt
,
&
p_sys
->
pmt
[
i
]
);
dvbpsi_DeletePSISections
(
sect
);
dvbpsi_EmptyPMT
(
&
p_sys
->
dvbpmt
[
i
]
);
}
...
...
@@ -2347,8 +2341,8 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
if
(
p_sys
->
b_sdt
)
{
dvbpsi_psi_section_t
*
sect
=
dvbpsi_GenSDTSections
(
&
sdt
);
block_t
*
p_sdt
=
WritePSISection
(
p_mux
->
p_sout
,
sect
);
PEStoTS
(
p_mux
->
p_sout
,
c
,
p_sdt
,
&
p_sys
->
sdt
);
block_t
*
p_sdt
=
WritePSISection
(
sect
);
PEStoTS
(
c
,
p_sdt
,
&
p_sys
->
sdt
);
dvbpsi_DeletePSISections
(
sect
);
dvbpsi_EmptySDT
(
&
sdt
);
}
...
...
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