Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
4a23e2fb
Commit
4a23e2fb
authored
Dec 20, 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: Group element contains the "common" attributes/elements
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
d2b3b804
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
86 deletions
+22
-86
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+5
-0
modules/stream_filter/dash/mpd/Group.cpp
modules/stream_filter/dash/mpd/Group.cpp
+14
-74
modules/stream_filter/dash/mpd/Group.h
modules/stream_filter/dash/mpd/Group.h
+3
-12
No files found.
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
4a23e2fb
...
...
@@ -80,6 +80,11 @@ void BasicCMParser::setGroups (Node *root, Period *period)
for
(
size_t
i
=
0
;
i
<
groups
.
size
();
i
++
)
{
Group
*
group
=
new
Group
(
groups
.
at
(
i
)
->
getAttributes
());
if
(
this
->
parseCommonAttributesElements
(
groups
.
at
(
i
),
group
)
==
false
)
{
delete
group
;
continue
;
}
this
->
setRepresentations
(
groups
.
at
(
i
),
group
);
period
->
addGroup
(
group
);
}
...
...
modules/stream_filter/dash/mpd/Group.cpp
View file @
4a23e2fb
...
...
@@ -27,14 +27,15 @@
using
namespace
dash
::
mpd
;
using
namespace
dash
::
exception
;
Group
::
Group
(
std
::
map
<
std
::
string
,
std
::
string
>
attributes
)
Group
::
Group
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
attributes
)
:
attributes
(
attributes
),
contentProtection
(
NULL
),
accessibility
(
NULL
),
viewpoint
(
NULL
),
rating
(
NULL
)
{
this
->
attributes
=
attributes
;
this
->
contentProtection
=
NULL
;
this
->
accessibility
=
NULL
;
this
->
viewpoint
=
NULL
;
this
->
rating
=
NULL
;
}
Group
::~
Group
()
{
for
(
size_t
i
=
1
;
i
<
this
->
representations
.
size
();
i
++
)
...
...
@@ -46,55 +47,6 @@ Group::~Group ()
delete
(
this
->
accessibility
);
}
std
::
string
Group
::
getWidth
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"width"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"width"
];
}
std
::
string
Group
::
getNumberOfChannels
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"numberOfChannels"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"numberOfChannels"
];
}
std
::
string
Group
::
getLang
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"lang"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"lang"
];
}
std
::
string
Group
::
getParY
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"pary"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"pary"
];
}
std
::
string
Group
::
getParX
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"parx"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"parx"
];
}
std
::
string
Group
::
getSamplingRate
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"samplingRate"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"samplingRate"
];
}
std
::
string
Group
::
getMimeType
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"mimeType"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"mimeType"
];
}
std
::
string
Group
::
getSubSegmentAlignment
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"subsegmentAlignmentFlag"
)
==
this
->
attributes
.
end
())
...
...
@@ -102,20 +54,7 @@ std::string Group::getSubSegmentAlignment () throw(Attribu
return
this
->
attributes
[
"subsegmentAlignmentFlag"
];
}
std
::
string
Group
::
getFrameRate
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"frameRate"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"frameRate"
];
}
std
::
string
Group
::
getHeight
()
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"height"
)
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"height"
];
}
Viewpoint
*
Group
::
getViewpoint
()
throw
(
ElementNotPresentException
)
{
if
(
this
->
viewpoint
==
NULL
)
...
...
@@ -123,6 +62,7 @@ Viewpoint* Group::getViewpoint () throw(Element
return
this
->
viewpoint
;
}
Rating
*
Group
::
getRating
()
throw
(
ElementNotPresentException
)
{
if
(
this
->
rating
==
NULL
)
...
...
@@ -130,6 +70,7 @@ Rating* Group::getRating () throw(Element
return
this
->
rating
;
}
Accessibility
*
Group
::
getAccessibility
()
throw
(
ElementNotPresentException
)
{
if
(
this
->
accessibility
==
NULL
)
...
...
@@ -137,33 +78,32 @@ Accessibility* Group::getAccessibility () throw(Element
return
this
->
accessibility
;
}
ContentProtection
*
Group
::
getContentProtection
()
throw
(
ElementNotPresentException
)
{
if
(
this
->
contentProtection
==
NULL
)
throw
ElementNotPresentException
();
return
this
->
contentProtection
;
}
std
::
vector
<
Representation
*>
Group
::
getRepresentations
()
{
return
this
->
representations
;
}
void
Group
::
addRepresentation
(
Representation
*
rep
)
{
this
->
representations
.
push_back
(
rep
);
}
void
Group
::
setRating
(
Rating
*
rating
)
{
this
->
rating
=
rating
;
}
void
Group
::
setContentProtection
(
ContentProtection
*
protection
)
{
this
->
contentProtection
=
protection
;
}
void
Group
::
setAccessibility
(
Accessibility
*
accessibility
)
{
this
->
accessibility
=
accessibility
;
}
void
Group
::
setViewpoint
(
Viewpoint
*
viewpoint
)
{
this
->
viewpoint
=
viewpoint
;
...
...
modules/stream_filter/dash/mpd/Group.h
View file @
4a23e2fb
...
...
@@ -30,6 +30,7 @@
#include <map>
#include "mpd/Representation.h"
#include "mpd/CommonAttributesElements.h"
#include "mpd/ContentProtection.h"
#include "mpd/Accessibility.h"
#include "mpd/Viewpoint.h"
...
...
@@ -41,25 +42,15 @@ namespace dash
{
namespace
mpd
{
class
Group
class
Group
:
public
CommonAttributesElements
{
public:
Group
(
std
::
map
<
std
::
string
,
std
::
string
>
attributes
);
Group
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
attributes
);
virtual
~
Group
();
std
::
string
getWidth
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getHeight
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getParX
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getParY
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getLang
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getMimeType
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getFrameRate
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getNumberOfChannels
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getSamplingRate
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getSubSegmentAlignment
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
vector
<
Representation
*>
getRepresentations
();
Viewpoint
*
getViewpoint
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
ContentProtection
*
getContentProtection
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
Accessibility
*
getAccessibility
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
Rating
*
getRating
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
...
...
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