Corrected typo 15/7315/1
authorJacques Samain <[email protected]>
Mon, 26 Jun 2017 12:11:58 +0000 (14:11 +0200)
committerJacques Samain <[email protected]>
Mon, 26 Jun 2017 12:11:58 +0000 (14:11 +0200)
Change-Id: I85fa9fd7adedcd26cf866847b3c747f99a14f2c3
Signed-off-by: Jacques Samain <[email protected]>
21 files changed:
Input/DASHManager.cpp
Input/DASHManager.h
Input/DASHReceiver.cpp
Input/DASHReceiver.h
MPD/AbstractRepresentationStream.cpp
MPD/AbstractRepresentationStream.h
MPD/IMPDWrapper.h
MPD/IRepresentationStream.h
MPD/MPDWrapper.cpp
MPD/SegmentTemplateStream.cpp
MPD/SegmentTemplateStream.h
Managers/MultimediaManager.cpp
Managers/MultimediaStream.h
UI/DASHPlayer.cpp
libdash/include/ISegmentTemplate.h
libdash/include/ITimeline.h
libdash/source/mpd/SegmentTemplate.cpp
libdash/source/mpd/SegmentTemplate.h
libdash/source/mpd/Timeline.cpp
libdash/source/mpd/Timeline.h
libdash/source/xml/Node.cpp

index 3377c1a..a771572 100644 (file)
@@ -160,7 +160,6 @@ void DASHManager::onBufferStateChanged(BufferType type, uint32_t fillstateInPerc
     if(this->adaptationLogic->isBufferBased())
         this->receiver->OnSegmentBufferStateChanged(fillstateInPercent, maxC);
 }
-
 void DASHManager::fetchMPD()
 {
     this->multimediaStream->fetchMPD();
index c2b4a88..4bd301e 100644 (file)
@@ -42,11 +42,10 @@ public:
     bool start();
     void stop();
     uint32_t getPosition();
-    void setPosition(uint32_t segmentNumber); // to implement
+    void setPosition(uint32_t segmentNumber);
     void setLooping(bool looping);
     void setPositionInMsec(uint32_t millisec);
     void clear();
-//    void setRepresentation(dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
     void setRepresentation();
     void enqueueRepresentation(dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
 
@@ -65,17 +64,17 @@ public:
     void fetchMPD();
 
 private:
-    float                                              beta;
-    float                                              drop;
-    buffer::Buffer<MediaObject>                                *buffer;
-    DASHReceiver                                       *receiver;
-    uint32_t                                           readSegmentCount;
-    IDASHManagerObserver                               *multimediaStream;
-    bool                                               isRunning;
-    bool                                               icn;
-    double                                             icnAlpha;
-    bool                                               noDecoding;
-    libdash::framework::adaptation::IAdaptationLogic   *adaptationLogic;
+    float                                               beta;
+    float                                               drop;
+    buffer::Buffer<MediaObject>                         *buffer;
+    DASHReceiver                                        *receiver;
+    uint32_t                                            readSegmentCount;
+    IDASHManagerObserver                                *multimediaStream;
+    bool                                                isRunning;
+    bool                                                icn;
+    double                                              icnAlpha;
+    bool                                                noDecoding;
+    libdash::framework::adaptation::IAdaptationLogic    *adaptationLogic;
 };
 }
 }
index c6dafb9..c1f1acc 100644 (file)
@@ -22,11 +22,7 @@ using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >;
 DASHReceiver::DASHReceiver          (viper::managers::StreamType type, MPDWrapper *mpdWrapper, IDASHReceiverObserver *obs, Buffer<MediaObject> *buffer, uint32_t bufferSize, bool icnEnabled, double icnAlpha, float beta, float drop) :
     type                        (type),
     mpdWrapper                  (mpdWrapper),
-//    period                    (NULL),
-//    adaptationSet             (NULL),
-//    representation            (NULL),
     adaptationSetStream         (NULL),
-//    representationStream      (NULL),
     segmentNumber               (0),
     observer                    (obs),
     buffer                      (buffer),
