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
22af55ce
Commit
22af55ce
authored
Nov 20, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: dash: add init flag on segments
parent
7081fb2b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
17 deletions
+24
-17
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+3
-3
modules/stream_filter/dash/mpd/BasicCMParser.h
modules/stream_filter/dash/mpd/BasicCMParser.h
+1
-1
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+1
-1
modules/stream_filter/dash/mpd/Representation.cpp
modules/stream_filter/dash/mpd/Representation.cpp
+8
-9
modules/stream_filter/dash/mpd/Segment.cpp
modules/stream_filter/dash/mpd/Segment.cpp
+8
-2
modules/stream_filter/dash/mpd/Segment.h
modules/stream_filter/dash/mpd/Segment.h
+3
-1
No files found.
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
22af55ce
...
@@ -341,7 +341,7 @@ bool BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
...
@@ -341,7 +341,7 @@ bool BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
return
false
;
return
false
;
}
}
Segment
*
BasicCMParser
::
parseSegment
(
Node
*
node
)
Segment
*
BasicCMParser
::
parseSegment
(
Node
*
node
,
bool
init
)
{
{
const
std
::
map
<
std
::
string
,
std
::
string
>
attr
=
node
->
getAttributes
();
const
std
::
map
<
std
::
string
,
std
::
string
>
attr
=
node
->
getAttributes
();
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
...
@@ -368,7 +368,7 @@ Segment* BasicCMParser::parseSegment( Node* node )
...
@@ -368,7 +368,7 @@ Segment* BasicCMParser::parseSegment( Node* node )
seg
=
new
SegmentTemplate
(
runtimeToken
,
this
->
currentRepresentation
);
seg
=
new
SegmentTemplate
(
runtimeToken
,
this
->
currentRepresentation
);
}
}
else
else
seg
=
new
Segment
(
this
->
currentRepresentation
);
seg
=
new
Segment
(
this
->
currentRepresentation
,
init
);
if
(
url
.
find
(
this
->
p_stream
->
psz_access
)
!=
0
)
//Relative url
if
(
url
.
find
(
this
->
p_stream
->
psz_access
)
!=
0
)
//Relative url
url
=
this
->
url
+
url
;
url
=
this
->
url
+
url
;
seg
->
setSourceUrl
(
url
);
seg
->
setSourceUrl
(
url
);
...
@@ -408,7 +408,7 @@ void BasicCMParser::setInitSegment (Node *root, SegmentInfoCommon *info
...
@@ -408,7 +408,7 @@ void BasicCMParser::setInitSegment (Node *root, SegmentInfoCommon *info
" other InitialisationSegmentURL will be dropped."
);
" other InitialisationSegmentURL will be dropped."
);
if
(
initSeg
.
size
()
==
1
)
if
(
initSeg
.
size
()
==
1
)
{
{
Segment
*
seg
=
parseSegment
(
initSeg
.
at
(
0
)
);
Segment
*
seg
=
parseSegment
(
initSeg
.
at
(
0
)
,
true
);
if
(
seg
!=
NULL
)
if
(
seg
!=
NULL
)
info
->
setInitialisationSegment
(
seg
);
info
->
setInitialisationSegment
(
seg
);
}
}
...
...
modules/stream_filter/dash/mpd/BasicCMParser.h
View file @
22af55ce
...
@@ -66,7 +66,7 @@ namespace dash
...
@@ -66,7 +66,7 @@ namespace dash
bool
parseCommonAttributesElements
(
dash
::
xml
::
Node
*
node
,
bool
parseCommonAttributesElements
(
dash
::
xml
::
Node
*
node
,
CommonAttributesElements
*
common
,
CommonAttributesElements
*
common
,
CommonAttributesElements
*
parent
)
const
;
CommonAttributesElements
*
parent
)
const
;
Segment
*
parseSegment
(
xml
::
Node
*
node
);
Segment
*
parseSegment
(
xml
::
Node
*
node
,
bool
init
=
false
);
ProgramInformation
*
parseProgramInformation
();
ProgramInformation
*
parseProgramInformation
();
private:
private:
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
22af55ce
...
@@ -137,7 +137,7 @@ void IsoffMainParser::setInitSegment (dash::xml::Node *segBaseNode, Segme
...
@@ -137,7 +137,7 @@ void IsoffMainParser::setInitSegment (dash::xml::Node *segBaseNode, Segme
if
(
initSeg
.
size
()
>
0
)
if
(
initSeg
.
size
()
>
0
)
{
{
Segment
*
seg
=
new
Segment
(
this
->
currentRepresentation
);
Segment
*
seg
=
new
Segment
(
currentRepresentation
,
true
);
seg
->
setSourceUrl
(
initSeg
.
at
(
0
)
->
getAttributeValue
(
"sourceURL"
));
seg
->
setSourceUrl
(
initSeg
.
at
(
0
)
->
getAttributeValue
(
"sourceURL"
));
if
(
initSeg
.
at
(
0
)
->
hasAttribute
(
"range"
))
if
(
initSeg
.
at
(
0
)
->
hasAttribute
(
"range"
))
...
...
modules/stream_filter/dash/mpd/Representation.cpp
View file @
22af55ce
...
@@ -192,17 +192,16 @@ std::vector<std::string> Representation::toString() const
...
@@ -192,17 +192,16 @@ std::vector<std::string> Representation::toString() const
{
{
std
::
vector
<
std
::
string
>
ret
;
std
::
vector
<
std
::
string
>
ret
;
ret
.
push_back
(
std
::
string
(
" Representation"
));
ret
.
push_back
(
std
::
string
(
" Representation"
));
ret
.
push_back
(
std
::
string
(
" InitSeg url="
)
std
::
vector
<
Segment
*>
list
=
getSegments
();
.
append
(
segmentBase
->
getInitSegment
()
->
getSourceUrl
()))
;
std
::
vector
<
Segment
*>::
const_iterator
l
;
if
(
segmentList
)
for
(
l
=
list
.
begin
();
l
<
list
.
end
();
l
++
)
{
{
std
::
vector
<
Segment
*>::
const_iterator
l
;
if
((
*
l
)
->
isInit
())
for
(
l
=
segmentList
->
getSegments
().
begin
();
ret
.
push_back
(
std
::
string
(
" InitSeg url="
)
l
<
segmentList
->
getSegments
().
end
();
l
++
)
.
append
((
*
l
)
->
getUrlSegment
()));
{
else
ret
.
push_back
(
std
::
string
(
" Segment url="
)
ret
.
push_back
(
std
::
string
(
" Segment url="
)
.
append
((
*
l
)
->
getSourceUrl
()));
.
append
((
*
l
)
->
getUrlSegment
()));
}
}
}
return
ret
;
return
ret
;
}
}
...
...
modules/stream_filter/dash/mpd/Segment.cpp
View file @
22af55ce
...
@@ -33,11 +33,12 @@
...
@@ -33,11 +33,12 @@
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
http
;
using
namespace
dash
::
http
;
Segment
::
Segment
(
const
Representation
*
parent
)
:
Segment
::
Segment
(
const
Representation
*
parent
,
bool
isinit
)
:
ICanonicalUrl
(
parent
),
ICanonicalUrl
(
parent
),
startByte
(
-
1
),
startByte
(
-
1
),
endByte
(
-
1
),
endByte
(
-
1
),
parentRepresentation
(
parent
)
parentRepresentation
(
parent
),
init
(
isinit
)
{
{
assert
(
parent
!=
NULL
);
assert
(
parent
!=
NULL
);
if
(
parent
->
getSegmentInfo
()
!=
NULL
&&
parent
->
getSegmentInfo
()
->
getDuration
()
>=
0
)
if
(
parent
->
getSegmentInfo
()
!=
NULL
&&
parent
->
getSegmentInfo
()
->
getDuration
()
>=
0
)
...
@@ -96,3 +97,8 @@ std::string Segment::getUrlSegment() const
...
@@ -96,3 +97,8 @@ std::string Segment::getUrlSegment() const
ret
.
append
(
sourceUrl
);
ret
.
append
(
sourceUrl
);
return
ret
;
return
ret
;
}
}
bool
Segment
::
isInit
()
const
{
return
init
;
}
modules/stream_filter/dash/mpd/Segment.h
View file @
22af55ce
...
@@ -40,7 +40,7 @@ namespace dash
...
@@ -40,7 +40,7 @@ namespace dash
class
Segment
:
public
ICanonicalUrl
class
Segment
:
public
ICanonicalUrl
{
{
public:
public:
Segment
(
const
Representation
*
parent
);
Segment
(
const
Representation
*
parent
,
bool
isinit
=
false
);
virtual
~
Segment
(){}
virtual
~
Segment
(){}
virtual
void
setSourceUrl
(
const
std
::
string
&
url
);
virtual
void
setSourceUrl
(
const
std
::
string
&
url
);
/**
/**
...
@@ -49,6 +49,7 @@ namespace dash
...
@@ -49,6 +49,7 @@ namespace dash
* when using an UrlTemplate
* when using an UrlTemplate
*/
*/
virtual
bool
isSingleShot
()
const
;
virtual
bool
isSingleShot
()
const
;
virtual
bool
isInit
()
const
;
virtual
void
done
();
virtual
void
done
();
virtual
void
setByteRange
(
int
start
,
int
end
);
virtual
void
setByteRange
(
int
start
,
int
end
);
virtual
dash
::
http
::
Chunk
*
toChunk
();
virtual
dash
::
http
::
Chunk
*
toChunk
();
...
@@ -61,6 +62,7 @@ namespace dash
...
@@ -61,6 +62,7 @@ namespace dash
int
endByte
;
int
endByte
;
const
Representation
*
parentRepresentation
;
const
Representation
*
parentRepresentation
;
int
size
;
int
size
;
bool
init
;
};
};
}
}
}
}
...
...
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