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
3dc73d5d
Commit
3dc73d5d
authored
Jun 18, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: always set first pcr to lowest dts
parent
2a18a3bf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
18 deletions
+41
-18
modules/demux/adaptative/PlaylistManager.cpp
modules/demux/adaptative/PlaylistManager.cpp
+2
-2
modules/demux/adaptative/PlaylistManager.h
modules/demux/adaptative/PlaylistManager.h
+1
-1
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+3
-2
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+1
-1
modules/demux/dash/dash.cpp
modules/demux/dash/dash.cpp
+17
-6
modules/demux/hls/hls.cpp
modules/demux/hls/hls.cpp
+17
-6
No files found.
modules/demux/adaptative/PlaylistManager.cpp
View file @
3dc73d5d
...
...
@@ -111,7 +111,7 @@ bool PlaylistManager::start(demux_t *demux)
return
true
;
}
Stream
::
status
PlaylistManager
::
demux
(
mtime_t
nzdeadline
)
Stream
::
status
PlaylistManager
::
demux
(
mtime_t
nzdeadline
,
bool
send
)
{
Stream
::
status
i_return
=
Stream
::
status_eof
;
...
...
@@ -121,7 +121,7 @@ Stream::status PlaylistManager::demux(mtime_t nzdeadline)
continue
;
Stream
::
status
i_ret
=
streams
[
type
]
->
demux
(
conManager
,
nzdeadline
);
streams
[
type
]
->
demux
(
conManager
,
nzdeadline
,
send
);
if
(
i_ret
==
Stream
::
status_buffering
)
{
...
...
modules/demux/adaptative/PlaylistManager.h
View file @
3dc73d5d
...
...
@@ -52,7 +52,7 @@ namespace adaptative
bool
start
(
demux_t
*
);
Stream
::
status
demux
(
mtime_t
);
Stream
::
status
demux
(
mtime_t
,
bool
);
mtime_t
getDuration
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getFirstDTS
()
const
;
...
...
modules/demux/adaptative/Streams.cpp
View file @
3dc73d5d
...
...
@@ -143,7 +143,7 @@ bool Stream::seekAble() const
return
(
output
&&
output
->
seekAble
());
}
Stream
::
status
Stream
::
demux
(
HTTPConnectionManager
*
connManager
,
mtime_t
nz_deadline
)
Stream
::
status
Stream
::
demux
(
HTTPConnectionManager
*
connManager
,
mtime_t
nz_deadline
,
bool
send
)
{
if
(
nz_deadline
+
VLC_TS_0
>
output
->
getPCR
())
/* not already demuxed */
{
...
...
@@ -155,7 +155,8 @@ Stream::status Stream::demux(HTTPConnectionManager *connManager, mtime_t nz_dead
return
Stream
::
status_buffering
;
}
output
->
sendToDecoder
(
nz_deadline
);
if
(
send
)
output
->
sendToDecoder
(
nz_deadline
);
return
Stream
::
status_demuxed
;
}
...
...
modules/demux/adaptative/Streams.hpp
View file @
3dc73d5d
...
...
@@ -70,7 +70,7 @@ namespace adaptative
int
esCount
()
const
;
bool
seekAble
()
const
;
typedef
enum
{
status_eof
,
status_buffering
,
status_demuxed
}
status
;
status
demux
(
HTTPConnectionManager
*
,
mtime_t
);
status
demux
(
HTTPConnectionManager
*
,
mtime_t
,
bool
);
bool
setPosition
(
mtime_t
,
bool
);
mtime_t
getPosition
()
const
;
void
prune
();
...
...
modules/demux/dash/dash.cpp
View file @
3dc73d5d
...
...
@@ -182,8 +182,19 @@ static int Demux(demux_t *p_demux)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
p_sys
->
i_nzpcr
==
VLC_TS_INVALID
)
{
if
(
Stream
::
status_eof
==
p_sys
->
p_dashManager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
,
false
)
)
{
return
VLC_DEMUXER_EOF
;
}
mtime_t
i_dts
=
p_sys
->
p_dashManager
->
getFirstDTS
();
p_sys
->
i_nzpcr
=
i_dts
;
}
Stream
::
status
status
=
p_sys
->
p_dashManager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
);
p_sys
->
p_dashManager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
,
true
);
switch
(
status
)
{
case
Stream
:
:
status_eof
:
...
...
@@ -191,12 +202,12 @@ static int Demux(demux_t *p_demux)
case
Stream
:
:
status_buffering
:
break
;
case
Stream
:
:
status_demuxed
:
if
(
p_sys
->
i_nzpcr
==
VLC_TS_INVALID
)
p_sys
->
i_nzpcr
=
p_sys
->
p_dashManager
->
getPCR
();
else
if
(
p_sys
->
i_nzpcr
!=
VLC_TS_INVALID
)
{
p_sys
->
i_nzpcr
+=
DEMUX_INCREMENT
;
int
group
=
p_sys
->
p_dashManager
->
getGroup
();
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_GROUP_PCR
,
group
,
VLC_TS_0
+
p_sys
->
i_nzpcr
);
int
group
=
p_sys
->
p_dashManager
->
getGroup
();
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_GROUP_PCR
,
group
,
VLC_TS_0
+
p_sys
->
i_nzpcr
);
}
break
;
}
...
...
modules/demux/hls/hls.cpp
View file @
3dc73d5d
...
...
@@ -218,8 +218,19 @@ static int Demux(demux_t *p_demux)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
p_sys
->
i_nzpcr
==
VLC_TS_INVALID
)
{
if
(
Stream
::
status_eof
==
p_sys
->
p_manager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
,
false
)
)
{
return
VLC_DEMUXER_EOF
;
}
mtime_t
i_dts
=
p_sys
->
p_manager
->
getFirstDTS
();
p_sys
->
i_nzpcr
=
i_dts
;
}
Stream
::
status
status
=
p_sys
->
p_manager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
);
p_sys
->
p_manager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
,
true
);
switch
(
status
)
{
case
Stream
:
:
status_eof
:
...
...
@@ -227,12 +238,12 @@ static int Demux(demux_t *p_demux)
case
Stream
:
:
status_buffering
:
break
;
case
Stream
:
:
status_demuxed
:
if
(
p_sys
->
i_nzpcr
==
VLC_TS_INVALID
)
p_sys
->
i_nzpcr
=
p_sys
->
p_manager
->
getPCR
();
else
if
(
p_sys
->
i_nzpcr
!=
VLC_TS_INVALID
)
{
p_sys
->
i_nzpcr
+=
DEMUX_INCREMENT
;
int
group
=
p_sys
->
p_manager
->
getGroup
();
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_GROUP_PCR
,
group
,
VLC_TS_0
+
p_sys
->
i_nzpcr
);
int
group
=
p_sys
->
p_manager
->
getGroup
();
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_GROUP_PCR
,
group
,
VLC_TS_0
+
p_sys
->
i_nzpcr
);
}
break
;
}
...
...
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