@@ -51,14 +47,8 @@ DASHReceiver::DASHReceiver          (viper::managers::StreamType type, MPDWrappe
 {
     readMax = 32768;
     readBuffer = (uint8_t*)malloc(sizeof(uint8_t)*readMax);
-//    this->period = this->mpd->GetPeriods().at(0);
-//    this->adaptationSet = this->period->GetAdaptationSets().at(0);
-//    this->representation = this->adaptationSet->GetRepresentation().at(0);
-
     this->adaptationSetStream = new AdaptationSetStream(type, mpdWrapper);
-//    this->representationStream = adaptationSetStream->getRepresentationStream(this->representation);
     this->segmentOffset = CalculateSegmentOffset();
-//    this->representationStream->setSegmentOffset(this->segmentOffset);
     this->mpdWrapper->setSegmentOffset(type, this->segmentOffset);
     this->conn = NULL;
     this->initConn = NULL;
@@ -408,3 +398,4 @@ void                                        DASHReceiver::SetDrop   (float drop)
     this->drop = drop;
 }
 
+
index ed98b9e..9d221ec 100644 (file)
@@ -62,7 +62,7 @@ public:
     void SetPosition(uint32_t segmentNumber);
     void SetLooping(bool isLoopinp);
     void SetPositionInMsecs(uint32_t milliSecs);
-
+    dash::mpd::IRepresentation* GetRepresentation();
     void SetRepresentation();
     void SetAdaptationLogic(adaptation::IAdaptationLogic *_adaptationLogic);
     libdash::framework::adaptation::IAdaptationLogic* GetAdaptationLogic();
@@ -86,17 +86,11 @@ private:
     float                                               drop;
     bool                                                withFeedBack;
     bool                                                isBufferBased;
-//    std::map<dash::mpd::IRepresentation*, MediaObject*> initSegments;
-    std::map<int, MediaObject*> initSegments;
+    std::map<int, MediaObject*>                         initSegments;
     libdash::framework::buffer::Buffer<MediaObject>     *buffer;
     IDASHReceiverObserver                               *observer;
-    libdash::framework::mpd::MPDWrapper                        *mpdWrapper;
-//    dash::mpd::IMPD                                     *mpd;
-//    dash::mpd::IPeriod                                  *period;
-//    dash::mpd::IAdaptationSet                           *adaptationSet;
-//    dash::mpd::IRepresentation                          *representation;
+    libdash::framework::mpd::MPDWrapper                 *mpdWrapper;
     mpd::AdaptationSetStream                            *adaptationSetStream;
-//    mpd::IRepresentationStream                          *representationStream;
     uint32_t                                            segmentNumber;
     uint32_t                                            positionInMsecs;
     uint32_t                                            segmentOffset;
@@ -121,13 +115,12 @@ private:
     int                                                 bufferLevelAtUpdate;
     int                                                 readMax;
     uint8_t                                             *readBuffer;
-    viper::managers::StreamType                        type;
+    viper::managers::StreamType                         type;
+
     uint32_t CalculateSegmentOffset();
     void NotifySegmentDownloaded();
-//    void DownloadInitSegment(dash::mpd::IRepresentation* rep);
     void DownloadInitSegment();
     void DownloadInitSegmentWithoutLock();
-//    bool InitSegmentExists(dash::mpd::IRepresentation* rep);
     bool InitSegmentExists(int rep);
     static void* DoBuffering(void *receiver);
     static void* DoMPDFetching(void * data);
index e02f65c..1ffee92 100644 (file)
@@ -94,11 +94,11 @@ void            AbstractRepresentationStream::setSegmentOffset (uint32_t offset)
     this->segmentOffset = offset;
 }
 
-uint32_t AbstractRepresentationStream::getTime(size_t segmentNumber)
+uint64_t AbstractRepresentationStream::getTime(size_t segmentNumber)
 {
     return 0;
 }
-size_t AbstractRepresentationStream::getSegmentNumber(uint32_t time)
+size_t AbstractRepresentationStream::getSegmentNumber(uint64_t time)
 {
     return 0;
 }
index 87400c0..113720e 100644 (file)
@@ -47,27 +47,27 @@ public:
     virtual dash::mpd::ISegment* getBitstreamSwitchingSegment() = 0;
     virtual RepresentationStreamType getStreamType() = 0;
 
