return retSegments;
}
-std::vector<Period*> BasicCMManager::getPeriods ()
+const std::vector<Period*>& BasicCMManager::getPeriods () const
{
return this->mpd->getPeriods();
}
+
Representation* BasicCMManager::getBestRepresentation (Period *period)
{
std::vector<Group *> groups = period->getGroups();
BasicCMManager (MPD *mpd);
virtual ~BasicCMManager ();
- std::vector<Period *> getPeriods ();
+ const std::vector<Period *>& getPeriods () const;
Period* getFirstPeriod ();
Period* getNextPeriod (Period *period);
Representation* getBestRepresentation (Period *period);
class IMPDManager
{
public:
- virtual std::vector<Period *> getPeriods () = 0;
+ virtual const std::vector<Period *>& getPeriods () const = 0;
virtual Period* getFirstPeriod () = 0;
virtual Period* getNextPeriod (Period *period) = 0;
virtual Representation* getBestRepresentation (Period *period) = 0;
{
}
-std::vector<Period *> NullManager::getPeriods ()
+const std::vector<Period *>& NullManager::getPeriods () const
{
- return std::vector<Period *>();
+ return this->periods;
}
Period* NullManager::getFirstPeriod ()
{
}
std::vector<ISegment *> NullManager::getSegments (Representation *)
{
- return std::vector<ISegment *>();
+ return this->segments;
}
Representation* NullManager::getRepresentation (Period *, long )
{
NullManager ();
virtual ~NullManager();
- std::vector<Period *> getPeriods ();
+ const std::vector<Period *>& getPeriods () const;
Period* getFirstPeriod ();
Period* getNextPeriod (Period *period);
Representation* getBestRepresentation (Period *period);
std::vector<ISegment *> getSegments (Representation *rep);
Representation* getRepresentation (Period *period, long bitrate);
+
+ private:
+ std::vector<Period *> periods;
+ std::vector<ISegment *> segments;
};
}
}