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
54bbf8cf
Commit
54bbf8cf
authored
May 30, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: AdaptationSet is the new Group.
parent
33d29187
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
123 additions
and
222 deletions
+123
-222
modules/stream_filter/dash/Modules.am
modules/stream_filter/dash/Modules.am
+0
-2
modules/stream_filter/dash/mpd/AdaptationSet.cpp
modules/stream_filter/dash/mpd/AdaptationSet.cpp
+60
-4
modules/stream_filter/dash/mpd/AdaptationSet.h
modules/stream_filter/dash/mpd/AdaptationSet.h
+26
-9
modules/stream_filter/dash/mpd/BasicCMManager.cpp
modules/stream_filter/dash/mpd/BasicCMManager.cpp
+6
-6
modules/stream_filter/dash/mpd/BasicCMManager.h
modules/stream_filter/dash/mpd/BasicCMManager.h
+0
-1
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+18
-16
modules/stream_filter/dash/mpd/BasicCMParser.h
modules/stream_filter/dash/mpd/BasicCMParser.h
+5
-5
modules/stream_filter/dash/mpd/Group.cpp
modules/stream_filter/dash/mpd/Group.cpp
+0
-93
modules/stream_filter/dash/mpd/Group.h
modules/stream_filter/dash/mpd/Group.h
+0
-64
modules/stream_filter/dash/mpd/Period.cpp
modules/stream_filter/dash/mpd/Period.cpp
+1
-11
modules/stream_filter/dash/mpd/Period.h
modules/stream_filter/dash/mpd/Period.h
+0
-4
modules/stream_filter/dash/mpd/Representation.cpp
modules/stream_filter/dash/mpd/Representation.cpp
+2
-2
modules/stream_filter/dash/mpd/Representation.h
modules/stream_filter/dash/mpd/Representation.h
+4
-4
modules/stream_filter/dash/mpd/SegmentTemplate.cpp
modules/stream_filter/dash/mpd/SegmentTemplate.cpp
+1
-1
No files found.
modules/stream_filter/dash/Modules.am
View file @
54bbf8cf
...
@@ -32,8 +32,6 @@ SOURCES_stream_filter_dash = \
...
@@ -32,8 +32,6 @@ SOURCES_stream_filter_dash = \
mpd/CommonAttributesElements.h \
mpd/CommonAttributesElements.h \
mpd/ContentDescription.cpp \
mpd/ContentDescription.cpp \
mpd/ContentDescription.h \
mpd/ContentDescription.h \
mpd/Group.cpp \
mpd/Group.h \
mpd/IMPDManager.h \
mpd/IMPDManager.h \
mpd/IMPDParser.h \
mpd/IMPDParser.h \
mpd/IsoffMainParser.cpp \
mpd/IsoffMainParser.cpp \
...
...
modules/stream_filter/dash/mpd/AdaptationSet.cpp
View file @
54bbf8cf
/*
/*
* AdaptationSet.cpp
* AdaptationSet.cpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2010 - 201
2
Klagenfurt University
* Copyright (C) 2010 - 201
1
Klagenfurt University
*
*
* Created on:
Jan 27, 2012
* Created on:
Aug 10, 2010
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
*
...
@@ -28,20 +28,76 @@
...
@@ -28,20 +28,76 @@
#include "AdaptationSet.h"
#include "AdaptationSet.h"
#include <vlc_common.h>
#include <vlc_arrays.h>
#include "SegmentInfoDefault.h"
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
AdaptationSet
::
AdaptationSet
()
:
AdaptationSet
::
AdaptationSet
()
:
isBitstreamSwitching
(
false
)
subsegmentAlignmentFlag
(
false
),
segmentInfoDefault
(
NULL
),
isBitstreamSwitching
(
false
)
{
{
}
}
AdaptationSet
::~
AdaptationSet
()
AdaptationSet
::~
AdaptationSet
()
{
{
delete
this
->
segmentInfoDefault
;
vlc_delete_all
(
this
->
representations
);
}
bool
AdaptationSet
::
getSubsegmentAlignmentFlag
()
const
{
return
this
->
subsegmentAlignmentFlag
;
}
void
AdaptationSet
::
setSubsegmentAlignmentFlag
(
bool
alignment
)
{
this
->
subsegmentAlignmentFlag
=
alignment
;
}
std
::
vector
<
Representation
*>
AdaptationSet
::
getRepresentations
()
{
return
this
->
representations
;
}
const
Representation
*
AdaptationSet
::
getRepresentationById
(
const
std
::
string
&
id
)
const
{
std
::
vector
<
Representation
*>::
const_iterator
it
=
this
->
representations
.
begin
();
std
::
vector
<
Representation
*>::
const_iterator
end
=
this
->
representations
.
end
();
while
(
it
!=
end
)
{
if
(
(
*
it
)
->
getId
()
==
id
)
return
*
it
;
++
it
;
}
return
NULL
;
}
const
SegmentInfoDefault
*
AdaptationSet
::
getSegmentInfoDefault
()
const
{
return
this
->
segmentInfoDefault
;
}
void
AdaptationSet
::
setSegmentInfoDefault
(
const
SegmentInfoDefault
*
seg
)
{
if
(
seg
!=
NULL
)
this
->
segmentInfoDefault
=
seg
;
}
void
AdaptationSet
::
addRepresentation
(
Representation
*
rep
)
{
this
->
representations
.
push_back
(
rep
);
}
}
void
AdaptationSet
::
setBitstreamSwitching
(
bool
value
)
void
AdaptationSet
::
setBitstreamSwitching
(
bool
value
)
{
{
this
->
isBitstreamSwitching
=
value
;
this
->
isBitstreamSwitching
=
value
;
}
}
bool
AdaptationSet
::
getBitstreamSwitching
()
const
bool
AdaptationSet
::
getBitstreamSwitching
()
const
{
{
return
this
->
isBitstreamSwitching
;
return
this
->
isBitstreamSwitching
;
...
...
modules/stream_filter/dash/mpd/AdaptationSet.h
View file @
54bbf8cf
/*
/*
* AdaptationSet.h
* AdaptationSet.h
*****************************************************************************
*****************************************************************************
* Copyright (C) 2010 - 201
2
Klagenfurt University
* Copyright (C) 2010 - 201
1
Klagenfurt University
*
*
* Created on:
Jan 27, 2012
* Created on:
Aug 10, 2010
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
*
...
@@ -25,23 +25,40 @@
...
@@ -25,23 +25,40 @@
#ifndef ADAPTATIONSET_H_
#ifndef ADAPTATIONSET_H_
#define ADAPTATIONSET_H_
#define ADAPTATIONSET_H_
#include "mpd/Group.h"
#include <vector>
#include <string>
#include <map>
#include "mpd/Representation.h"
#include "mpd/CommonAttributesElements.h"
namespace
dash
namespace
dash
{
{
namespace
mpd
namespace
mpd
{
{
class
AdaptationSet
:
public
Group
class
SegmentInfoDefault
;
class
AdaptationSet
:
public
CommonAttributesElements
{
{
public:
public:
AdaptationSet
();
AdaptationSet
();
virtual
~
AdaptationSet
();
virtual
~
AdaptationSet
();
void
setBitstreamSwitching
(
bool
value
);
bool
getSubsegmentAlignmentFlag
()
const
;
bool
getBitstreamSwitching
()
const
;
void
setSubsegmentAlignmentFlag
(
bool
alignment
);
std
::
vector
<
Representation
*>
getRepresentations
();
const
Representation
*
getRepresentationById
(
const
std
::
string
&
id
)
const
;
const
SegmentInfoDefault
*
getSegmentInfoDefault
()
const
;
void
setSegmentInfoDefault
(
const
SegmentInfoDefault
*
seg
);
void
setBitstreamSwitching
(
bool
value
);
bool
getBitstreamSwitching
()
const
;
void
addRepresentation
(
Representation
*
rep
);
private:
private:
bool
isBitstreamSwitching
;
bool
subsegmentAlignmentFlag
;
std
::
vector
<
Representation
*>
representations
;
const
SegmentInfoDefault
*
segmentInfoDefault
;
bool
isBitstreamSwitching
;
};
};
}
}
}
}
...
...
modules/stream_filter/dash/mpd/BasicCMManager.cpp
View file @
54bbf8cf
...
@@ -59,14 +59,14 @@ const std::vector<Period*>& BasicCMManager::getPeriods () const
...
@@ -59,14 +59,14 @@ const std::vector<Period*>& BasicCMManager::getPeriods () const
Representation
*
BasicCMManager
::
getBestRepresentation
(
Period
*
period
)
Representation
*
BasicCMManager
::
getBestRepresentation
(
Period
*
period
)
{
{
std
::
vector
<
Group
*>
groups
=
period
->
getGroup
s
();
std
::
vector
<
AdaptationSet
*>
adaptSet
=
period
->
getAdaptationSet
s
();
uint64_t
bitrate
=
0
;
uint64_t
bitrate
=
0
;
Representation
*
best
=
NULL
;
Representation
*
best
=
NULL
;
for
(
size_t
i
=
0
;
i
<
groups
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
adaptSet
.
size
();
i
++
)
{
{
std
::
vector
<
Representation
*>
reps
=
groups
.
at
(
i
)
->
getRepresentations
();
std
::
vector
<
Representation
*>
reps
=
adaptSet
.
at
(
i
)
->
getRepresentations
();
for
(
size_t
j
=
0
;
j
<
reps
.
size
();
j
++
)
for
(
size_t
j
=
0
;
j
<
reps
.
size
();
j
++
)
{
{
uint64_t
currentBitrate
=
reps
.
at
(
j
)
->
getBandwidth
();
uint64_t
currentBitrate
=
reps
.
at
(
j
)
->
getBandwidth
();
...
@@ -92,13 +92,13 @@ Period* BasicCMManager::getFirstPeriod ()
...
@@ -92,13 +92,13 @@ Period* BasicCMManager::getFirstPeriod ()
Representation
*
BasicCMManager
::
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
)
const
Representation
*
BasicCMManager
::
getRepresentation
(
Period
*
period
,
uint64_t
bitrate
)
const
{
{
std
::
vector
<
Group
*>
groups
=
period
->
getGroup
s
();
std
::
vector
<
AdaptationSet
*>
adaptSet
=
period
->
getAdaptationSet
s
();
Representation
*
best
=
NULL
;
Representation
*
best
=
NULL
;
for
(
size_t
i
=
0
;
i
<
groups
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
adaptSet
.
size
();
i
++
)
{
{
std
::
vector
<
Representation
*>
reps
=
groups
.
at
(
i
)
->
getRepresentations
();
std
::
vector
<
Representation
*>
reps
=
adaptSet
.
at
(
i
)
->
getRepresentations
();
for
(
size_t
j
=
0
;
j
<
reps
.
size
();
j
++
)
for
(
size_t
j
=
0
;
j
<
reps
.
size
();
j
++
)
{
{
uint64_t
currentBitrate
=
reps
.
at
(
j
)
->
getBandwidth
();
uint64_t
currentBitrate
=
reps
.
at
(
j
)
->
getBandwidth
();
...
...
modules/stream_filter/dash/mpd/BasicCMManager.h
View file @
54bbf8cf
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include "mpd/MPD.h"
#include "mpd/MPD.h"
#include "mpd/Period.h"
#include "mpd/Period.h"
#include "mpd/Group.h"
#include "mpd/Representation.h"
#include "mpd/Representation.h"
#include "mpd/SegmentInfo.h"
#include "mpd/SegmentInfo.h"
#include "mpd/Segment.h"
#include "mpd/Segment.h"
...
...
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
54bbf8cf
...
@@ -154,7 +154,7 @@ void BasicCMParser::setPeriods (Node *root)
...
@@ -154,7 +154,7 @@ void BasicCMParser::setPeriods (Node *root)
for
(
size_t
i
=
0
;
i
<
periods
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
{
Period
*
period
=
new
Period
();
Period
*
period
=
new
Period
();
this
->
set
Groups
(
periods
.
at
(
i
),
period
);
this
->
set
AdaptationSet
(
periods
.
at
(
i
),
period
);
this
->
mpd
->
addPeriod
(
period
);
this
->
mpd
->
addPeriod
(
period
);
}
}
}
}
...
@@ -230,7 +230,7 @@ void BasicCMParser::parseSegmentInfoCommon(Node *node, SegmentInfoCommon *segmen
...
@@ -230,7 +230,7 @@ void BasicCMParser::parseSegmentInfoCommon(Node *node, SegmentInfoCommon *segmen
this
->
parseSegmentTimeline
(
node
,
segmentInfo
);
this
->
parseSegmentTimeline
(
node
,
segmentInfo
);
}
}
void
BasicCMParser
::
parseSegmentInfoDefault
(
Node
*
node
,
Group
*
group
)
void
BasicCMParser
::
parseSegmentInfoDefault
(
Node
*
node
,
AdaptationSet
*
group
)
{
{
Node
*
segmentInfoDefaultNode
=
DOMHelper
::
getFirstChildElementByName
(
node
,
"SegmentInfoDefault"
);
Node
*
segmentInfoDefaultNode
=
DOMHelper
::
getFirstChildElementByName
(
node
,
"SegmentInfoDefault"
);
...
@@ -243,25 +243,27 @@ void BasicCMParser::parseSegmentInfoDefault(Node *node, Group *group)
...
@@ -243,25 +243,27 @@ void BasicCMParser::parseSegmentInfoDefault(Node *node, Group *group)
}
}
}
}
void
BasicCMParser
::
set
Groups
(
Node
*
root
,
Period
*
period
)
void
BasicCMParser
::
set
AdaptationSet
(
Node
*
root
,
Period
*
period
)
{
{
std
::
vector
<
Node
*>
groups
=
DOMHelper
::
getElementByTagName
(
root
,
"Group"
,
false
);
std
::
vector
<
Node
*>
adaptSets
=
DOMHelper
::
getElementByTagName
(
root
,
"AdaptationSet"
,
false
);
if
(
adaptSets
.
size
()
==
0
)
//In some old file, AdaptationSet may still be called Group
adaptSets
=
DOMHelper
::
getElementByTagName
(
root
,
"Group"
,
false
);
for
(
size_t
i
=
0
;
i
<
group
s
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
adaptSet
s
.
size
();
i
++
)
{
{
const
std
::
map
<
std
::
string
,
std
::
string
>
attr
=
group
s
.
at
(
i
)
->
getAttributes
();
const
std
::
map
<
std
::
string
,
std
::
string
>
attr
=
adaptSet
s
.
at
(
i
)
->
getAttributes
();
Group
*
group
=
new
Group
;
AdaptationSet
*
adaptSet
=
new
AdaptationSet
;
if
(
this
->
parseCommonAttributesElements
(
groups
.
at
(
i
),
group
,
NULL
)
==
false
)
if
(
this
->
parseCommonAttributesElements
(
adaptSets
.
at
(
i
),
adaptSet
,
NULL
)
==
false
)
{
{
delete
group
;
delete
adaptSet
;
continue
;
continue
;
}
}
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
attr
.
find
(
"subsegmentAlignmentFlag"
);
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
attr
.
find
(
"subsegmentAlignmentFlag"
);
if
(
it
!=
attr
.
end
()
&&
it
->
second
==
"true"
)
if
(
it
!=
attr
.
end
()
&&
it
->
second
==
"true"
)
group
->
setSubsegmentAlignmentFlag
(
true
);
//Otherwise it is false by default.
adaptSet
->
setSubsegmentAlignmentFlag
(
true
);
//Otherwise it is false by default.
this
->
parseSegmentInfoDefault
(
groups
.
at
(
i
),
group
);
this
->
parseSegmentInfoDefault
(
adaptSets
.
at
(
i
),
adaptSet
);
this
->
setRepresentations
(
groups
.
at
(
i
),
group
);
this
->
setRepresentations
(
adaptSets
.
at
(
i
),
adaptSet
);
period
->
add
Group
(
group
);
period
->
add
AdaptationSet
(
adaptSet
);
}
}
}
}
...
@@ -284,7 +286,7 @@ void BasicCMParser::parseTrickMode(Node *node, Representation *repr)
...
@@ -284,7 +286,7 @@ void BasicCMParser::parseTrickMode(Node *node, Representation *repr)
repr
->
setTrickMode
(
trickMode
);
repr
->
setTrickMode
(
trickMode
);
}
}
void
BasicCMParser
::
setRepresentations
(
Node
*
root
,
Group
*
group
)
void
BasicCMParser
::
setRepresentations
(
Node
*
root
,
AdaptationSet
*
group
)
{
{
std
::
vector
<
Node
*>
representations
=
DOMHelper
::
getElementByTagName
(
root
,
"Representation"
,
false
);
std
::
vector
<
Node
*>
representations
=
DOMHelper
::
getElementByTagName
(
root
,
"Representation"
,
false
);
...
@@ -334,7 +336,7 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
...
@@ -334,7 +336,7 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
}
}
}
}
void
BasicCMParser
::
handleDependencyId
(
Representation
*
rep
,
const
Group
*
group
,
const
std
::
string
&
dependencyId
)
void
BasicCMParser
::
handleDependencyId
(
Representation
*
rep
,
const
AdaptationSet
*
adaptationSet
,
const
std
::
string
&
dependencyId
)
{
{
if
(
dependencyId
.
empty
()
==
true
)
if
(
dependencyId
.
empty
()
==
true
)
return
;
return
;
...
@@ -343,7 +345,7 @@ void BasicCMParser::handleDependencyId( Representation *rep, const Group *gro
...
@@ -343,7 +345,7 @@ void BasicCMParser::handleDependencyId( Representation *rep, const Group *gro
{
{
std
::
string
id
;
std
::
string
id
;
s
>>
id
;
s
>>
id
;
const
Representation
*
dep
=
group
->
getRepresentationById
(
id
);
const
Representation
*
dep
=
adaptationSet
->
getRepresentationById
(
id
);
if
(
dep
)
if
(
dep
)
rep
->
addDependency
(
dep
);
rep
->
addDependency
(
dep
);
}
}
...
...
modules/stream_filter/dash/mpd/BasicCMParser.h
View file @
54bbf8cf
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "mpd/IMPDParser.h"
#include "mpd/IMPDParser.h"
#include "mpd/MPD.h"
#include "mpd/MPD.h"
#include "mpd/Period.h"
#include "mpd/Period.h"
#include "mpd/
Group
.h"
#include "mpd/
AdaptationSet
.h"
#include "mpd/Representation.h"
#include "mpd/Representation.h"
#include "mpd/BaseUrl.h"
#include "mpd/BaseUrl.h"
#include "mpd/SegmentInfo.h"
#include "mpd/SegmentInfo.h"
...
@@ -52,17 +52,17 @@ namespace dash
...
@@ -52,17 +52,17 @@ namespace dash
MPD
*
getMPD
();
MPD
*
getMPD
();
private:
private:
void
handleDependencyId
(
Representation
*
rep
,
const
Group
*
group
,
const
std
::
string
&
dependencyId
);
void
handleDependencyId
(
Representation
*
rep
,
const
AdaptationSet
*
adaptationSet
,
const
std
::
string
&
dependencyId
);
private:
private:
bool
setMPD
();
bool
setMPD
();
void
setPeriods
(
dash
::
xml
::
Node
*
root
);
void
setPeriods
(
dash
::
xml
::
Node
*
root
);
void
parseSegmentTimeline
(
xml
::
Node
*
node
,
SegmentInfoCommon
*
segmentInfo
);
void
parseSegmentTimeline
(
xml
::
Node
*
node
,
SegmentInfoCommon
*
segmentInfo
);
void
parseSegmentInfoCommon
(
xml
::
Node
*
node
,
SegmentInfoCommon
*
segmentInfo
);
void
parseSegmentInfoCommon
(
xml
::
Node
*
node
,
SegmentInfoCommon
*
segmentInfo
);
void
parseSegmentInfoDefault
(
xml
::
Node
*
node
,
Group
*
group
);
void
parseSegmentInfoDefault
(
xml
::
Node
*
node
,
AdaptationSet
*
group
);
void
set
Groups
(
dash
::
xml
::
Node
*
root
,
Period
*
period
);
void
set
AdaptationSet
(
dash
::
xml
::
Node
*
root
,
Period
*
period
);
void
parseTrickMode
(
dash
::
xml
::
Node
*
node
,
Representation
*
repr
);
void
parseTrickMode
(
dash
::
xml
::
Node
*
node
,
Representation
*
repr
);
void
setRepresentations
(
dash
::
xml
::
Node
*
root
,
Group
*
group
);
void
setRepresentations
(
dash
::
xml
::
Node
*
root
,
AdaptationSet
*
group
);
bool
setSegmentInfo
(
dash
::
xml
::
Node
*
root
,
Representation
*
rep
);
bool
setSegmentInfo
(
dash
::
xml
::
Node
*
root
,
Representation
*
rep
);
void
setInitSegment
(
dash
::
xml
::
Node
*
root
,
SegmentInfoCommon
*
info
);
void
setInitSegment
(
dash
::
xml
::
Node
*
root
,
SegmentInfoCommon
*
info
);
bool
setSegments
(
dash
::
xml
::
Node
*
root
,
SegmentInfo
*
info
);
bool
setSegments
(
dash
::
xml
::
Node
*
root
,
SegmentInfo
*
info
);
...
...
modules/stream_filter/dash/mpd/Group.cpp
deleted
100644 → 0
View file @
33d29187
/*
* Group.cpp
*****************************************************************************
* Copyright (C) 2010 - 2011 Klagenfurt University
*
* Created on: Aug 10, 2010
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "Group.h"
#include <vlc_common.h>
#include <vlc_arrays.h>
#include "SegmentInfoDefault.h"
using
namespace
dash
::
mpd
;
Group
::
Group
()
:
subsegmentAlignmentFlag
(
false
),
segmentInfoDefault
(
NULL
)
{
}
Group
::~
Group
()
{
delete
this
->
segmentInfoDefault
;
vlc_delete_all
(
this
->
representations
);
}
bool
Group
::
getSubsegmentAlignmentFlag
()
const
{
return
this
->
subsegmentAlignmentFlag
;
}
void
Group
::
setSubsegmentAlignmentFlag
(
bool
alignment
)
{
this
->
subsegmentAlignmentFlag
=
alignment
;
}
std
::
vector
<
Representation
*>
Group
::
getRepresentations
()
{
return
this
->
representations
;
}
const
Representation
*
Group
::
getRepresentationById
(
const
std
::
string
&
id
)
const
{
std
::
vector
<
Representation
*>::
const_iterator
it
=
this
->
representations
.
begin
();
std
::
vector
<
Representation
*>::
const_iterator
end
=
this
->
representations
.
end
();
while
(
it
!=
end
)
{
if
(
(
*
it
)
->
getId
()
==
id
)
return
*
it
;
++
it
;
}
return
NULL
;
}
const
SegmentInfoDefault
*
Group
::
getSegmentInfoDefault
()
const
{
return
this
->
segmentInfoDefault
;
}
void
Group
::
setSegmentInfoDefault
(
const
SegmentInfoDefault
*
seg
)
{
if
(
seg
!=
NULL
)
this
->
segmentInfoDefault
=
seg
;
}
void
Group
::
addRepresentation
(
Representation
*
rep
)
{
this
->
representations
.
push_back
(
rep
);
}
modules/stream_filter/dash/mpd/Group.h
deleted
100644 → 0
View file @
33d29187
/*
* Group.h
*****************************************************************************
* Copyright (C) 2010 - 2011 Klagenfurt University
*
* Created on: Aug 10, 2010
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef GROUP_H_
#define GROUP_H_
#include <vector>
#include <string>
#include <map>
#include "mpd/Representation.h"
#include "mpd/CommonAttributesElements.h"
namespace
dash
{
namespace
mpd
{
class
SegmentInfoDefault
;
class
Group
:
public
CommonAttributesElements
{
public:
Group
();
virtual
~
Group
();
bool
getSubsegmentAlignmentFlag
()
const
;
void
setSubsegmentAlignmentFlag
(
bool
alignment
);
std
::
vector
<
Representation
*>
getRepresentations
();
const
Representation
*
getRepresentationById
(
const
std
::
string
&
id
)
const
;
const
SegmentInfoDefault
*
getSegmentInfoDefault
()
const
;
void
setSegmentInfoDefault
(
const
SegmentInfoDefault
*
seg
);
void
addRepresentation
(
Representation
*
rep
);
private:
bool
subsegmentAlignmentFlag
;
std
::
vector
<
Representation
*>
representations
;
const
SegmentInfoDefault
*
segmentInfoDefault
;
};
}
}
#endif
/* GROUP_H_ */
modules/stream_filter/dash/mpd/Period.cpp
View file @
54bbf8cf
...
@@ -39,19 +39,9 @@ Period::Period()
...
@@ -39,19 +39,9 @@ Period::Period()
Period
::~
Period
()
Period
::~
Period
()
{
{
vlc_delete_all
(
this
->
group
s
);
vlc_delete_all
(
this
->
adaptationSet
s
);
}
}
const
std
::
vector
<
Group
*>&
Period
::
getGroups
()
const
{
return
this
->
groups
;
}
void
Period
::
addGroup
(
Group
*
group
)
{
if
(
group
!=
NULL
)
this
->
groups
.
push_back
(
group
);
}
const
std
::
vector
<
AdaptationSet
*>&
Period
::
getAdaptationSets
()
const
const
std
::
vector
<
AdaptationSet
*>&
Period
::
getAdaptationSets
()
const
{
{
return
this
->
adaptationSets
;
return
this
->
adaptationSets
;
...
...
modules/stream_filter/dash/mpd/Period.h
View file @
54bbf8cf
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
#include "mpd/Group.h"
#include "mpd/AdaptationSet.h"
#include "mpd/AdaptationSet.h"
namespace
dash
namespace
dash
...
@@ -40,13 +39,10 @@ namespace dash
...
@@ -40,13 +39,10 @@ namespace dash
Period
();
Period
();
virtual
~
Period
();
virtual
~
Period
();
const
std
::
vector
<
Group
*>&
getGroups
()
const
;
void
addGroup
(
Group
*
group
);
const
std
::
vector
<
AdaptationSet
*>&
getAdaptationSets
()
const
;
const
std
::
vector
<
AdaptationSet
*>&
getAdaptationSets
()
const
;
void
addAdaptationSet
(
AdaptationSet
*
AdaptationSet
);
void
addAdaptationSet
(
AdaptationSet
*
AdaptationSet
);
private:
private:
std
::
vector
<
Group
*>
groups
;
std
::
vector
<
AdaptationSet
*>
adaptationSets
;
std
::
vector
<
AdaptationSet
*>
adaptationSets
;
};
};
}
}
...
...
modules/stream_filter/dash/mpd/Representation.cpp
View file @
54bbf8cf
...
@@ -87,12 +87,12 @@ void Representation::setTrickMode (TrickModeType *trickMod
...
@@ -87,12 +87,12 @@ void Representation::setTrickMode (TrickModeType *trickMod
this
->
trickModeType
=
trickModeType
;
this
->
trickModeType
=
trickModeType
;
}
}
const
Group
*
Representation
::
getParentGroup
()
const
const
AdaptationSet
*
Representation
::
getParentGroup
()
const
{
{
return
this
->
parentGroup
;
return
this
->
parentGroup
;
}
}
void
Representation
::
setParentGroup
(
const
Group
*
group
)
void
Representation
::
setParentGroup
(
const
AdaptationSet
*
group
)
{
{
if
(
group
!=
NULL
)
if
(
group
!=
NULL
)
this
->
parentGroup
=
group
;
this
->
parentGroup
=
group
;
...
...
modules/stream_filter/dash/mpd/Representation.h
View file @
54bbf8cf
...
@@ -37,7 +37,7 @@ namespace dash
...
@@ -37,7 +37,7 @@ namespace dash
{
{
namespace
mpd
namespace
mpd
{
{
class
Group
;
class
AdaptationSet
;
class
Representation
:
public
CommonAttributesElements
class
Representation
:
public
CommonAttributesElements
{
{
...
@@ -69,8 +69,8 @@ namespace dash
...
@@ -69,8 +69,8 @@ namespace dash
void
setSegmentInfo
(
SegmentInfo
*
info
);
void
setSegmentInfo
(
SegmentInfo
*
info
);
void
setTrickMode
(
TrickModeType
*
trickModeType
);
void
setTrickMode
(
TrickModeType
*
trickModeType
);
const
Group
*
getParentGroup
()
const
;
const
AdaptationSet
*
getParentGroup
()
const
;
void
setParentGroup
(
const
Group
*
group
);
void
setParentGroup
(
const
AdaptationSet
*
group
);
SegmentList
*
getSegmentList
()
const
;
SegmentList
*
getSegmentList
()
const
;
void
setSegmentList
(
SegmentList
*
list
);
void
setSegmentList
(
SegmentList
*
list
);
...
@@ -88,7 +88,7 @@ namespace dash
...
@@ -88,7 +88,7 @@ namespace dash
std
::
list
<
const
Representation
*>
dependencies
;
std
::
list
<
const
Representation
*>
dependencies
;
SegmentInfo
*
segmentInfo
;
SegmentInfo
*
segmentInfo
;
TrickModeType
*
trickModeType
;
TrickModeType
*
trickModeType
;
const
Group
*
parentGroup
;
const
AdaptationSet
*
parentGroup
;
SegmentBase
*
segmentBase
;
SegmentBase
*
segmentBase
;
SegmentList
*
segmentList
;
SegmentList
*
segmentList
;
int
width
;
int
width
;
...
...
modules/stream_filter/dash/mpd/SegmentTemplate.cpp
View file @
54bbf8cf
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "SegmentTemplate.h"
#include "SegmentTemplate.h"
#include "SegmentTimeline.h"
#include "SegmentTimeline.h"
#include "Representation.h"
#include "Representation.h"
#include "
Group
.h"
#include "
AdaptationSet
.h"
#include "SegmentInfoDefault.h"
#include "SegmentInfoDefault.h"
#include <cassert>
#include <cassert>
...
...
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