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
eb2d6145
Commit
eb2d6145
authored
Nov 18, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: dash: always get segments through representation
parent
80706d97
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
55 additions
and
55 deletions
+55
-55
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
...filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
+1
-1
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
..._filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
+1
-1
modules/stream_filter/dash/mpd/BasicCMManager.cpp
modules/stream_filter/dash/mpd/BasicCMManager.cpp
+0
-13
modules/stream_filter/dash/mpd/BasicCMManager.h
modules/stream_filter/dash/mpd/BasicCMManager.h
+0
-1
modules/stream_filter/dash/mpd/IMPDManager.h
modules/stream_filter/dash/mpd/IMPDManager.h
+0
-1
modules/stream_filter/dash/mpd/IsoffMainManager.cpp
modules/stream_filter/dash/mpd/IsoffMainManager.cpp
+0
-18
modules/stream_filter/dash/mpd/IsoffMainManager.h
modules/stream_filter/dash/mpd/IsoffMainManager.h
+0
-1
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+4
-11
modules/stream_filter/dash/mpd/Representation.cpp
modules/stream_filter/dash/mpd/Representation.cpp
+46
-6
modules/stream_filter/dash/mpd/Representation.h
modules/stream_filter/dash/mpd/Representation.h
+3
-2
No files found.
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
View file @
eb2d6145
...
...
@@ -80,7 +80,7 @@ void AlwaysBestAdaptationLogic::initSchedule ()
if
(
best
!=
NULL
)
{
std
::
vector
<
Segment
*>
segments
=
this
->
mpdManager
->
getSegments
(
best
);
std
::
vector
<
Segment
*>
segments
=
best
->
getSegments
(
);
for
(
size_t
j
=
0
;
j
<
segments
.
size
();
j
++
)
{
this
->
schedule
.
push_back
(
segments
.
at
(
j
));
...
...
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
View file @
eb2d6145
...
...
@@ -62,7 +62,7 @@ Chunk* RateBasedAdaptationLogic::getNextChunk()
if
(
rep
==
NULL
)
return
NULL
;
std
::
vector
<
Segment
*>
segments
=
this
->
mpdManager
->
getSegments
(
rep
);
std
::
vector
<
Segment
*>
segments
=
rep
->
getSegments
(
);
if
(
this
->
count
==
segments
.
size
()
)
{
...
...
modules/stream_filter/dash/mpd/BasicCMManager.cpp
View file @
eb2d6145
...
...
@@ -35,19 +35,6 @@ BasicCMManager::BasicCMManager(MPD *mpd) :
}
std
::
vector
<
Segment
*>
BasicCMManager
::
getSegments
(
const
Representation
*
rep
)
{
std
::
vector
<
Segment
*>
retSegments
;
SegmentInfo
*
info
=
rep
->
getSegmentInfo
();
Segment
*
initSegment
=
info
->
getInitialisationSegment
();
if
(
initSegment
)
retSegments
.
push_back
(
initSegment
);
retSegments
.
insert
(
retSegments
.
end
(),
info
->
getSegments
().
begin
(),
info
->
getSegments
().
end
()
);
return
retSegments
;
}
Representation
*
BasicCMManager
::
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
,
int
,
int
)
const
{
return
IMPDManager
::
getRepresentation
(
period
,
bitrate
);
...
...
modules/stream_filter/dash/mpd/BasicCMManager.h
View file @
eb2d6145
...
...
@@ -42,7 +42,6 @@ namespace dash
public:
BasicCMManager
(
MPD
*
mpd
);
std
::
vector
<
Segment
*>
getSegments
(
const
Representation
*
rep
);
Representation
*
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
,
int
width
,
int
height
)
const
;
};
...
...
modules/stream_filter/dash/mpd/IMPDManager.h
View file @
eb2d6145
...
...
@@ -43,7 +43,6 @@ namespace dash
virtual
Period
*
getFirstPeriod
()
const
;
virtual
Period
*
getNextPeriod
(
Period
*
period
);
virtual
Representation
*
getBestRepresentation
(
Period
*
period
)
const
;
virtual
std
::
vector
<
Segment
*>
getSegments
(
const
Representation
*
rep
)
=
0
;
virtual
Representation
*
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
)
const
;
virtual
const
MPD
*
getMPD
()
const
;
virtual
Representation
*
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
,
...
...
modules/stream_filter/dash/mpd/IsoffMainManager.cpp
View file @
eb2d6145
...
...
@@ -36,24 +36,6 @@ IsoffMainManager::IsoffMainManager(MPD *mpd) :
}
std
::
vector
<
Segment
*>
IsoffMainManager
::
getSegments
(
const
Representation
*
rep
)
{
std
::
vector
<
Segment
*>
retSegments
;
SegmentList
*
list
=
rep
->
getSegmentList
();
if
(
rep
->
getSegmentBase
())
{
Segment
*
initSegment
=
rep
->
getSegmentBase
()
->
getInitSegment
();
if
(
initSegment
)
retSegments
.
push_back
(
initSegment
);
}
if
(
list
)
retSegments
.
insert
(
retSegments
.
end
(),
list
->
getSegments
().
begin
(),
list
->
getSegments
().
end
());
return
retSegments
;
}
Representation
*
IsoffMainManager
::
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
,
int
width
,
int
height
)
const
{
if
(
period
==
NULL
)
...
...
modules/stream_filter/dash/mpd/IsoffMainManager.h
View file @
eb2d6145
...
...
@@ -43,7 +43,6 @@ namespace dash
public:
IsoffMainManager
(
MPD
*
mpd
);
std
::
vector
<
Segment
*>
getSegments
(
const
Representation
*
rep
);
Representation
*
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
,
int
width
,
int
height
)
const
;
};
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
eb2d6145
...
...
@@ -198,18 +198,11 @@ void IsoffMainParser::print ()
std
::
vector
<
Representation
*>::
const_iterator
k
;
for
(
k
=
(
*
j
)
->
getRepresentations
().
begin
();
k
!=
(
*
j
)
->
getRepresentations
().
end
();
k
++
)
{
msg_Dbg
(
p_stream
,
" Representation"
);
msg_Dbg
(
p_stream
,
" InitSeg url=%s"
,
(
*
k
)
->
getSegmentBase
()
->
getInitSegment
()
->
getSourceUrl
().
c_str
());
const
SegmentList
*
segmentList
=
(
*
k
)
->
getSegmentList
();
if
(
segmentList
)
std
::
vector
<
std
::
string
>
debug
=
(
*
k
)
->
toString
();
std
::
vector
<
std
::
string
>::
const_iterator
l
;
for
(
l
=
debug
.
begin
();
l
<
debug
.
end
();
l
++
)
{
std
::
vector
<
Segment
*>::
const_iterator
l
;
for
(
l
=
segmentList
->
getSegments
().
begin
();
l
<
segmentList
->
getSegments
().
end
();
l
++
)
{
msg_Dbg
(
p_stream
,
" Segment url=%s"
,
(
*
l
)
->
getSourceUrl
().
c_str
());
}
msg_Dbg
(
p_stream
,
"%s"
,
(
*
l
).
c_str
());
}
}
}
...
...
modules/stream_filter/dash/mpd/Representation.cpp
View file @
eb2d6145
...
...
@@ -127,18 +127,39 @@ void Representation::addDependency(const Representation *dep)
if
(
dep
!=
NULL
)
this
->
dependencies
.
push_back
(
dep
);
}
SegmentList
*
Representation
::
getSegmentList
()
const
std
::
vector
<
Segment
*>
Representation
::
getSegments
()
const
{
return
this
->
segmentList
;
std
::
vector
<
Segment
*>
retSegments
;
if
(
segmentInfo
)
{
retSegments
.
push_back
(
segmentInfo
->
getInitialisationSegment
()
);
if
(
!
segmentInfo
->
getSegments
().
empty
()
)
retSegments
.
insert
(
retSegments
.
end
(),
segmentInfo
->
getSegments
().
begin
(),
segmentInfo
->
getSegments
().
end
()
);
}
else
{
if
(
segmentBase
&&
segmentBase
->
getInitSegment
()
)
retSegments
.
push_back
(
segmentBase
->
getInitSegment
()
);
if
(
segmentList
)
retSegments
.
insert
(
retSegments
.
end
(),
segmentList
->
getSegments
().
begin
(),
segmentList
->
getSegments
().
end
()
);
}
return
retSegments
;
}
void
Representation
::
setSegmentList
(
SegmentList
*
list
)
{
this
->
segmentList
=
list
;
}
SegmentBase
*
Representation
::
getSegmentBase
()
const
{
return
this
->
segmentBase
;
}
void
Representation
::
setSegmentBase
(
SegmentBase
*
base
)
{
this
->
segmentBase
=
base
;
...
...
@@ -170,3 +191,22 @@ int Representation::getHeight () const
{
return
this
->
height
;
}
std
::
vector
<
std
::
string
>
Representation
::
toString
()
const
{
std
::
vector
<
std
::
string
>
ret
;
ret
.
push_back
(
std
::
string
(
" Representation"
));
ret
.
push_back
(
std
::
string
(
" InitSeg url="
)
.
append
(
segmentBase
->
getInitSegment
()
->
getSourceUrl
()));
if
(
segmentList
)
{
std
::
vector
<
Segment
*>::
const_iterator
l
;
for
(
l
=
segmentList
->
getSegments
().
begin
();
l
<
segmentList
->
getSegments
().
end
();
l
++
)
{
ret
.
push_back
(
std
::
string
(
" Segment url="
)
.
append
((
*
l
)
->
getSourceUrl
()));
}
}
return
ret
;
}
modules/stream_filter/dash/mpd/Representation.h
View file @
eb2d6145
...
...
@@ -73,9 +73,8 @@ namespace dash
const
AdaptationSet
*
getParentGroup
()
const
;
void
setParentGroup
(
const
AdaptationSet
*
group
);
SegmentList
*
getSegmentList
()
const
;
std
::
vector
<
Segment
*>
getSegments
()
const
;
void
setSegmentList
(
SegmentList
*
list
);
SegmentBase
*
getSegmentBase
()
const
;
void
setSegmentBase
(
SegmentBase
*
base
);
void
setWidth
(
int
width
);
int
getWidth
()
const
;
...
...
@@ -84,6 +83,8 @@ namespace dash
BaseUrl
*
getBaseUrl
()
const
;
void
setBaseUrl
(
BaseUrl
*
baseUrl
);
std
::
vector
<
std
::
string
>
toString
()
const
;
private:
uint64_t
bandwidth
;
std
::
string
id
;
...
...
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