Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
cdf4d243
Commit
cdf4d243
authored
4 years ago
by
François Cartegnie
Browse files
Options
Downloads
Patches
Plain Diff
demux: adaptive: replace now single segment vector in template
parent
fdb30738
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/demux/adaptive/playlist/SegmentTemplate.cpp
+7
-6
7 additions, 6 deletions
modules/demux/adaptive/playlist/SegmentTemplate.cpp
modules/demux/adaptive/playlist/SegmentTemplate.h
+1
-1
1 addition, 1 deletion
modules/demux/adaptive/playlist/SegmentTemplate.h
with
8 additions
and
7 deletions
modules/demux/adaptive/playlist/SegmentTemplate.cpp
+
7
−
6
View file @
cdf4d243
...
...
@@ -55,17 +55,17 @@ SegmentTemplate::SegmentTemplate( SegmentInformation *parent ) :
{
initialisationSegment
.
Set
(
nullptr
);
parentSegmentInformation
=
parent
;
segments
.
push_back
(
new
SegmentTemplateSegment
(
this
,
parent
)
);
virtualsegment
=
new
SegmentTemplateSegment
(
this
,
parent
);
}
SegmentTemplate
::~
SegmentTemplate
()
{
delete
*
segments
.
begin
()
;
delete
virtualsegment
;
}
void
SegmentTemplate
::
setSourceUrl
(
const
std
::
string
&
url
)
{
(
*
segments
.
begin
())
->
setSourceUrl
(
url
);
virtualsegment
->
setSourceUrl
(
url
);
}
void
SegmentTemplate
::
pruneByPlaybackTime
(
vlc_tick_t
time
)
...
...
@@ -111,7 +111,8 @@ uint64_t SegmentTemplate::getLiveTemplateNumber(vlc_tick_t playbacktime, bool ab
void
SegmentTemplate
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
{
AbstractSegmentBaseType
::
debug
(
obj
,
indent
);
(
*
segments
.
begin
())
->
debug
(
obj
,
indent
);
if
(
virtualsegment
)
virtualsegment
->
debug
(
obj
,
indent
);
const
AbstractAttr
*
p
=
getAttribute
(
Type
::
Timeline
);
if
(
p
)
static_cast
<
const
SegmentTimeline
*>
(
p
)
->
debug
(
obj
,
indent
+
1
);
...
...
@@ -138,7 +139,7 @@ Segment * SegmentTemplate::getMediaSegment(uint64_t number) const
{
const
SegmentTimeline
*
tl
=
inheritSegmentTimeline
();
if
(
tl
==
nullptr
||
tl
->
maxElementNumber
()
>
number
)
return
*
segments
.
begin
()
;
return
virtualsegment
;
return
nullptr
;
}
...
...
@@ -186,7 +187,7 @@ Segment * SegmentTemplate::getNextMediaSegment(uint64_t i_pos,uint64_t *pi_newp
/* start number */
*
pi_newpos
=
std
::
max
(
inheritStartNumber
(),
i_pos
);
}
return
*
segments
.
begin
()
;
return
virtualsegment
;
}
uint64_t
SegmentTemplate
::
getStartSegmentNumber
()
const
...
...
This diff is collapsed.
Click to expand it.
modules/demux/adaptive/playlist/SegmentTemplate.h
+
1
−
1
View file @
cdf4d243
...
...
@@ -71,7 +71,7 @@ namespace adaptive
protected:
SegmentInformation
*
parentSegmentInformation
;
std
::
vector
<
SegmentTemplateSegment
*
>
segments
;
/* should have only 1 */
SegmentTemplateSegment
*
virtualsegment
;
};
class
SegmentTemplateInit
:
public
InitSegment
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment