3 *****************************************************************************
4 * Copyright (C) 2010 - 2011 Klagenfurt University
6 * Created on: Aug 10, 2010
7 * Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
8 * Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published
12 * by the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
30 using namespace dash::mpd;
33 profile( dash::mpd::Profile::Unknown ),
35 availabilityStartTime( -1 ),
36 availabilityEndTime( -1 ),
38 minUpdatePeriod( -1 ),
40 timeShiftBufferDepth( -1 ),
47 for(size_t i = 0; i < this->periods.size(); i++)
48 delete(this->periods.at(i));
50 for(size_t i = 0; i < this->baseUrls.size(); i++)
51 delete(this->baseUrls.at(i));
53 delete(this->programInfo);
56 const std::vector<Period*>& MPD::getPeriods () const
61 const std::vector<BaseUrl*>& MPD::getBaseUrls () const
63 return this->baseUrls;
67 time_t MPD::getDuration() const
69 return this->duration;
72 void MPD::setDuration(time_t duration)
75 this->duration = duration;
78 time_t MPD::getMinUpdatePeriod() const
80 return this->minUpdatePeriod;
83 void MPD::setMinUpdatePeriod(time_t period)
86 this->minUpdatePeriod = period;
89 time_t MPD::getMinBufferTime() const
91 return this->minBufferTime;
94 void MPD::setMinBufferTime(time_t time)
97 this->minBufferTime = time;
100 time_t MPD::getTimeShiftBufferDepth() const
102 return this->timeShiftBufferDepth;
105 void MPD::setTimeShiftBufferDepth(time_t depth)
108 this->timeShiftBufferDepth = depth;
111 const ProgramInformation* MPD::getProgramInformation () const
113 return this->programInfo;
116 void MPD::addBaseUrl (BaseUrl *url)
118 this->baseUrls.push_back(url);
120 void MPD::addPeriod (Period *period)
122 this->periods.push_back(period);
124 void MPD::setProgramInformation (ProgramInformation *progInfo)
126 this->programInfo = progInfo;
129 bool MPD::isLive() const
134 void MPD::setLive( bool live )
139 time_t MPD::getAvailabilityStartTime() const
141 return this->availabilityStartTime;
144 void MPD::setAvailabilityStartTime(time_t time)
147 this->availabilityStartTime = time;
150 time_t MPD::getAvailabilityEndTime() const
152 return this->availabilityEndTime;
155 void MPD::setAvailabilityEndTime(time_t time)
158 this->availabilityEndTime = time;
161 Profile::Name MPD::getProfile() const
163 return this->profile;
166 void MPD::setProfile(Profile::Name profile)
168 this->profile = profile;