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
d8a926a2
Commit
d8a926a2
authored
May 07, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: set SegmentBase as segment itself
Fixes playback with single file, simple profile
parent
21edb9b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
37 deletions
+26
-37
modules/demux/adaptative/playlist/SegmentBase.cpp
modules/demux/adaptative/playlist/SegmentBase.cpp
+2
-1
modules/demux/adaptative/playlist/SegmentBase.h
modules/demux/adaptative/playlist/SegmentBase.h
+5
-2
modules/demux/adaptative/playlist/SegmentInformation.cpp
modules/demux/adaptative/playlist/SegmentInformation.cpp
+4
-0
modules/demux/dash/mpd/IsoffMainParser.cpp
modules/demux/dash/mpd/IsoffMainParser.cpp
+15
-34
No files found.
modules/demux/adaptative/playlist/SegmentBase.cpp
View file @
d8a926a2
...
...
@@ -26,7 +26,8 @@
using
namespace
adaptative
::
playlist
;
SegmentBase
::
SegmentBase
()
:
SegmentBase
::
SegmentBase
(
ICanonicalUrl
*
parent
)
:
Segment
(
parent
),
Initializable
(),
Indexable
()
{
...
...
modules/demux/adaptative/playlist/SegmentBase.h
View file @
d8a926a2
...
...
@@ -27,16 +27,19 @@
#include "Segment.h"
#include "SegmentInfoCommon.h"
#include "../tools/Properties.hpp"
namespace
adaptative
{
namespace
playlist
{
class
SegmentBase
:
public
Initializable
<
Segment
>
,
/* SegmentBase can contain only one segment */
class
SegmentBase
:
public
Segment
,
public
Initializable
<
Segment
>
,
public
Indexable
<
Segment
>
{
public:
SegmentBase
();
SegmentBase
(
ICanonicalUrl
*
);
virtual
~
SegmentBase
();
};
}
...
...
modules/demux/adaptative/playlist/SegmentInformation.cpp
View file @
d8a926a2
...
...
@@ -101,6 +101,10 @@ vector<ISegment *> SegmentInformation::getSegments(SegmentInfoType type) const
retSegments
.
insert
(
retSegments
.
end
(),
list
.
begin
(),
list
.
end
()
);
}
}
else
if
(
segmentBase
)
{
retSegments
.
push_back
(
segmentBase
);
}
}
break
;
...
...
modules/demux/dash/mpd/IsoffMainParser.cpp
View file @
d8a926a2
...
...
@@ -257,51 +257,32 @@ void IsoffMainParser::setRepresentations (Node *adaptationSetNode, Adaptation
}
size_t
IsoffMainParser
::
parseSegmentBase
(
Node
*
segmentBaseNode
,
SegmentInformation
*
info
)
{
size_t
list_count
=
0
;
SegmentBase
*
base
;
if
(
!
segmentBaseNode
)
if
(
!
segmentBaseNode
||
!
(
base
=
new
(
std
::
nothrow
)
SegmentBase
(
info
))
)
return
0
;
else
if
(
segmentBaseNode
->
hasAttribute
(
"indexRange"
))
if
(
segmentBaseNode
->
hasAttribute
(
"indexRange"
))
{
SegmentList
*
list
=
new
SegmentList
();
Segment
*
seg
;
size_t
start
=
0
,
end
=
0
;
if
(
std
::
sscanf
(
segmentBaseNode
->
getAttributeValue
(
"indexRange"
).
c_str
(),
"%zu-%zu"
,
&
start
,
&
end
)
==
2
)
{
IndexSegment
*
index
=
new
DashIndexSegment
(
info
);
index
->
setByteRange
(
start
,
end
);
list
->
indexSegment
.
Set
(
index
);
/* index must be before data, so data starts at index end */
seg
=
new
Segment
(
info
);
seg
->
setByteRange
(
end
+
1
,
0
);
}
else
{
seg
=
new
Segment
(
info
);
IndexSegment
*
index
=
new
(
std
::
nothrow
)
DashIndexSegment
(
info
);
if
(
index
)
{
index
->
setByteRange
(
start
,
end
);
base
->
indexSegment
.
Set
(
index
);
/* index must be before data, so data starts at index end */
base
->
setByteRange
(
end
+
1
,
0
);
}
}
}
list_count
++
;
list
->
addSegment
(
seg
);
info
->
setSegmentList
(
list
);
parseInitSegment
(
DOMHelper
::
getFirstChildElementByName
(
segmentBaseNode
,
"Initialization"
),
base
,
info
);
Node
*
initSeg
=
DOMHelper
::
getFirstChildElementByName
(
segmentBaseNode
,
"Initialization"
);
if
(
initSeg
)
{
SegmentBase
*
base
=
new
SegmentBase
();
parseInitSegment
(
initSeg
,
base
,
info
);
info
->
setSegmentBase
(
base
);
}
}
else
{
SegmentBase
*
base
=
new
SegmentBase
();
parseInitSegment
(
DOMHelper
::
getFirstChildElementByName
(
segmentBaseNode
,
"Initialization"
),
base
,
info
);
info
->
setSegmentBase
(
base
);
}
info
->
setSegmentBase
(
base
);
return
list_count
;
return
1
;
}
size_t
IsoffMainParser
::
parseSegmentList
(
Node
*
segListNode
,
SegmentInformation
*
info
)
...
...
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