-    virtual uint32_t getSize();
-    virtual uint32_t getFirstSegmentNumber();
-    virtual uint32_t getCurrentSegmentNumber();
-    virtual uint32_t getLastSegmentNumber();
-    virtual uint32_t getAverageSegmentDuration();
+    virtual uint32_t    getSize();
+    virtual uint32_t    getFirstSegmentNumber();
+    virtual uint32_t    getCurrentSegmentNumber();
+    virtual uint32_t    getLastSegmentNumber();
+    virtual uint32_t    getAverageSegmentDuration();
 
-    virtual uint32_t getTimescale();
-    virtual void     setSegmentOffset(uint32_t offset);
-    virtual uint32_t getTime(size_t segmentNumber);
-    virtual size_t getSegmentNumber(uint32_t time);
+    virtual uint32_t    getTimescale();
+    virtual void        setSegmentOffset(uint32_t offset);
+    virtual uint64_t    getTime(size_t segmentNumber);
+    virtual size_t      getSegmentNumber(uint64_t time);
 
 protected:
     virtual void setBaseUrls(const std::vector<dash::mpd::IBaseUrl *> baseurls);
 
-    std::vector<dash::mpd::IBaseUrl *>  baseUrls;
-    libdash::framework::mpd::IMPDWrapper *mpdWrapper;
-    dash::mpd::IPeriod                  *period;
-    dash::mpd::IAdaptationSet           *adaptationSet;
-    dash::mpd::IRepresentation          *representation;
-    uint32_t                            segmentOffset;
-    viper::managers::StreamType                type;
+    std::vector<dash::mpd::IBaseUrl *>      baseUrls;
+    libdash::framework::mpd::IMPDWrapper    *mpdWrapper;
+    dash::mpd::IPeriod                      *period;
+    dash::mpd::IAdaptationSet               *adaptationSet;
+    dash::mpd::IRepresentation              *representation;
+    uint32_t                                segmentOffset;
+    viper::managers::StreamType             type;
 };
 }
 }
index 7390494..61a8a1c 100644 (file)
@@ -28,15 +28,15 @@ namespace mpd
 class IMPDWrapper
 {
 public:
-    virtual std::string                                getAvailabilityStarttime() = 0;
-    virtual std::string                                getTimeShiftBufferDepth() = 0;
-    virtual std::string                                getTypeWithoutLock() = 0;
-    virtual uint32_t                           getFetchTime() = 0;
-    virtual std::string                                getMinimumUpdatePeriodWithoutLock() = 0;
-    virtual std::vector<dash::mpd::IBaseUrl *> resolveBaseUrl(viper::managers::StreamType type, size_t mpdBaseUrl, size_t periodBaseUrl, size_t adaptationSetBaseUrl) = 0;
-    virtual std::vector<dash::mpd::IBaseUrl *> resolveBaseUrl(viper::managers::StreamType type, size_t mpdBaseUrl, size_t periodBaseUrl, size_t adaptationSetBaseUrl, dash::mpd::IMPD* mpd) = 0;
-    virtual void                               releaseLock() = 0;
-    virtual std::string                                getMediaPresentationDuration() = 0;
+    virtual std::string                         getAvailabilityStarttime() = 0;
+    virtual std::string                         getTimeShiftBufferDepth() = 0;
+    virtual std::string                         getTypeWithoutLock() = 0;
+    virtual uint32_t                            getFetchTime() = 0;
+    virtual std::string                         getMinimumUpdatePeriodWithoutLock() = 0;
+    virtual std::vector<dash::mpd::IBaseUrl *>  resolveBaseUrl(viper::managers::StreamType type, size_t mpdBaseUrl, size_t periodBaseUrl, size_t adaptationSetBaseUrl) = 0;
+    virtual std::vector<dash::mpd::IBaseUrl *>  resolveBaseUrl(viper::managers::StreamType type, size_t mpdBaseUrl, size_t periodBaseUrl, size_t adaptationSetBaseUrl, dash::mpd::IMPD* mpd) = 0;
+    virtual void                                releaseLock() = 0;
+    virtual std::string                         getMediaPresentationDuration() = 0;
 };
 }
 }
