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
2a18a3bf
Commit
2a18a3bf
authored
Jun 18, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: add getFirstDTS
parent
25930fef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
modules/demux/adaptative/PlaylistManager.cpp
modules/demux/adaptative/PlaylistManager.cpp
+13
-0
modules/demux/adaptative/PlaylistManager.h
modules/demux/adaptative/PlaylistManager.h
+1
-0
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+29
-0
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+3
-0
No files found.
modules/demux/adaptative/PlaylistManager.cpp
View file @
2a18a3bf
...
...
@@ -150,6 +150,19 @@ mtime_t PlaylistManager::getPCR() const
return
pcr
;
}
mtime_t
PlaylistManager
::
getFirstDTS
()
const
{
mtime_t
dts
=
VLC_TS_INVALID
;
for
(
int
type
=
0
;
type
<
StreamTypeCount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
if
(
dts
==
VLC_TS_INVALID
||
dts
>
streams
[
type
]
->
getFirstDTS
())
dts
=
streams
[
type
]
->
getFirstDTS
();
}
return
dts
;
}
int
PlaylistManager
::
getGroup
()
const
{
for
(
int
type
=
0
;
type
<
StreamTypeCount
;
type
++
)
...
...
modules/demux/adaptative/PlaylistManager.h
View file @
2a18a3bf
...
...
@@ -55,6 +55,7 @@ namespace adaptative
Stream
::
status
demux
(
mtime_t
);
mtime_t
getDuration
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getFirstDTS
()
const
;
int
getGroup
()
const
;
int
esCount
()
const
;
bool
setPosition
(
mtime_t
);
...
...
modules/demux/adaptative/Streams.cpp
View file @
2a18a3bf
...
...
@@ -107,6 +107,11 @@ mtime_t Stream::getPCR() const
return
output
->
getPCR
();
}
mtime_t
Stream
::
getFirstDTS
()
const
{
return
output
->
getFirstDTS
();
}
int
Stream
::
getGroup
()
const
{
return
output
->
getGroup
();
...
...
@@ -314,6 +319,30 @@ BaseStreamOutput::~BaseStreamOutput()
vlc_mutex_destroy
(
&
lock
);
}
mtime_t
BaseStreamOutput
::
getFirstDTS
()
const
{
mtime_t
ret
=
VLC_TS_INVALID
;
vlc_mutex_lock
(
const_cast
<
vlc_mutex_t
*>
(
&
lock
));
std
::
list
<
Demuxed
*>::
const_iterator
it
;
for
(
it
=
queues
.
begin
();
it
!=
queues
.
end
();
++
it
)
{
const
Demuxed
*
pair
=
*
it
;
const
block_t
*
p_block
=
pair
->
p_queue
;
while
(
p_block
&&
p_block
->
i_dts
==
VLC_TS_INVALID
)
{
p_block
=
p_block
->
p_next
;
}
if
(
p_block
)
{
ret
=
p_block
->
i_dts
;
break
;
}
}
vlc_mutex_unlock
(
const_cast
<
vlc_mutex_t
*>
(
&
lock
));
return
ret
;
}
int
BaseStreamOutput
::
esCount
()
const
{
return
queues
.
size
();
...
...
modules/demux/adaptative/Streams.hpp
View file @
2a18a3bf
...
...
@@ -65,6 +65,7 @@ namespace adaptative
SegmentTracker
*
,
AbstractStreamOutputFactory
&
);
bool
isEOF
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getFirstDTS
()
const
;
int
getGroup
()
const
;
int
esCount
()
const
;
bool
seekAble
()
const
;
...
...
@@ -95,6 +96,7 @@ namespace adaptative
virtual
void
pushBlock
(
block_t
*
)
=
0
;
virtual
mtime_t
getPCR
()
const
;
virtual
mtime_t
getFirstDTS
()
const
=
0
;
virtual
int
getGroup
()
const
;
virtual
int
esCount
()
const
=
0
;
virtual
bool
seekAble
()
const
=
0
;
...
...
@@ -127,6 +129,7 @@ namespace adaptative
BaseStreamOutput
(
demux_t
*
,
const
std
::
string
&
);
virtual
~
BaseStreamOutput
();
virtual
void
pushBlock
(
block_t
*
);
/* reimpl */
virtual
mtime_t
getFirstDTS
()
const
;
/* reimpl */
virtual
int
esCount
()
const
;
/* reimpl */
virtual
bool
seekAble
()
const
;
/* reimpl */
virtual
void
setPosition
(
mtime_t
);
/* reimpl */
...
...
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