Commit 1ad96d63 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: dash: handle MPEG2TS profiles

parent 945f6e08
......@@ -77,6 +77,8 @@ Format Stream::mimeToFormat(const std::string &mime)
std::string tail = mime.substr(pos + 1);
if(tail == "mp4")
format = Streams::MP4;
else if (tail == "mp2t")
format = Streams::MPEG2TS;
}
return format;
}
......@@ -89,6 +91,9 @@ void Stream::create(demux_t *demux, IAdaptationLogic *logic)
case Streams::MP4:
output = new MP4StreamOutput(demux);
break;
case Streams::MPEG2TS:
output = new MPEG2TSStreamOutput(demux);
break;
default:
throw VLC_EBADVAR;
break;
......@@ -300,3 +305,11 @@ MP4StreamOutput::MP4StreamOutput(demux_t *demux) :
if(!demuxstream)
throw VLC_EGENERIC;
}
MPEG2TSStreamOutput::MPEG2TSStreamOutput(demux_t *demux) :
AbstractStreamOutput(demux)
{
demuxstream = stream_DemuxNew(demux, "ts", fakeesout);
if(!demuxstream)
throw VLC_EGENERIC;
}
......@@ -97,6 +97,13 @@ namespace dash
MP4StreamOutput(demux_t *);
virtual ~MP4StreamOutput(){}
};
class MPEG2TSStreamOutput : public AbstractStreamOutput
{
public:
MPEG2TSStreamOutput(demux_t *);
virtual ~MPEG2TSStreamOutput(){}
};
}
}
#endif // STREAMS_HPP
......@@ -40,6 +40,7 @@ MPD* MPDFactory::create (dash::xml::Node *root, stream_t *p_stream,
case Profile::ISOOnDemand:
case Profile::ISOMain:
case Profile::ISOLive:
case Profile::MPEG2TSSimple:
parser = new IsoffMainParser(root, p_stream);
default:
break;
......
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