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
a98cee48
Commit
a98cee48
authored
Apr 28, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: handle index segment
parent
6681e69d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
8 deletions
+53
-8
modules/demux/adaptative/SegmentTracker.cpp
modules/demux/adaptative/SegmentTracker.cpp
+9
-0
modules/demux/adaptative/SegmentTracker.hpp
modules/demux/adaptative/SegmentTracker.hpp
+1
-0
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
+2
-1
modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
+1
-1
modules/demux/adaptative/playlist/SegmentInfoCommon.h
modules/demux/adaptative/playlist/SegmentInfoCommon.h
+16
-1
modules/demux/adaptative/playlist/SegmentInformation.cpp
modules/demux/adaptative/playlist/SegmentInformation.cpp
+19
-1
modules/demux/dash/mpd/IsoffMainParser.cpp
modules/demux/dash/mpd/IsoffMainParser.cpp
+3
-3
No files found.
modules/demux/adaptative/SegmentTracker.cpp
View file @
a98cee48
...
@@ -30,6 +30,7 @@ SegmentTracker::SegmentTracker(AbstractAdaptationLogic *logic_, AbstractPlaylist
...
@@ -30,6 +30,7 @@ SegmentTracker::SegmentTracker(AbstractAdaptationLogic *logic_, AbstractPlaylist
{
{
count
=
0
;
count
=
0
;
initializing
=
true
;
initializing
=
true
;
indexed
=
false
;
prevRepresentation
=
NULL
;
prevRepresentation
=
NULL
;
setAdaptationLogic
(
logic_
);
setAdaptationLogic
(
logic_
);
playlist
=
playlist_
;
playlist
=
playlist_
;
...
@@ -82,6 +83,14 @@ Chunk * SegmentTracker::getNextChunk(Streams::Type type)
...
@@ -82,6 +83,14 @@ Chunk * SegmentTracker::getNextChunk(Streams::Type type)
return
segment
->
toChunk
(
count
,
rep
);
return
segment
->
toChunk
(
count
,
rep
);
}
}
if
(
!
indexed
)
{
indexed
=
true
;
segment
=
rep
->
getSegment
(
BaseRepresentation
::
INFOTYPE_INDEX
);
if
(
segment
)
return
segment
->
toChunk
(
count
,
rep
);
}
segment
=
rep
->
getSegment
(
BaseRepresentation
::
INFOTYPE_MEDIA
,
count
);
segment
=
rep
->
getSegment
(
BaseRepresentation
::
INFOTYPE_MEDIA
,
count
);
if
(
!
segment
)
if
(
!
segment
)
{
{
...
...
modules/demux/adaptative/SegmentTracker.hpp
View file @
a98cee48
...
@@ -64,6 +64,7 @@ namespace adaptative
...
@@ -64,6 +64,7 @@ namespace adaptative
private:
private:
bool
initializing
;
bool
initializing
;
bool
indexed
;
uint64_t
count
;
uint64_t
count
;
AbstractAdaptationLogic
*
logic
;
AbstractAdaptationLogic
*
logic
;
AbstractPlaylist
*
playlist
;
AbstractPlaylist
*
playlist
;
...
...
modules/demux/adaptative/playlist/SegmentBase.cpp
View file @
a98cee48
...
@@ -27,7 +27,8 @@
...
@@ -27,7 +27,8 @@
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
SegmentBase
::
SegmentBase
()
:
SegmentBase
::
SegmentBase
()
:
Initializable
()
Initializable
(),
Indexable
()
{
{
}
}
SegmentBase
::~
SegmentBase
()
SegmentBase
::~
SegmentBase
()
...
...
modules/demux/adaptative/playlist/SegmentBase.h
View file @
a98cee48
...
@@ -32,7 +32,8 @@ namespace adaptative
...
@@ -32,7 +32,8 @@ namespace adaptative
{
{
namespace
playlist
namespace
playlist
{
{
class
SegmentBase
:
public
Initializable
<
Segment
>
class
SegmentBase
:
public
Initializable
<
Segment
>
,
public
Indexable
<
Segment
>
{
{
public:
public:
SegmentBase
();
SegmentBase
();
...
...
modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
View file @
a98cee48
...
@@ -64,7 +64,7 @@ uint64_t TimescaleAble::inheritTimescale() const
...
@@ -64,7 +64,7 @@ uint64_t TimescaleAble::inheritTimescale() const
}
}
SegmentInfoCommon
::
SegmentInfoCommon
(
ICanonicalUrl
*
parent
)
:
SegmentInfoCommon
::
SegmentInfoCommon
(
ICanonicalUrl
*
parent
)
:
ICanonicalUrl
(
parent
),
Initializable
(),
ICanonicalUrl
(
parent
),
Initializable
(),
Indexable
(),
duration
(
0
),
duration
(
0
),
startIndex
(
0
)
startIndex
(
0
)
{
{
...
...
modules/demux/adaptative/playlist/SegmentInfoCommon.h
View file @
a98cee48
...
@@ -52,6 +52,20 @@ namespace adaptative
...
@@ -52,6 +52,20 @@ namespace adaptative
Property
<
T
*>
initialisationSegment
;
Property
<
T
*>
initialisationSegment
;
};
};
template
<
class
T
>
class
Indexable
{
public:
Indexable
()
{
indexSegment
.
Set
(
NULL
);
}
~
Indexable
()
{
delete
indexSegment
.
Get
();
}
Property
<
T
*>
indexSegment
;
};
class
Timelineable
class
Timelineable
{
{
public:
public:
...
@@ -88,7 +102,8 @@ namespace adaptative
...
@@ -88,7 +102,8 @@ namespace adaptative
};
};
class
SegmentInfoCommon
:
public
ICanonicalUrl
,
class
SegmentInfoCommon
:
public
ICanonicalUrl
,
public
Initializable
<
Segment
>
public
Initializable
<
Segment
>
,
public
Indexable
<
Segment
>
{
{
public:
public:
SegmentInfoCommon
(
ICanonicalUrl
*
parent
=
NULL
);
SegmentInfoCommon
(
ICanonicalUrl
*
parent
=
NULL
);
...
...
modules/demux/adaptative/playlist/SegmentInformation.cpp
View file @
a98cee48
...
@@ -93,6 +93,14 @@ vector<ISegment *> SegmentInformation::getSegments(SegmentInfoType type) const
...
@@ -93,6 +93,14 @@ vector<ISegment *> SegmentInformation::getSegments(SegmentInfoType type) const
}
}
}
}
}
}
break
;
case
INFOTYPE_INDEX
:
{
ISegment
*
segment
=
getSegment
(
INFOTYPE_INDEX
);
if
(
segment
)
retSegments
.
push_back
(
segment
);
}
default:
default:
break
;
break
;
...
@@ -150,7 +158,17 @@ ISegment * SegmentInformation::getSegment(SegmentInfoType type, uint64_t pos) co
...
@@ -150,7 +158,17 @@ ISegment * SegmentInformation::getSegment(SegmentInfoType type, uint64_t pos) co
break
;
break
;
case
INFOTYPE_INDEX
:
case
INFOTYPE_INDEX
:
//returned with media for now;
if
(
segBase
&&
segBase
->
indexSegment
.
Get
()
)
{
segment
=
segBase
->
indexSegment
.
Get
();
}
else
if
(
segList
&&
segList
->
indexSegment
.
Get
()
)
{
segment
=
segList
->
indexSegment
.
Get
();
}
// templated index ?
break
;
default:
default:
break
;
break
;
}
}
...
...
modules/demux/dash/mpd/IsoffMainParser.cpp
View file @
a98cee48
...
@@ -265,9 +265,9 @@ size_t IsoffMainParser::parseSegmentBase(Node * segmentBaseNode, SegmentInformat
...
@@ -265,9 +265,9 @@ size_t IsoffMainParser::parseSegmentBase(Node * segmentBaseNode, SegmentInformat
size_t
start
=
0
,
end
=
0
;
size_t
start
=
0
,
end
=
0
;
if
(
std
::
sscanf
(
segmentBaseNode
->
getAttributeValue
(
"indexRange"
).
c_str
(),
"%zu-%zu"
,
&
start
,
&
end
)
==
2
)
if
(
std
::
sscanf
(
segmentBaseNode
->
getAttributeValue
(
"indexRange"
).
c_str
(),
"%zu-%zu"
,
&
start
,
&
end
)
==
2
)
{
{
seg
=
new
DashIndexSegment
(
info
);
IndexSegment
*
index
=
new
DashIndexSegment
(
info
);
seg
->
setByteRange
(
start
,
end
);
index
->
setByteRange
(
start
,
end
);
list
->
addSegment
(
seg
);
list
->
indexSegment
.
Set
(
index
);
/* index must be before data, so data starts at index end */
/* index must be before data, so data starts at index end */
seg
=
new
Segment
(
info
);
seg
=
new
Segment
(
info
);
seg
->
setByteRange
(
end
+
1
,
0
);
seg
->
setByteRange
(
end
+
1
,
0
);
...
...
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