Commit 8cb56514 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

dash: Removing now unused ElementNotPresentException

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 45827b28fe75c1afeb09732b2cab6723adf4bf02)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6f07eccd
......@@ -11,7 +11,6 @@ SOURCES_stream_filter_dash = \
adaptationlogic/RateBasedAdaptationLogic.h \
adaptationlogic/RateBasedAdaptationLogic.cpp \
exceptions/AttributeNotPresentException.h \
exceptions/ElementNotPresentException.h \
exceptions/EOFException.h \
http/Chunk.cpp \
http/Chunk.h \
......
/*
* ElementNotPresentException.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 ELEMENTNOTPRESENTEXCEPTION_H_
#define ELEMENTNOTPRESENTEXCEPTION_H_
#include <stdexcept>
namespace dash
{
namespace exception
{
class ElementNotPresentException : public std::exception
{
public:
ElementNotPresentException() : std::exception() {}
};
}
}
#endif /* ELEMENTNOTPRESENTEXCEPTION_H_ */
......@@ -41,24 +41,14 @@ BasicCMManager::~BasicCMManager ()
std::vector<Segment*> BasicCMManager::getSegments (Representation *rep)
{
std::vector<Segment *> retSegments;
try
{
SegmentInfo* info = rep->getSegmentInfo();
Segment* initSegment = info->getInitSegment();
retSegments.push_back(initSegment);
std::vector<Segment *> segments = info->getSegments();
for(size_t i = 0; i < segments.size(); i++)
retSegments.push_back(segments.at(i));
}
catch(ElementNotPresentException &e)
{
/*TODO Debug */
}
std::vector<Segment *> retSegments;
SegmentInfo* info = rep->getSegmentInfo();
Segment* initSegment = info->getInitSegment();
if ( initSegment )
retSegments.push_back( initSegment );
retSegments.insert( retSegments.end(), info->getSegments().begin(),
info->getSegments().end() );
return retSegments;
}
const std::vector<Period*>& BasicCMManager::getPeriods () const
......
......@@ -37,7 +37,6 @@
#include "mpd/Segment.h"
#include "mpd/IMPDManager.h"
#include "exceptions/AttributeNotPresentException.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash
{
......@@ -49,13 +48,13 @@ namespace dash
BasicCMManager (MPD *mpd);
virtual ~BasicCMManager ();
const std::vector<Period *>& getPeriods () const;
Period* getFirstPeriod ();
Period* getNextPeriod (Period *period);
Representation* getBestRepresentation (Period *period);
std::vector<Segment *> getSegments (Representation *rep);
Representation* getRepresentation (Period *period, long bitrate);
const MPD* getMPD () const;
const std::vector<Period *>& getPeriods() const;
Period* getFirstPeriod();
Period* getNextPeriod( Period *period );
Representation* getBestRepresentation( Period *period );
std::vector<Segment *> getSegments( Representation *rep );
Representation* getRepresentation( Period *period, long bitrate );
const MPD* getMPD() const;
private:
MPD *mpd;
......
......@@ -258,7 +258,7 @@ bool BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
//Init segment is not mandatory.
this->setInitSegment( segmentInfo, info );
//If we don't have any segment, there's no point keeping this SegmentInfo.
if ( this->setSegments(segmentInfo, info ) == false )
if ( this->setSegments( segmentInfo, info ) == false )
{
delete info;
return false;
......
......@@ -33,7 +33,6 @@
#include "mpd/BaseUrl.h"
#include "mpd/ProgramInformation.h"
#include "exceptions/AttributeNotPresentException.h"
#include "exceptions/ElementNotPresentException.h"
#include "mpd/IMPDManager.h"
namespace dash
......
......@@ -29,7 +29,6 @@
#include <map>
#include "exceptions/AttributeNotPresentException.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash
{
......
......@@ -30,7 +30,6 @@
#include "Representation.h"
using namespace dash::mpd;
using namespace dash::exception;
Representation::Representation (const std::map<std::string, std::string>& attributes) :
qualityRanking( -1 ),
......
......@@ -30,7 +30,6 @@
#include "mpd/CommonAttributesElements.h"
#include "mpd/SegmentInfo.h"
#include "mpd/TrickModeType.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash
{
......@@ -55,6 +54,11 @@ namespace dash
void setQualityRanking ( int qualityRanking );
const std::list<const Representation*>& getDependencies() const;
void addDependency ( const Representation* dep );
/**
* @return This SegmentInfo for this Representation.
* It cannot be NULL, or without any Segments in it.
* It can however have a NULL InitSegment
*/
SegmentInfo* getSegmentInfo () const;
TrickModeType* getTrickModeType () const;
......
......@@ -28,7 +28,6 @@
#include "SegmentInfo.h"
using namespace dash::mpd;
using namespace dash::exception;
SegmentInfo::SegmentInfo() :
initSeg( NULL ),
......
......@@ -30,7 +30,6 @@
#include <map>
#include "mpd/Segment.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment