[vlc-commits] demux: adaptative: merge stream outputs
Francois Cartegnie
git at videolan.org
Wed Jun 10 18:58:04 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 28 16:58:27 2015 +0200| [11ab2cdc1e26708b65a958f1c0db1cce0be40b78] | committer: Francois Cartegnie
demux: adaptative: merge stream outputs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=11ab2cdc1e26708b65a958f1c0db1cce0be40b78
---
modules/demux/adaptative/Streams.cpp | 16 ++++------------
modules/demux/adaptative/Streams.hpp | 13 +++----------
2 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index ea55c33..ba917e8 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -447,10 +447,10 @@ AbstractStreamOutput *DefaultStreamOutputFactory::create(demux_t *demux, int for
switch(format)
{
case StreamFormat::MP4:
- return new MP4StreamOutput(demux);
+ return new BaseStreamOutput(demux, "mp4");
case StreamFormat::MPEG2TS:
- return new MPEG2TSStreamOutput(demux);
+ return new BaseStreamOutput(demux, "ts");
default:
throw VLC_EBADVAR;
@@ -460,18 +460,10 @@ AbstractStreamOutput *DefaultStreamOutputFactory::create(demux_t *demux, int for
}
-MP4StreamOutput::MP4StreamOutput(demux_t *demux) :
+BaseStreamOutput::BaseStreamOutput(demux_t *demux, const std::string &name) :
AbstractStreamOutput(demux)
{
- demuxstream = stream_DemuxNew(demux, "mp4", fakeesout);
- if(!demuxstream)
- throw VLC_EGENERIC;
-}
-
-MPEG2TSStreamOutput::MPEG2TSStreamOutput(demux_t *demux) :
- AbstractStreamOutput(demux)
-{
- demuxstream = stream_DemuxNew(demux, "ts", fakeesout);
+ demuxstream = stream_DemuxNew(demux, name.c_str(), fakeesout);
if(!demuxstream)
throw VLC_EGENERIC;
}
diff --git a/modules/demux/adaptative/Streams.hpp b/modules/demux/adaptative/Streams.hpp
index cf02869..4e779c0 100644
--- a/modules/demux/adaptative/Streams.hpp
+++ b/modules/demux/adaptative/Streams.hpp
@@ -141,18 +141,11 @@ namespace adaptative
virtual AbstractStreamOutput *create(demux_t*, int streamType) const;
};
- class MP4StreamOutput : public AbstractStreamOutput
+ class BaseStreamOutput : public AbstractStreamOutput
{
public:
- MP4StreamOutput(demux_t *);
- virtual ~MP4StreamOutput(){}
- };
-
- class MPEG2TSStreamOutput : public AbstractStreamOutput
- {
- public:
- MPEG2TSStreamOutput(demux_t *);
- virtual ~MPEG2TSStreamOutput(){}
+ BaseStreamOutput(demux_t *, const std::string &);
+ virtual ~BaseStreamOutput(){}
};
}
More information about the vlc-commits
mailing list