index 5734c4c..bf8b08c 100644 (file)
@@ -44,8 +44,8 @@ public:
     virtual uint32_t getLastSegmentNumber() = 0;
     virtual uint32_t getAverageSegmentDuration() = 0;
     virtual void     setSegmentOffset(uint32_t offset) = 0;
-    virtual uint32_t getTime(size_t segmentNumber) = 0;
-    virtual size_t getSegmentNumber(uint32_t time) = 0;
+    virtual uint64_t getTime(size_t segmentNumber) = 0;
+    virtual size_t getSegmentNumber(uint64_t time) = 0;
 
 
 };
index 4c8baa6..163ed19 100644 (file)
@@ -141,7 +141,7 @@ void        MPDWrapper::findVideoRepresentation     (IMPD* mpd)
         }
         this->videoRepresentation = representations.at(0);
         this->initializeAdaptationSetStreamWithoutLock(viper::managers::StreamType::VIDEO, mpd);
-        this->videoSegmentNumber = this->videoRepresentations->find(this->videoRepresentation)->second->getSegmentNumber(time);
+        this->videoSegmentNumber = 0;
     }
     else
     {
@@ -162,7 +162,7 @@ void        MPDWrapper::findAudioRepresentation     (IMPD* mpd)
             {
                 if(id == std::stoi(representations.at(i)->GetId()))
                 {
-                    this->videoRepresentation = representations.at(i);
+                    this->audioRepresentation = representations.at(i);
                     this->destroyAdaptationSetStream(viper::managers::StreamType::AUDIO);
                     this->initializeAdaptationSetStreamWithoutLock(viper::managers::StreamType::AUDIO, mpd);
                     this->audioSegmentNumber = this->audioRepresentations->find(this->audioRepresentation)->second->getSegmentNumber(time);
@@ -173,7 +173,7 @@ void        MPDWrapper::findAudioRepresentation     (IMPD* mpd)
         }
         this->audioRepresentation = representations.at(0);
         this->initializeAdaptationSetStreamWithoutLock(viper::managers::StreamType::AUDIO,mpd);
-        this->audioSegmentNumber = this->audioRepresentations->find(this->audioRepresentation)->second->getSegmentNumber(time);
+        this->audioSegmentNumber = 0;
     }
     else
     {
index a62a9ba..409d8e5 100644 (file)
@@ -179,10 +179,10 @@ void SegmentTemplateStream::calculateSegmentStartTimes()
         return;
 
     size_t   numOfTimelines = 0;
-    uint32_t segStartTime   = 0;
-    uint32_t segDuration    = 0;
+    uint64_t segStartTime   = 0;
+    uint64_t segDuration    = 0;
     size_t   repeatCount    = 0;
-    uint32_t totalDuration  = 0;
+    uint64_t totalDuration  = 0;
 
     numOfTimelines      = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().size();
 
@@ -192,7 +192,6 @@ void SegmentTemplateStream::calculateSegmentStartTimes()
         segStartTime    = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().at(i)->GetStartTime();
         segDuration     = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().at(i)->GetDuration();
         totalDuration   = totalDuration + segDuration;
-
         if (repeatCount > 0)
         {
             for (size_t j = 0; j <= repeatCount; j++)
@@ -215,7 +214,7 @@ void SegmentTemplateStream::calculateSegmentStartTimes()
     this->averageDuration = totalDuration / numOfTimelines;
 }
 
-uint32_t SegmentTemplateStream::getTime(size_t segmentNumber)
+uint64_t SegmentTemplateStream::getTime(size_t segmentNumber)
 {
     if(segmentNumber < this->segmentStartTimes.size())
        return this->segmentStartTimes.at(segmentNumber);
@@ -223,7 +222,7 @@ uint32_t SegmentTemplateStream::getTime(size_t segmentNumber)
        return 0;
 }
 
-size_t SegmentTemplateStream::getSegmentNumber(uint32_t time)
+size_t SegmentTemplateStream::getSegmentNumber(uint64_t time)
 {
     size_t i;
     for(i = 0; i < this->segmentStartTimes.size(); i ++)
index 68d4f84..0bd0ad1 100644 (file)
@@ -40,15 +40,15 @@ public:
     virtual uint32_t getSize();
     virtual uint32_t getAverageSegmentDuration();
     virtual uint32_t getTimescale();
-    virtual uint32_t getTime(size_t segmentNumber);
-    virtual size_t getSegmentNumber(uint32_t time);
+    virtual uint64_t getTime(size_t segmentNumber);
+    virtual size_t getSegmentNumber(uint64_t time);
 
 private:
     dash::mpd::ISegmentTemplate* findSegmentTemplate();
     void calculateSegmentStartTimes();
 
     dash::mpd::ISegmentTemplate *segmentTemplate;
-    std::vector<uint32_t>       segmentStartTimes;
+    std::vector<uint64_t>       segmentStartTimes;
     uint32_t                    averageDuration;
     bool                        inSync;
     uint32_t                    currentSegment;
index 44473b0..2311846 100644 (file)
@@ -280,6 +280,7 @@ void MultimediaManager::stopAudio()
 
 bool MultimediaManager::setVideoQuality()
 {
+
     if (this->videoStream)
         this->videoStream->setRepresentation();
     return true;
index d5661b0..454cca2 100644 (file)
@@ -56,7 +56,6 @@ public:
     void setPosition(uint32_t segmentNumber);
     void setLooping(bool looping);
     void setPositionInMsec(uint32_t milliSecs);
-
     libdash::framework::input::MediaObject* getSegment();
     void setEOS(bool value);
     void notifyBufferChange(uint32_t bufferfill, int maxC);
@@ -89,10 +88,9 @@ private:
     StreamType                                          type;
     bool                                                icn;
     double                                              icnAlpha;
-    mutable CRITICAL_SECTION                            monitorMutex;
     bool                                                noDecoding;
 
-    void init ();
+    void init();
 };
 }
 }
index d83e402..31db216 100644 (file)
@@ -99,19 +99,6 @@ void DASHPlayer::onSettingsChanged(int period, int videoAdaptationSet, int video
     if (!this->settingsChanged(period, videoAdaptationSet, videoRepresentation, audioAdaptationSet, audioRepresentation))
         return;
 
-//    IPeriod                         *currentPeriod      = this->multimediaManager->getMPD()->GetPeriods().at(period);
-//    std::vector<IAdaptationSet *>   videoAdaptationSets = AdaptationSetHelper::getVideoAdaptationSets(currentPeriod);
-//    std::vector<IAdaptationSet *>   audioAdaptationSets = AdaptationSetHelper::getAudioAdaptationSets(currentPeriod);
-//    if (videoAdaptationSet >= 0 && videoRepresentation >= 0)
-//    {
-//        this->multimediaManager->setVideoQuality(currentPeriod,
-//                                                 videoAdaptationSets.at(videoAdaptationSet),
-//                                                 videoAdaptationSets.at(videoAdaptationSet)->GetRepresentation().at(videoRepresentation));
-//    }
-//    else
-//    {
-//        this->multimediaManager->setVideoQuality(currentPeriod, NULL, NULL);
-//    }
     this->mpdWrapper->settingsChanged(period, videoAdaptationSet, videoRepresentation, audioAdaptationSet, audioRepresentation);
     this->multimediaManager->setVideoQuality();
 }
index d707295..19fe641 100644 (file)
@@ -126,7 +126,7 @@ namespace dash
                  *                                  This integer will be formated according to a possibly contained format tag in the \em \$Time\$ identifier.
                  *  @return     a pointer to a dash::mpd::ISegment object
                  */
-                virtual ISegment*           GetMediaSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t time) const = 0;
+                virtual ISegment*           GetMediaSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint64_t time) const = 0;
 
                 /**
                  *  Returns a pointer to a dash::mpd::ISegment object that represents a Index Segment and can be downloaded.
@@ -140,9 +140,9 @@ namespace dash
                  *                                  This integer will be formated according to a possibly contained format tag in the \em \$Time\$ identifier.
                  *  @return     a pointer to a dash::mpd::ISegment object
                  */
