[vlc-commits] demux: adaptative: remove unused streamType
Francois Cartegnie
git at videolan.org
Fri Oct 9 15:56:20 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 8 00:27:33 2015 +0200| [05aa24c89be8893621dd8c144800dc0f76a2b306] | committer: Francois Cartegnie
demux: adaptative: remove unused streamType
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05aa24c89be8893621dd8c144800dc0f76a2b306
---
modules/demux/Makefile.am | 1 -
modules/demux/adaptative/SegmentTracker.hpp | 1 -
modules/demux/adaptative/Streams.cpp | 21 ------------
modules/demux/adaptative/Streams.hpp | 4 ---
modules/demux/adaptative/StreamsType.hpp | 39 ----------------------
modules/demux/adaptative/playlist/BasePeriod.cpp | 23 -------------
modules/demux/adaptative/playlist/BasePeriod.h | 3 --
7 files changed, 92 deletions(-)
diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index d0cf043..63fb56b 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -318,7 +318,6 @@ libadaptative_plugin_la_SOURCES = \
demux/adaptative/StreamFormat.hpp \
demux/adaptative/Streams.cpp \
demux/adaptative/Streams.hpp \
- demux/adaptative/StreamsType.hpp \
demux/adaptative/Time.hpp \
demux/adaptative/tools/Debug.hpp \
demux/adaptative/tools/Helper.cpp \
diff --git a/modules/demux/adaptative/SegmentTracker.hpp b/modules/demux/adaptative/SegmentTracker.hpp
index 59edfca..3ae3c8d 100644
--- a/modules/demux/adaptative/SegmentTracker.hpp
+++ b/modules/demux/adaptative/SegmentTracker.hpp
@@ -24,7 +24,6 @@
# include "config.h"
#endif
-#include "StreamsType.hpp"
#include <vlc_common.h>
#include <list>
diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index 12c8690..541c0ae 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -35,7 +35,6 @@ using namespace adaptative::logic;
AbstractStream::AbstractStream(demux_t * demux_, const StreamFormat &format_)
{
p_realdemux = demux_;
- type = UNKNOWN;
format = format_;
adaptationLogic = NULL;
currentChunk = NULL;
@@ -80,21 +79,6 @@ AbstractStream::~AbstractStream()
delete fakeesout;
}
-StreamType AbstractStream::mimeToType(const std::string &mime)
-{
- StreamType mimetype;
- if (!mime.compare(0, 6, "video/"))
- mimetype = VIDEO;
- else if (!mime.compare(0, 6, "audio/"))
- mimetype = AUDIO;
- else if (!mime.compare(0, 12, "application/"))
- mimetype = APPLICATION;
- else if (!mime.compare(0, 5, "text/"))
- mimetype = SUBTITLE;
- else /* unknown of unsupported */
- mimetype = UNKNOWN;
- return mimetype;
-}
void AbstractStream::bind(AbstractAdaptationLogic *logic, SegmentTracker *tracker,
HTTPConnectionManager *conn)
@@ -157,11 +141,6 @@ int AbstractStream::esCount() const
return fakeesout->esCount();
}
-bool AbstractStream::operator ==(const AbstractStream &stream) const
-{
- return stream.type == type;
-}
-
SegmentChunk * AbstractStream::getChunk()
{
if (currentChunk == NULL && !eof)
diff --git a/modules/demux/adaptative/Streams.hpp b/modules/demux/adaptative/Streams.hpp
index e8b40da..a7e03bd 100644
--- a/modules/demux/adaptative/Streams.hpp
+++ b/modules/demux/adaptative/Streams.hpp
@@ -25,7 +25,6 @@
#endif
#include <vlc_common.h>
-#include "StreamsType.hpp"
#include "StreamFormat.hpp"
#include "ChunksSource.hpp"
@@ -64,8 +63,6 @@ namespace adaptative
public:
AbstractStream(demux_t *, const StreamFormat &);
virtual ~AbstractStream();
- bool operator==(const AbstractStream &) const;
- static StreamType mimeToType(const std::string &mime);
void bind(AbstractAdaptationLogic *, SegmentTracker *,
HTTPConnectionManager *);
@@ -106,7 +103,6 @@ namespace adaptative
Demuxer *syncdemux;
demux_t *p_realdemux;
- StreamType type;
StreamFormat format;
AbstractAdaptationLogic *adaptationLogic;
diff --git a/modules/demux/adaptative/StreamsType.hpp b/modules/demux/adaptative/StreamsType.hpp
deleted file mode 100644
index 69fb1bf..0000000
--- a/modules/demux/adaptative/StreamsType.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * StreamsType.hpp
- *****************************************************************************
- * Copyright (C) 2014 - VideoLAN and VLC authors
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-#ifndef STREAMSTYPE_HPP
-#define STREAMSTYPE_HPP
-
-namespace adaptative
-{
-
- enum StreamType
- {
- UNKNOWN = 0,
- VIDEO,
- AUDIO,
- SUBTITLE,
- APPLICATION
- };
-
- static const int StreamTypeCount = APPLICATION + 1;
-
-}
-
-#endif
diff --git a/modules/demux/adaptative/playlist/BasePeriod.cpp b/modules/demux/adaptative/playlist/BasePeriod.cpp
index a6f9b60..33f11a2 100644
--- a/modules/demux/adaptative/playlist/BasePeriod.cpp
+++ b/modules/demux/adaptative/playlist/BasePeriod.cpp
@@ -61,18 +61,6 @@ const std::vector<BaseAdaptationSet*>& BasePeriod::getAdaptationSets() const
return adaptationSets;
}
-const std::vector<BaseAdaptationSet*> BasePeriod::getAdaptationSets(adaptative::StreamType type) const
-{
- std::vector<BaseAdaptationSet*> list;
- std::vector<BaseAdaptationSet*>::const_iterator it;
- for(it = adaptationSets.begin(); it!= adaptationSets.end(); ++it)
- {
- if( AbstractStream::mimeToType((*it)->getMimeType()) == type )
- list.push_back(*it);
- }
- return list;
-}
-
void BasePeriod::addAdaptationSet(BaseAdaptationSet *adaptationSet)
{
if ( adaptationSet != NULL )
@@ -93,17 +81,6 @@ BaseAdaptationSet *BasePeriod::getAdaptationSetByID(const ID &id)
return NULL;
}
-BaseAdaptationSet * BasePeriod::getAdaptationSet(adaptative::StreamType type) const
-{
- std::vector<BaseAdaptationSet *>::const_iterator it;
- for(it = adaptationSets.begin(); it != adaptationSets.end(); ++it)
- {
- if ( AbstractStream::mimeToType((*it)->getMimeType()) == type )
- return *it;
- }
- return NULL;
-}
-
void BasePeriod::debug(vlc_object_t *obj, int indent) const
{
std::string text(indent, ' ');
diff --git a/modules/demux/adaptative/playlist/BasePeriod.h b/modules/demux/adaptative/playlist/BasePeriod.h
index e0bfc2c..b5acf8e 100644
--- a/modules/demux/adaptative/playlist/BasePeriod.h
+++ b/modules/demux/adaptative/playlist/BasePeriod.h
@@ -29,7 +29,6 @@
#include "BaseAdaptationSet.h"
#include "SegmentInformation.hpp"
#include "../tools/Properties.hpp"
-#include "../StreamsType.hpp"
namespace adaptative
{
@@ -42,9 +41,7 @@ namespace adaptative
virtual ~BasePeriod ();
const std::vector<BaseAdaptationSet *>& getAdaptationSets () const;
- const std::vector<BaseAdaptationSet *> getAdaptationSets (StreamType) const;
BaseAdaptationSet * getAdaptationSetByID(const ID &);
- BaseAdaptationSet * getAdaptationSet (StreamType) const;
void addAdaptationSet (BaseAdaptationSet *AdaptationSet);
void debug (vlc_object_t *,int = 0) const;
More information about the vlc-commits
mailing list