Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8158205e
Commit
8158205e
authored
Jan 05, 2012
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Jan 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Allow SegmentTimeline to be queried for a "S" element.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
a90c1374
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
modules/stream_filter/dash/mpd/SegmentTimeline.cpp
modules/stream_filter/dash/mpd/SegmentTimeline.cpp
+24
-0
modules/stream_filter/dash/mpd/SegmentTimeline.h
modules/stream_filter/dash/mpd/SegmentTimeline.h
+2
-0
No files found.
modules/stream_filter/dash/mpd/SegmentTimeline.cpp
View file @
8158205e
...
...
@@ -26,6 +26,8 @@
#include <vlc_common.h>
#include <vlc_arrays.h>
#include <iostream>
using
namespace
dash
::
mpd
;
SegmentTimeline
::
SegmentTimeline
()
:
...
...
@@ -53,6 +55,28 @@ void dash::mpd::SegmentTimeline::addElement(dash::mpd::SegmentTimeline::Element
this
->
elements
.
push_back
(
e
);
}
const
SegmentTimeline
::
Element
*
SegmentTimeline
::
getElement
(
mtime_t
dts
)
const
{
if
(
this
->
elements
.
size
()
==
0
)
return
NULL
;
int64_t
targetT
=
dts
*
this
->
timescale
/
1000000
;
targetT
-=
this
->
elements
.
front
()
->
t
;
std
::
list
<
Element
*>::
const_iterator
it
=
this
->
elements
.
begin
();
std
::
list
<
Element
*>::
const_iterator
end
=
this
->
elements
.
end
();
const
Element
*
res
=
NULL
;
while
(
it
!=
end
)
{
if
(
(
*
it
)
->
t
>
targetT
)
return
res
;
res
=
*
it
;
++
it
;
}
std
::
cerr
<<
"No more element to be used."
<<
std
::
endl
;
return
NULL
;
}
dash
::
mpd
::
SegmentTimeline
::
Element
::
Element
()
:
r
(
0
)
{
...
...
modules/stream_filter/dash/mpd/SegmentTimeline.h
View file @
8158205e
...
...
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <list>
#include <stdint.h>
#include <vlc_common.h>
namespace
dash
{
...
...
@@ -47,6 +48,7 @@ namespace dash
int
getTimescale
()
const
;
void
setTimescale
(
int
timescale
);
void
addElement
(
Element
*
e
);
const
Element
*
getElement
(
mtime_t
dts
)
const
;
private:
int
timescale
;
...
...
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