-                virtual ISegment*           GetIndexSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t time) const = 0;
+                virtual ISegment*           GetIndexSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint64_t time) const = 0;
         };
     }
 }
 
-#endif /* ISEGMENTTEMPLATE_H_ */
\ No newline at end of file
+#endif /* ISEGMENTTEMPLATE_H_ */
index e1f8e95..0315fba 100644 (file)
@@ -43,14 +43,14 @@ namespace dash
                  *  \em StartTime corresponds to the \c \@t attribute.
                  *  @return     an unsigned integer
                  */
-                virtual uint32_t    GetStartTime    ()  const = 0;
+                virtual uint64_t    GetStartTime    ()  const = 0;
 
                 /**
                  *  Returns the integer that specifies the Segment duration, in units of the value of the \c \@timescale. \n\n
                  *  \em Duration corresponds to the \c \@d attribute.
                  *  @return     an unsigned integer
                  */
-                virtual uint32_t    GetDuration     ()  const = 0;
+                virtual uint64_t    GetDuration     ()  const = 0;
 
                 /**
                  *  Returns an integer that specifies the repeat count of the number of following contiguous Segments with the same duration expressed by the value of \c \@d.
@@ -58,9 +58,9 @@ namespace dash
                  *  \em RepeatCount corresponds to the \c \@r attribute.
                  *  @return     an unsigned integer
                  */
