aboutsummaryrefslogtreecommitdiffstats
path: root/MPD/RepresentationStreamFactory.cpp
diff options
context:
space:
mode:
authorjacko <jsamain+fdio@cisco.com>2017-06-23 16:12:18 +0200
committerjacko <jsamain+fdio@cisco.com>2017-06-23 16:12:18 +0200
commita644414fd2c3a3f7f41e716b6875a78981e4cfe1 (patch)
tree13fc8ff2f6072add96f987a1a68a15c22d68d911 /MPD/RepresentationStreamFactory.cpp
parentf8907f0a7a84928800adbbfd8e66e500794aa5d5 (diff)
adding mpd live handling + automatic mpd fetching
Change-Id: I2c05bdf6a4d940ad22bb8632268f4b63a08a80a8 Signed-off-by: jacko <jsamain+fdio@cisco.com>
Diffstat (limited to 'MPD/RepresentationStreamFactory.cpp')
-rw-r--r--MPD/RepresentationStreamFactory.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/MPD/RepresentationStreamFactory.cpp b/MPD/RepresentationStreamFactory.cpp
index b84bf558..e5c57ddd 100644
--- a/MPD/RepresentationStreamFactory.cpp
+++ b/MPD/RepresentationStreamFactory.cpp
@@ -14,14 +14,28 @@
using namespace libdash::framework::mpd;
using namespace dash::mpd;
-IRepresentationStream* RepresentationStreamFactory::create(RepresentationStreamType type, IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
+IRepresentationStream* RepresentationStreamFactory::create(viper::managers::StreamType streamType, libdash::framework::mpd::RepresentationStreamType type, libdash::framework::mpd::MPDWrapper *mpdWrapper, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation, dash::mpd::IMPD* mpd)
{
- switch(type)
+ if(mpd)
{
- case SingleMediaSegment: return new SingleMediaSegmentStream(mpd, period, adaptationSet, representation);
- case SegmentList: return new SegmentListStream (mpd, period, adaptationSet, representation);
- case SegmentTemplate: return new SegmentTemplateStream (mpd, period, adaptationSet, representation);
+ switch(type)
+ {
+ case SingleMediaSegment: return new SingleMediaSegmentStream(streamType, mpdWrapper, period, adaptationSet, representation,mpd);
+ case SegmentList: return new SegmentListStream (streamType, mpdWrapper, period, adaptationSet, representation,mpd);
+ case SegmentTemplate: return new SegmentTemplateStream (streamType, mpdWrapper, period, adaptationSet, representation,mpd);
- default: return NULL;
+ default: return NULL;
+ }
+ }
+ else
+ {
+ switch(type)
+ {
+ case SingleMediaSegment: return new SingleMediaSegmentStream(streamType, mpdWrapper, period, adaptationSet, representation);
+ case SegmentList: return new SegmentListStream (streamType, mpdWrapper, period, adaptationSet, representation);
+ case SegmentTemplate: return new SegmentTemplateStream (streamType, mpdWrapper, period, adaptationSet, representation);
+
+ default: return NULL;
+ }
}
}