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
8f9fd197
Commit
8f9fd197
authored
Dec 21, 2011
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Dec 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: BasicCMParser: Handle Representation @dependencyId
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
05890451
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
12 deletions
+38
-12
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+21
-2
modules/stream_filter/dash/mpd/BasicCMParser.h
modules/stream_filter/dash/mpd/BasicCMParser.h
+3
-0
modules/stream_filter/dash/mpd/Representation.cpp
modules/stream_filter/dash/mpd/Representation.cpp
+11
-9
modules/stream_filter/dash/mpd/Representation.h
modules/stream_filter/dash/mpd/Representation.h
+3
-1
No files found.
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
8f9fd197
...
@@ -99,7 +99,6 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
...
@@ -99,7 +99,6 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
{
{
const
std
::
map
<
std
::
string
,
std
::
string
>
attributes
=
representations
.
at
(
i
)
->
getAttributes
();
const
std
::
map
<
std
::
string
,
std
::
string
>
attributes
=
representations
.
at
(
i
)
->
getAttributes
();
//FIXME: handle @dependencyId afterward
Representation
*
rep
=
new
Representation
(
attributes
);
Representation
*
rep
=
new
Representation
(
attributes
);
if
(
this
->
parseCommonAttributesElements
(
representations
.
at
(
i
),
rep
)
==
false
)
if
(
this
->
parseCommonAttributesElements
(
representations
.
at
(
i
),
rep
)
==
false
)
{
{
...
@@ -130,11 +129,31 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
...
@@ -130,11 +129,31 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
if
(
it
!=
attributes
.
end
()
)
if
(
it
!=
attributes
.
end
()
)
rep
->
setQualityRanking
(
atoi
(
it
->
second
.
c_str
()
)
);
rep
->
setQualityRanking
(
atoi
(
it
->
second
.
c_str
()
)
);
it
=
attributes
.
find
(
"dependencyId"
);
if
(
it
!=
attributes
.
end
()
)
this
->
handleDependencyId
(
rep
,
group
,
it
->
second
);
this
->
setSegmentInfo
(
representations
.
at
(
i
),
rep
);
this
->
setSegmentInfo
(
representations
.
at
(
i
),
rep
);
if
(
rep
->
getSegmentInfo
()
&&
rep
->
getSegmentInfo
()
->
getSegments
().
size
()
>
0
)
if
(
rep
->
getSegmentInfo
()
&&
rep
->
getSegmentInfo
()
->
getSegments
().
size
()
>
0
)
group
->
addRepresentation
(
rep
);
group
->
addRepresentation
(
rep
);
}
}
void
BasicCMParser
::
handleDependencyId
(
Representation
*
rep
,
const
Group
*
group
,
const
std
::
string
&
dependencyId
)
{
if
(
dependencyId
.
empty
()
==
true
)
return
;
std
::
istringstream
s
(
dependencyId
);
while
(
s
)
{
std
::
string
id
;
s
>>
id
;
const
Representation
*
dep
=
group
->
getRepresentationById
(
id
);
if
(
dep
)
rep
->
addDependency
(
dep
);
}
}
}
}
void
BasicCMParser
::
setSegmentInfo
(
Node
*
root
,
Representation
*
rep
)
void
BasicCMParser
::
setSegmentInfo
(
Node
*
root
,
Representation
*
rep
)
{
{
Node
*
segmentInfo
=
DOMHelper
::
getFirstChildElementByName
(
root
,
"SegmentInfo"
);
Node
*
segmentInfo
=
DOMHelper
::
getFirstChildElementByName
(
root
,
"SegmentInfo"
);
...
...
modules/stream_filter/dash/mpd/BasicCMParser.h
View file @
8f9fd197
...
@@ -50,6 +50,9 @@ namespace dash
...
@@ -50,6 +50,9 @@ namespace dash
bool
parse
();
bool
parse
();
MPD
*
getMPD
();
MPD
*
getMPD
();
private:
void
handleDependencyId
(
Representation
*
rep
,
const
Group
*
group
,
const
std
::
string
&
dependencyId
);
private:
private:
dash
::
xml
::
Node
*
root
;
dash
::
xml
::
Node
*
root
;
MPD
*
mpd
;
MPD
*
mpd
;
...
...
modules/stream_filter/dash/mpd/Representation.cpp
View file @
8f9fd197
...
@@ -46,15 +46,6 @@ Representation::~Representation ()
...
@@ -46,15 +46,6 @@ Representation::~Representation ()
delete
(
this
->
trickModeType
);
delete
(
this
->
trickModeType
);
}
}
std
::
string
Representation
::
getDependencyId
()
const
throw
(
AttributeNotPresentException
)
{
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"dependencyId"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
it
->
second
;
}
const
std
::
string
&
Representation
::
getId
()
const
const
std
::
string
&
Representation
::
getId
()
const
{
{
return
this
->
id
;
return
this
->
id
;
...
@@ -116,3 +107,14 @@ void Representation::setQualityRanking( int qualityRanking )
...
@@ -116,3 +107,14 @@ void Representation::setQualityRanking( int qualityRanking )
if
(
qualityRanking
>
0
)
if
(
qualityRanking
>
0
)
this
->
qualityRanking
=
qualityRanking
;
this
->
qualityRanking
=
qualityRanking
;
}
}
const
std
::
list
<
const
Representation
*>&
Representation
::
getDependencies
()
const
{
return
this
->
dependencies
;
}
void
Representation
::
addDependency
(
const
Representation
*
dep
)
{
if
(
dep
!=
NULL
)
this
->
dependencies
.
push_back
(
dep
);
}
modules/stream_filter/dash/mpd/Representation.h
View file @
8f9fd197
...
@@ -55,7 +55,8 @@ namespace dash
...
@@ -55,7 +55,8 @@ namespace dash
void
setBandwidth
(
int
bandwidth
);
void
setBandwidth
(
int
bandwidth
);
int
getQualityRanking
()
const
;
int
getQualityRanking
()
const
;
void
setQualityRanking
(
int
qualityRanking
);
void
setQualityRanking
(
int
qualityRanking
);
std
::
string
getDependencyId
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
const
std
::
list
<
const
Representation
*>&
getDependencies
()
const
;
void
addDependency
(
const
Representation
*
dep
);
SegmentInfo
*
getSegmentInfo
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
SegmentInfo
*
getSegmentInfo
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
TrickModeType
*
getTrickModeType
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
TrickModeType
*
getTrickModeType
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
...
@@ -67,6 +68,7 @@ namespace dash
...
@@ -67,6 +68,7 @@ namespace dash
int
bandwidth
;
int
bandwidth
;
std
::
string
id
;
std
::
string
id
;
int
qualityRanking
;
int
qualityRanking
;
std
::
list
<
const
Representation
*>
dependencies
;
std
::
map
<
std
::
string
,
std
::
string
>
attributes
;
std
::
map
<
std
::
string
,
std
::
string
>
attributes
;
SegmentInfo
*
segmentInfo
;
SegmentInfo
*
segmentInfo
;
TrickModeType
*
trickModeType
;
TrickModeType
*
trickModeType
;
...
...
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