-                virtual uint32_t    GetRepeatCount  ()  const = 0;
+                virtual uint64_t    GetRepeatCount  ()  const = 0;
         };
     }
 }
 
-#endif /* ITIMELINE_H_ */
\ No newline at end of file
+#endif /* ITIMELINE_H_ */
index b92c469..f64f58c 100644 (file)
@@ -73,15 +73,15 @@ ISegment*           SegmentTemplate::GetIndexSegmentFromNumber      (const std::
 {
     return ToSegment(this->index, baseurls, representationID, bandwidth, dash::metrics::IndexSegment, number);
 }
-ISegment*           SegmentTemplate::GetMediaSegmentFromTime        (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t time) const
+ISegment*           SegmentTemplate::GetMediaSegmentFromTime        (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint64_t time) const
 {
     return ToSegment(this->media, baseurls, representationID, bandwidth, dash::metrics::MediaSegment, 0, time);
 }
-ISegment*           SegmentTemplate::GetIndexSegmentFromTime        (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t time) const
+ISegment*           SegmentTemplate::GetIndexSegmentFromTime        (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint64_t time) const
 {
     return ToSegment(this->index, baseurls, representationID, bandwidth, dash::metrics::IndexSegment, 0, time);
 }
-std::string         SegmentTemplate::ReplaceParameters              (const std::string& uri, const std::string& representationID, uint32_t bandwidth, uint32_t number, uint32_t time) const
+std::string         SegmentTemplate::ReplaceParameters              (const std::string& uri, const std::string& representationID, uint32_t bandwidth, uint32_t number, uint64_t time) const
 {
     std::vector<std::string> chunks;
     std::string replacedUri = "";
@@ -127,19 +127,18 @@ std::string         SegmentTemplate::ReplaceParameters              (const std::
         return replacedUri;
     }
 }
-void                SegmentTemplate::FormatChunk                    (std::string& uri, uint32_t number) const
+void                SegmentTemplate::FormatChunk                    (std::string& uri, uint64_t number) const
 {
     char formattedNumber [50];
     size_t pos = 0;
-    std::string formatTag = "%01d";
+    std::string formatTag = "%01lu";
 
     if ( (pos = uri.find("%0")) != std::string::npos)
         formatTag = uri.substr(pos).append("d");
-
     sprintf(formattedNumber, formatTag.c_str(), number);
     uri = formattedNumber;
 }
-ISegment*           SegmentTemplate::ToSegment                      (const std::string& uri, const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, HTTPTransactionType type, uint32_t number, uint32_t time) const
+ISegment*           SegmentTemplate::ToSegment                      (const std::string& uri, const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, HTTPTransactionType type, uint32_t number, uint64_t time) const
 {
     Segment *seg = new Segment();
 
@@ -149,4 +148,4 @@ ISegment*           SegmentTemplate::ToSegment                      (const std::
     delete(seg);
 
     return NULL;
-}
\ No newline at end of file
+}
index e5782a8..52aae8a 100644 (file)
@@ -36,8 +36,8 @@ namespace dash
                 ISegment*           ToBitstreamSwitchingSegment (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth) const;
                 ISegment*           GetMediaSegmentFromNumber   (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t number) const;
                 ISegment*           GetIndexSegmentFromNumber   (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t number) const;
-                ISegment*           GetMediaSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t time) const;
-                ISegment*           GetIndexSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint32_t time) const;
+                ISegment*           GetMediaSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint64_t time) const;
+                ISegment*           GetIndexSegmentFromTime     (const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, uint64_t time) const;
 
                 void    SetMedia                (const std::string& media);
                 void    SetIndex                (const std::string& index);
