Commit 45827b28 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>
parent 3319c47e
...@@ -11,7 +11,6 @@ SOURCES_stream_filter_dash = \ ...@@ -11,7 +11,6 @@ SOURCES_stream_filter_dash = \
adaptationlogic/RateBasedAdaptationLogic.h \ adaptationlogic/RateBasedAdaptationLogic.h \
adaptationlogic/RateBasedAdaptationLogic.cpp \ adaptationlogic/RateBasedAdaptationLogic.cpp \
exceptions/AttributeNotPresentException.h \ exceptions/AttributeNotPresentException.h \
exceptions/ElementNotPresentException.h \
exceptions/EOFException.h \ exceptions/EOFException.h \
http/Chunk.cpp \ http/Chunk.cpp \
http/Chunk.h \ 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 () ...@@ -41,24 +41,14 @@ BasicCMManager::~BasicCMManager ()
std::vector<Segment*> BasicCMManager::getSegments (Representation *rep) std::vector<Segment*> BasicCMManager::getSegments (Representation *rep)
{ {
std::vector<Segment *> retSegments; std::vector<Segment *> retSegments;
try SegmentInfo* info = rep->getSegmentInfo();
{ Segment* initSegment = info->getInitSegment();
SegmentInfo* info = rep->getSegmentInfo();
Segment* initSegment = info->getInitSegment(); if ( initSegment )
retSegments.push_back( initSegment );
retSegments.push_back(initSegment); retSegments.insert( retSegments.end(), info->getSegments().begin(),
info->getSegments().end() );
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 */
}
return retSegments; return retSegments;
} }
const std::vector<Period*>& BasicCMManager::getPeriods () const const std::vector<Period*>& BasicCMManager::getPeriods () const
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "mpd/Segment.h" #include "mpd/Segment.h"
#include "mpd/IMPDManager.h" #include "mpd/IMPDManager.h"
#include "exceptions/AttributeNotPresentException.h" #include "exceptions/AttributeNotPresentException.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash namespace dash
{ {
...@@ -49,13 +48,13 @@ namespace dash ...@@ -49,13 +48,13 @@ namespace dash
BasicCMManager (MPD *mpd); BasicCMManager (MPD *mpd);
virtual ~BasicCMManager (); virtual ~BasicCMManager ();
const std::vector<Period *>& getPeriods () const; const std::vector<Period *>& getPeriods() const;
Period* getFirstPeriod (); Period* getFirstPeriod();
Period* getNextPeriod (Period *period); Period* getNextPeriod( Period *period );
Representation* getBestRepresentation (Period *period); Representation* getBestRepresentation( Period *period );
std::vector<Segment *> getSegments (Representation *rep); std::vector<Segment *> getSegments( Representation *rep );
Representation* getRepresentation (Period *period, long bitrate); Representation* getRepresentation( Period *period, long bitrate );
const MPD* getMPD () const; const MPD* getMPD() const;
private: private:
MPD *mpd; MPD *mpd;
......
...@@ -258,7 +258,7 @@ bool BasicCMParser::setSegmentInfo (Node *root, Representation *rep) ...@@ -258,7 +258,7 @@ bool BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
//Init segment is not mandatory. //Init segment is not mandatory.
this->setInitSegment( segmentInfo, info ); this->setInitSegment( segmentInfo, info );
//If we don't have any segment, there's no point keeping this SegmentInfo. //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; delete info;
return false; return false;
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "mpd/BaseUrl.h" #include "mpd/BaseUrl.h"
#include "mpd/ProgramInformation.h" #include "mpd/ProgramInformation.h"
#include "exceptions/AttributeNotPresentException.h" #include "exceptions/AttributeNotPresentException.h"
#include "exceptions/ElementNotPresentException.h"
#include "mpd/IMPDManager.h" #include "mpd/IMPDManager.h"
namespace dash namespace dash
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <map> #include <map>
#include "exceptions/AttributeNotPresentException.h" #include "exceptions/AttributeNotPresentException.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash namespace dash
{ {
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "Representation.h" #include "Representation.h"
using namespace dash::mpd; using namespace dash::mpd;
using namespace dash::exception;
Representation::Representation (const std::map<std::string, std::string>& attributes) : Representation::Representation (const std::map<std::string, std::string>& attributes) :
qualityRanking( -1 ), qualityRanking( -1 ),
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "mpd/CommonAttributesElements.h" #include "mpd/CommonAttributesElements.h"
#include "mpd/SegmentInfo.h" #include "mpd/SegmentInfo.h"
#include "mpd/TrickModeType.h" #include "mpd/TrickModeType.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash namespace dash
{ {
...@@ -55,6 +54,11 @@ namespace dash ...@@ -55,6 +54,11 @@ namespace dash
void setQualityRanking ( int qualityRanking ); void setQualityRanking ( int qualityRanking );
const std::list<const Representation*>& getDependencies() const; const std::list<const Representation*>& getDependencies() const;
void addDependency ( const Representation* dep ); 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; SegmentInfo* getSegmentInfo () const;
TrickModeType* getTrickModeType () const; TrickModeType* getTrickModeType () const;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "SegmentInfo.h" #include "SegmentInfo.h"
using namespace dash::mpd; using namespace dash::mpd;
using namespace dash::exception;
SegmentInfo::SegmentInfo() : SegmentInfo::SegmentInfo() :
initSeg( NULL ), initSeg( NULL ),
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <map> #include <map>
#include "mpd/Segment.h" #include "mpd/Segment.h"
#include "exceptions/ElementNotPresentException.h"
namespace dash 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