diff options
author | Jacques Samain <jsamain+fdio@cisco.com> | 2017-06-26 14:11:58 +0200 |
---|---|---|
committer | Jacques Samain <jsamain+fdio@cisco.com> | 2017-06-26 14:11:58 +0200 |
commit | bd809fc04c3f9c36f8d145999e5a008ffd90a10b (patch) | |
tree | ea2575a1db9056adfbd3f4891f82829f091e60a3 /libdash/source/mpd/SegmentTemplate.cpp | |
parent | 65bb20ba5cf4ede70026142d61e728c44cc78f9c (diff) |
Corrected typo
Change-Id: I85fa9fd7adedcd26cf866847b3c747f99a14f2c3
Signed-off-by: Jacques Samain <jsamain+fdio@cisco.com>
Diffstat (limited to 'libdash/source/mpd/SegmentTemplate.cpp')
-rw-r--r-- | libdash/source/mpd/SegmentTemplate.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libdash/source/mpd/SegmentTemplate.cpp b/libdash/source/mpd/SegmentTemplate.cpp index b92c4692..f64f58c1 100644 --- a/libdash/source/mpd/SegmentTemplate.cpp +++ b/libdash/source/mpd/SegmentTemplate.cpp @@ -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 +} |