@@ -45,10 +45,10 @@ namespace dash
                 void    SetBitstreamSwitching   (const std::string& bitstreamSwichting);
 
             private:
-                std::string ReplaceParameters   (const std::string& uri, const std::string& representationID, uint32_t bandwidth, uint32_t number, uint32_t time) const;
-                void        FormatChunk         (std::string& uri, uint32_t number) const;
+                std::string ReplaceParameters   (const std::string& uri, const std::string& representationID, uint32_t bandwidth, uint32_t number, uint64_t time) const;
+                void        FormatChunk         (std::string& uri, uint64_t number) const;
                 ISegment*   ToSegment           (const std::string& uri, const std::vector<IBaseUrl *>& baseurls, const std::string& representationID, uint32_t bandwidth, 
-                                                 dash::metrics::HTTPTransactionType type, uint32_t number = 0, uint32_t time = 0) const;
+                                                 dash::metrics::HTTPTransactionType type, uint32_t number = 0, uint64_t time = 0) const;
 
                 std::string media;
                 std::string index;
index 624c658..d054f65 100644 (file)
@@ -23,27 +23,27 @@ Timeline::~Timeline   ()
 {
 }
 
-uint32_t    Timeline::GetStartTime     ()  const
+uint64_t    Timeline::GetStartTime     ()  const
 {
     return this->startTime;
 }
-void        Timeline::SetStartTime     (uint32_t startTime) 
+void        Timeline::SetStartTime     (uint64_t startTime) 
 {
     this->startTime = startTime;
 }
-uint32_t    Timeline::GetDuration      ()  const
+uint64_t    Timeline::GetDuration      ()  const
 {
     return this->duration;
 }
-void        Timeline::SetDuration      (uint32_t duration) 
+void        Timeline::SetDuration      (uint64_t duration) 
 {
     this->duration = duration;
 }
-uint32_t    Timeline::GetRepeatCount   ()  const
+uint64_t    Timeline::GetRepeatCount   ()  const
 {
     return this->repeatCount;
 }
-void        Timeline::SetRepeatCount   (uint32_t repeatCount)
+void        Timeline::SetRepeatCount   (uint64_t repeatCount)
 {
     this->repeatCount = repeatCount;
-}
\ No newline at end of file
+}
index 3caa331..eea3cd5 100644 (file)
@@ -27,18 +27,18 @@ namespace dash
                 Timeline             ();
                 virtual ~Timeline    ();
 
-                uint32_t    GetStartTime    ()  const;
-                uint32_t    GetDuration     ()  const;
-                uint32_t    GetRepeatCount  ()  const;
+                uint64_t    GetStartTime    ()  const;
+                uint64_t    GetDuration     ()  const;
+                uint64_t    GetRepeatCount  ()  const;
 
-                void    SetStartTime    (uint32_t startTime);
-                void    SetDuration     (uint32_t duration);
-                void    SetRepeatCount  (uint32_t repeatCount);
+                void    SetStartTime    (uint64_t startTime);
+                void    SetDuration     (uint64_t duration);
+                void    SetRepeatCount  (uint64_t repeatCount);
 
             private:
-                uint32_t    startTime;
-                uint32_t    duration;
-                uint32_t    repeatCount;
+                uint64_t    startTime;
+                uint64_t    duration;
+                uint64_t    repeatCount;
         };
     }
 }
index 5319320..0747a8e 100644 (file)
@@ -209,6 +209,7 @@ dash::mpd::Timeline*                        Node::ToTimeline            ()  cons
 
     if (this->HasAttribute("t"))
     {
+        uint64_t yolo = strtoul(this->GetAttributeValue("t").c_str(), NULL, 10);
         timeline->SetStartTime(strtoul(this->GetAttributeValue("t").c_str(), NULL, 10));
     }
     if (this->HasAttribute("d"))