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
57cca51d
Commit
57cca51d
authored
Dec 22, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: handle bitswitchable property
parent
6713191a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
2 deletions
+35
-2
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
...m_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
+8
-1
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
...eam_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
+1
-1
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+2
-0
modules/stream_filter/dash/mpd/SegmentInformation.cpp
modules/stream_filter/dash/mpd/SegmentInformation.cpp
+15
-0
modules/stream_filter/dash/mpd/SegmentInformation.hpp
modules/stream_filter/dash/mpd/SegmentInformation.hpp
+9
-0
No files found.
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
View file @
57cca51d
...
...
@@ -50,7 +50,13 @@ Chunk* AbstractAdaptationLogic::getNextChunk(Streams::Type type)
if
(
!
currentPeriod
)
return
NULL
;
Representation
*
rep
=
getCurrentRepresentation
(
type
);
Representation
*
rep
;
if
(
prevRepresentation
&&
!
prevRepresentation
->
canBitswitch
())
rep
=
prevRepresentation
;
else
rep
=
getCurrentRepresentation
(
type
);
if
(
rep
==
NULL
)
return
NULL
;
...
...
@@ -68,6 +74,7 @@ Chunk* AbstractAdaptationLogic::getNextChunk(Streams::Type type)
if
(
count
==
segments
.
size
()
&&
!
b_templated
)
{
currentPeriod
=
mpd
->
getNextPeriod
(
currentPeriod
);
prevRepresentation
=
NULL
;
count
=
0
;
return
getNextChunk
(
type
);
}
...
...
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
View file @
57cca51d
...
...
@@ -54,7 +54,7 @@ namespace dash
dash
::
mpd
::
MPD
*
mpd
;
dash
::
mpd
::
Period
*
currentPeriod
;
size_t
count
;
const
mpd
::
Representation
*
prevRepresentation
;
mpd
::
Representation
*
prevRepresentation
;
private:
mtime_t
bufferedMicroSec
;
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
57cca51d
...
...
@@ -143,6 +143,8 @@ size_t IsoffMainParser::parseSegmentInformation(Node *node, SegmentInformation *
parseSegmentBase
(
DOMHelper
::
getFirstChildElementByName
(
node
,
"SegmentBase"
),
info
);
total
+=
parseSegmentList
(
DOMHelper
::
getFirstChildElementByName
(
node
,
"SegmentList"
),
info
);
total
+=
parseSegmentTemplate
(
DOMHelper
::
getFirstChildElementByName
(
node
,
"SegmentTemplate"
),
info
);
if
(
node
->
hasAttribute
(
"bitstreamSwitching"
))
info
->
setBitstreamSwitching
(
node
->
getAttributeValue
(
"bitstreamSwitching"
)
==
"true"
);
return
total
;
}
...
...
modules/stream_filter/dash/mpd/SegmentInformation.cpp
View file @
57cca51d
...
...
@@ -35,6 +35,7 @@ SegmentInformation::SegmentInformation(SegmentInformation *parent_) :
segmentList
=
NULL
;
for
(
int
i
=
0
;
i
<
InfoTypeCount
;
i
++
)
segmentTemplate
[
i
]
=
NULL
;
bitswitch_policy
=
BITSWITCH_INHERIT
;
}
SegmentInformation
::
SegmentInformation
(
ICanonicalUrl
*
parent_
)
:
...
...
@@ -45,6 +46,7 @@ SegmentInformation::SegmentInformation(ICanonicalUrl * parent_) :
segmentList
=
NULL
;
for
(
int
i
=
0
;
i
<
InfoTypeCount
;
i
++
)
segmentTemplate
[
i
]
=
NULL
;
bitswitch_policy
=
BITSWITCH_INHERIT
;
}
SegmentInformation
::~
SegmentInformation
()
...
...
@@ -94,6 +96,14 @@ vector<ISegment *> SegmentInformation::getSegments() const
return
retSegments
;
}
bool
SegmentInformation
::
canBitswitch
()
const
{
if
(
bitswitch_policy
==
BITSWITCH_INHERIT
)
return
(
parent
)
?
parent
->
canBitswitch
()
:
false
;
else
return
(
bitswitch_policy
==
BITSWITCH_YES
);
}
void
SegmentInformation
::
setSegmentList
(
SegmentList
*
list
)
{
segmentList
=
list
;
...
...
@@ -156,6 +166,11 @@ void SegmentInformation::SplitUsingIndex(std::vector<SplitPoint> &splitlist)
}
}
void
SegmentInformation
::
setBitstreamSwitching
(
bool
bitswitch
)
{
bitswitch_policy
=
(
bitswitch
)
?
BITSWITCH_YES
:
BITSWITCH_NO
;
}
SegmentBase
*
SegmentInformation
::
inheritSegmentBase
()
const
{
if
(
segmentBase
)
...
...
modules/stream_filter/dash/mpd/SegmentInformation.hpp
View file @
57cca51d
...
...
@@ -48,6 +48,7 @@ namespace dash
explicit
SegmentInformation
(
ICanonicalUrl
*
);
virtual
~
SegmentInformation
();
std
::
vector
<
ISegment
*>
getSegments
()
const
;
bool
canBitswitch
()
const
;
class
SplitPoint
{
...
...
@@ -69,6 +70,7 @@ namespace dash
void
setSegmentList
(
SegmentList
*
);
void
setSegmentBase
(
SegmentBase
*
);
void
setSegmentTemplate
(
SegmentTemplate
*
,
SegmentInfoType
);
void
setBitstreamSwitching
(
bool
);
SegmentBase
*
inheritSegmentBase
()
const
;
SegmentList
*
inheritSegmentList
()
const
;
...
...
@@ -78,6 +80,13 @@ namespace dash
SegmentBase
*
segmentBase
;
SegmentList
*
segmentList
;
SegmentTemplate
*
segmentTemplate
[
InfoTypeCount
];
enum
BitswitchPolicy
{
BITSWITCH_INHERIT
,
BITSWITCH_YES
,
BITSWITCH_NO
}
bitswitch_policy
;
};
}
}
...
...
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