Commit 476935e1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Dash: C++ sanitization

parent fecd538c
...@@ -33,6 +33,7 @@ namespace dash ...@@ -33,6 +33,7 @@ namespace dash
{ {
public: public:
virtual void downloadRateChanged(long bpsAvg, long bpsLastChunk) = 0; virtual void downloadRateChanged(long bpsAvg, long bpsLastChunk) = 0;
virtual ~IDownloadRateObserver(){}
}; };
} }
} }
......
...@@ -29,9 +29,10 @@ ...@@ -29,9 +29,10 @@
using namespace dash::http; using namespace dash::http;
Chunk::Chunk() Chunk::Chunk() : url()
{
{
startByte = endByte = 0;
} }
Chunk::~Chunk() Chunk::~Chunk()
{ {
......
...@@ -37,6 +37,7 @@ namespace dash ...@@ -37,6 +37,7 @@ namespace dash
public: public:
virtual int read (void *p_buffer, size_t len) = 0; virtual int read (void *p_buffer, size_t len) = 0;
virtual int peek (const uint8_t **pp_peek, size_t i_peek) = 0; virtual int peek (const uint8_t **pp_peek, size_t i_peek) = 0;
virtual ~IHTTPConnection() {}
}; };
} }
} }
......
...@@ -34,10 +34,10 @@ namespace dash ...@@ -34,10 +34,10 @@ namespace dash
class BaseUrl class BaseUrl
{ {
public: public:
BaseUrl (std::string url) { this->url = url; } BaseUrl (const std::string& url) : url(url) {}
virtual ~BaseUrl() {} virtual ~BaseUrl() {}
std::string getUrl() { return this->url; } const std::string& getUrl() const { return this->url; }
private: private:
std::string url; std::string url;
......
...@@ -30,9 +30,8 @@ ...@@ -30,9 +30,8 @@
using namespace dash::mpd; using namespace dash::mpd;
using namespace dash::xml; using namespace dash::xml;
BasicCMParser::BasicCMParser (Node *root) BasicCMParser::BasicCMParser (Node *root) : root(root), mpd(NULL)
{ {
this->root = root;
} }
BasicCMParser::~BasicCMParser () BasicCMParser::~BasicCMParser ()
{ {
......
...@@ -32,6 +32,7 @@ namespace dash ...@@ -32,6 +32,7 @@ namespace dash
virtual Representation* getBestRepresentation (Period *period) = 0; virtual Representation* getBestRepresentation (Period *period) = 0;
virtual std::vector<ISegment *> getSegments (Representation *rep) = 0; virtual std::vector<ISegment *> getSegments (Representation *rep) = 0;
virtual Representation* getRepresentation (Period *period, long bitrate) = 0; virtual Representation* getRepresentation (Period *period, long bitrate) = 0;
virtual ~IMPDManager(){}
}; };
} }
} }
......
...@@ -36,6 +36,7 @@ namespace dash ...@@ -36,6 +36,7 @@ namespace dash
public: public:
virtual bool parse () = 0; virtual bool parse () = 0;
virtual MPD* getMPD () = 0; virtual MPD* getMPD () = 0;
virtual ~IMPDParser(){}
}; };
} }
} }
......
...@@ -37,6 +37,7 @@ namespace dash ...@@ -37,6 +37,7 @@ namespace dash
{ {
public: public:
virtual std::string getSourceUrl() throw(dash::exception::AttributeNotPresentException) = 0; virtual std::string getSourceUrl() throw(dash::exception::AttributeNotPresentException) = 0;
virtual ~ISegment(){}
}; };
} }
} }
......
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