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
a614010d
Commit
a614010d
authored
Jul 15, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/mux/mpeg/ps.c: save pack and system headers for http streaming.
parent
da7946c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
modules/mux/mpeg/ps.c
modules/mux/mpeg/ps.c
+20
-9
No files found.
modules/mux/mpeg/ps.c
View file @
a614010d
...
...
@@ -3,7 +3,7 @@
* multiplexer module for vlc
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ps.c,v 1.1
3 2003/07/15 13:12:00
gbazin Exp $
* $Id: ps.c,v 1.1
4 2003/07/15 16:07:33
gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -238,7 +238,8 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
return
(
VLC_SUCCESS
);
}
static
int
MuxWritePackHeader
(
sout_mux_t
*
p_mux
,
mtime_t
i_dts
)
static
int
MuxWritePackHeader
(
sout_mux_t
*
p_mux
,
sout_buffer_t
**
p_buf
,
mtime_t
i_dts
)
{
sout_buffer_t
*
p_hdr
;
bits_buffer_t
bits
;
...
...
@@ -283,12 +284,12 @@ static int MuxWritePackHeader( sout_mux_t *p_mux, mtime_t i_dts )
else
p_hdr
->
i_size
=
12
;
sout_
AccessOutWrite
(
p_mux
->
p_access
,
p_hdr
);
sout_
BufferChain
(
p_buf
,
p_hdr
);
return
(
0
);
}
static
int
MuxWriteSystemHeader
(
sout_mux_t
*
p_mux
)
static
int
MuxWriteSystemHeader
(
sout_mux_t
*
p_mux
,
sout_buffer_t
**
p_buf
)
{
sout_mux_sys_t
*
p_sys
=
p_mux
->
p_sys
;
sout_buffer_t
*
p_hdr
;
...
...
@@ -339,7 +340,7 @@ static int MuxWriteSystemHeader( sout_mux_t *p_mux )
}
}
sout_
AccessOutWrite
(
p_mux
->
p_access
,
p_hdr
);
sout_
BufferChain
(
p_buf
,
p_hdr
);
return
(
0
);
}
...
...
@@ -399,7 +400,7 @@ static int Mux( sout_mux_t *p_mux )
sout_input_t
*
p_input
;
ps_stream_t
*
p_stream
;
sout_fifo_t
*
p_fifo
;
sout_buffer_t
*
p_data
;
sout_buffer_t
*
p_
hdr
=
NULL
,
*
p_
data
;
if
(
MuxGetStream
(
p_mux
,
&
i_stream
,
&
i_dts
)
<
0
)
{
...
...
@@ -412,18 +413,28 @@ static int Mux( sout_mux_t *p_mux )
if
(
p_sys
->
i_pes_count
%
30
==
0
)
{
MuxWritePackHeader
(
p_mux
,
i_dts
);
MuxWritePackHeader
(
p_mux
,
&
p_hdr
,
i_dts
);
}
if
(
p_sys
->
i_pes_count
%
300
==
0
)
{
MuxWriteSystemHeader
(
p_mux
);
sout_buffer_t
*
p_buf
;
MuxWriteSystemHeader
(
p_mux
,
&
p_hdr
);
/* For MPEG1 streaming, set HEADER flag */
for
(
p_buf
=
p_hdr
;
p_buf
!=
NULL
;
p_buf
=
p_buf
->
p_next
)
{
p_buf
->
i_flags
|=
SOUT_BUFFER_FLAGS_HEADER
;
}
}
p_data
=
sout_FifoGet
(
p_fifo
);
E_
(
EStoPES
)(
p_mux
->
p_sout
,
&
p_data
,
p_data
,
p_stream
->
i_stream_id
,
p_mux
->
p_sys
->
b_mpeg2
);
sout_AccessOutWrite
(
p_mux
->
p_access
,
p_data
);
sout_BufferChain
(
&
p_hdr
,
p_data
);
sout_AccessOutWrite
(
p_mux
->
p_access
,
p_hdr
);
p_sys
->
i_pes_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