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
b4d90eb2
Commit
b4d90eb2
authored
Nov 30, 2011
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Dec 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Representation: Cosmetics.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
3852dd54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
56 deletions
+68
-56
modules/stream_filter/dash/mpd/Representation.cpp
modules/stream_filter/dash/mpd/Representation.cpp
+53
-41
modules/stream_filter/dash/mpd/Representation.h
modules/stream_filter/dash/mpd/Representation.h
+15
-15
No files found.
modules/stream_filter/dash/mpd/Representation.cpp
View file @
b4d90eb2
...
...
@@ -30,13 +30,14 @@
using
namespace
dash
::
mpd
;
using
namespace
dash
::
exception
;
Representation
::
Representation
(
std
::
map
<
std
::
string
,
std
::
string
>
attributes
)
Representation
::
Representation
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
attributes
)
:
attributes
(
attributes
),
segmentInfo
(
NULL
),
trickModeType
(
NULL
),
contentProtection
(
NULL
)
{
this
->
attributes
=
attributes
;
this
->
contentProtection
=
NULL
;
this
->
trickModeType
=
NULL
;
this
->
segmentInfo
=
NULL
;
}
Representation
::~
Representation
()
{
delete
(
this
->
segmentInfo
);
...
...
@@ -44,109 +45,120 @@ Representation::~Representation ()
delete
(
this
->
trickModeType
);
}
std
::
string
Representation
::
getFrameRate
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getFrameRate
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"frameRate"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"frameRate"
);
if
(
it
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"frameRate"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getSamplingRate
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getSamplingRate
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"samplingRate"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"samplingRate"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"samplingRate"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getDependencyId
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getDependencyId
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"dependencyId"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"dependencyId"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"dependencyId"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getId
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getId
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"id"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"id"
);
if
(
it
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"id"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getLang
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getLang
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"lang"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"lang"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"lang"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getParX
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getParX
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"parx"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"parx"
);
if
(
it
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"parx"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getParY
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getParY
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"pary"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"pary"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"pary"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getHeight
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getHeight
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"height"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"height"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"height"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getWidth
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getWidth
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"width"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"width"
);
if
(
it
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"width"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getBandwidth
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getBandwidth
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"bandwidth"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"bandwidth"
);
if
(
it
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"bandwidth"
]
;
return
it
->
second
;
}
std
::
string
Representation
::
getNumberOfChannels
()
throw
(
AttributeNotPresentException
)
std
::
string
Representation
::
getNumberOfChannels
()
const
throw
(
AttributeNotPresentException
)
{
if
(
this
->
attributes
.
find
(
"numberOfChannels"
)
==
this
->
attributes
.
end
())
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"numberOfChannels"
);
if
(
it
==
this
->
attributes
.
end
()
)
throw
AttributeNotPresentException
();
return
this
->
attributes
[
"numberOfChannels"
]
;
return
it
->
second
;
}
SegmentInfo
*
Representation
::
getSegmentInfo
()
throw
(
ElementNotPresentException
)
SegmentInfo
*
Representation
::
getSegmentInfo
()
const
throw
(
ElementNotPresentException
)
{
if
(
this
->
segmentInfo
==
NULL
)
throw
ElementNotPresentException
();
return
this
->
segmentInfo
;
}
TrickModeType
*
Representation
::
getTrickModeType
()
throw
(
ElementNotPresentException
)
TrickModeType
*
Representation
::
getTrickModeType
()
const
throw
(
ElementNotPresentException
)
{
if
(
this
->
segmentInfo
==
NULL
)
throw
ElementNotPresentException
();
return
this
->
trickModeType
;
}
ContentProtection
*
Representation
::
getContentProtection
()
throw
(
ElementNotPresentException
)
ContentProtection
*
Representation
::
getContentProtection
()
const
throw
(
ElementNotPresentException
)
{
if
(
this
->
contentProtection
==
NULL
)
throw
ElementNotPresentException
();
...
...
modules/stream_filter/dash/mpd/Representation.h
View file @
b4d90eb2
...
...
@@ -42,23 +42,23 @@ namespace dash
class
Representation
{
public:
Representation
(
std
::
map
<
std
::
string
,
std
::
string
>
attributes
);
Representation
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
attributes
);
virtual
~
Representation
();
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
getFrameRate
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getId
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getBandwidth
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getDependencyId
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getNumberOfChannels
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getSamplingRate
()
throw
(
dash
::
exception
::
AttributeNotPresentException
);
SegmentInfo
*
getSegmentInfo
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
TrickModeType
*
getTrickModeType
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
ContentProtection
*
getContentProtection
()
throw
(
dash
::
exception
::
ElementNotPresentException
);
std
::
string
getWidth
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getHeight
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getParX
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getParY
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getLang
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getFrameRate
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getId
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getBandwidth
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getDependencyId
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getNumberOfChannels
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getSamplingRate
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
SegmentInfo
*
getSegmentInfo
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
TrickModeType
*
getTrickModeType
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
ContentProtection
*
getContentProtection
()
const
throw
(
dash
::
exception
::
ElementNotPresentException
);
void
setSegmentInfo
(
SegmentInfo
*
info
);
void
setTrickModeType
(
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