Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
393c3c57
Commit
393c3c57
authored
Apr 18, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/mux/mpeg/*: new --sout-ps-pes-max-size option.
parent
ac70d6fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
9 deletions
+23
-9
modules/mux/mpeg/pes.c
modules/mux/mpeg/pes.c
+4
-4
modules/mux/mpeg/pes.h
modules/mux/mpeg/pes.h
+4
-1
modules/mux/mpeg/ps.c
modules/mux/mpeg/ps.c
+13
-2
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+2
-2
No files found.
modules/mux/mpeg/pes.c
View file @
393c3c57
...
...
@@ -44,8 +44,6 @@
#include "pes.h"
#include "bits.h"
#define PES_PAYLOAD_SIZE_MAX 65500
static
inline
int
PESHeader
(
uint8_t
*
p_hdr
,
mtime_t
i_pts
,
mtime_t
i_dts
,
int
i_es_size
,
es_format_t
*
p_fmt
,
int
i_stream_id
,
int
i_private_id
,
...
...
@@ -233,7 +231,8 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
int
E_
(
EStoPES
)(
sout_instance_t
*
p_sout
,
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
b_mpeg2
,
int
b_data_alignment
,
int
i_header_size
,
int
i_max_pes_size
)
{
block_t
*
p_pes
;
mtime_t
i_pts
,
i_dts
,
i_length
;
...
...
@@ -266,7 +265,8 @@ int E_( EStoPES )( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
do
{
i_pes_payload
=
__MIN
(
i_size
,
PES_PAYLOAD_SIZE_MAX
);
i_pes_payload
=
__MIN
(
i_size
,
(
i_max_pes_size
?
i_max_pes_size
:
PES_PAYLOAD_SIZE_MAX
)
);
i_pes_header
=
PESHeader
(
header
,
i_pts
,
i_dts
,
i_pes_payload
,
p_fmt
,
i_stream_id
,
i_private_id
,
b_mpeg2
,
b_data_alignment
,
i_header_size
);
...
...
modules/mux/mpeg/pes.h
View file @
393c3c57
...
...
@@ -32,6 +32,9 @@
#define PES_DSMCC_STREAM 0xf2
#define PES_ITU_T_H222_1_TYPE_E_STREAM 0xf8
#define PES_PAYLOAD_SIZE_MAX 65500
int
E_
(
EStoPES
)(
sout_instance_t
*
p_sout
,
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
b_mpeg2
,
int
b_data_alignment
,
int
i_header_size
,
int
i_max_pes_size
);
modules/mux/mpeg/ps.c
View file @
393c3c57
...
...
@@ -48,6 +48,10 @@
"stream, compared to the SCRs. This allows for some buffering inside " \
"the client decoder.")
#define PES_SIZE_TEXT N_("PES maximum size")
#define PES_SIZE_LONGTEXT N_("This option will set the maximum allowed PES "\
"size when producing the MPEG PS stream.")
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
...
@@ -66,6 +70,8 @@ vlc_module_begin();
add_integer
(
SOUT_CFG_PREFIX
"dts-delay"
,
200
,
NULL
,
DTS_TEXT
,
DTS_LONGTEXT
,
VLC_TRUE
);
add_integer
(
SOUT_CFG_PREFIX
"pes-max-size"
,
PES_PAYLOAD_SIZE_MAX
,
NULL
,
PES_SIZE_TEXT
,
PES_SIZE_LONGTEXT
,
VLC_TRUE
);
vlc_module_end
();
/*****************************************************************************
...
...
@@ -123,12 +129,14 @@ struct sout_mux_sys_t
vlc_bool_t
b_mpeg2
;
int
i_pes_max_size
;
int
i_psm_version
;
uint32_t
crc32_table
[
256
];
};
static
const
char
*
ppsz_sout_options
[]
=
{
"dts-delay"
,
NULL
"dts-delay"
,
"pes-max-size"
,
NULL
};
/*****************************************************************************
...
...
@@ -173,6 +181,9 @@ static int Open( vlc_object_t *p_this )
var_Get
(
p_mux
,
SOUT_CFG_PREFIX
"dts-delay"
,
&
val
);
p_sys
->
i_dts_delay
=
(
int64_t
)
val
.
i_int
*
1000
;
var_Get
(
p_mux
,
SOUT_CFG_PREFIX
"pes-max-size"
,
&
val
);
p_sys
->
i_pes_max_size
=
(
int64_t
)
val
.
i_int
;
/* Initialise CRC32 table */
if
(
p_sys
->
b_mpeg2
)
{
...
...
@@ -507,7 +518,7 @@ static int Mux( sout_mux_t *p_mux )
p_data
=
block_FifoGet
(
p_input
->
p_fifo
);
E_
(
EStoPES
)(
p_mux
->
p_sout
,
&
p_data
,
p_data
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
p_sys
->
b_mpeg2
,
0
,
0
);
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 @
393c3c57
...
...
@@ -1147,7 +1147,7 @@ static int Mux( sout_mux_t *p_mux )
E_
(
EStoPES
)(
p_mux
->
p_sout
,
&
p_spu
,
p_spu
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
1
,
0
,
0
);
0
,
0
,
0
);
p_data
->
p_next
=
p_spu
;
}
}
...
...
@@ -1183,7 +1183,7 @@ static int Mux( sout_mux_t *p_mux )
}
E_
(
EStoPES
)(
p_mux
->
p_sout
,
&
p_data
,
p_data
,
p_input
->
p_fmt
,
p_stream
->
i_stream_id
,
1
,
b_data_alignment
,
i_header_size
);
1
,
b_data_alignment
,
i_header_size
,
0
);
BufferChainAppend
(
&
p_stream
->
chain_pes
,
p_data
);
...
...
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