[vlc-commits] demux: dash: remove now unused blockbuffer code

Francois Cartegnie git at videolan.org
Tue Dec 30 16:25:43 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Dec 30 16:18:34 2014 +0100| [aeff27121bb00f27afad64b466bfc3d5830dc9a5] | committer: Francois Cartegnie

demux: dash: remove now unused blockbuffer code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aeff27121bb00f27afad64b466bfc3d5830dc9a5
---

 modules/demux/Makefile.am                   |    3 -
 modules/demux/dash/buffer/BlockBuffer.cpp   |   89 ---------------------------
 modules/demux/dash/buffer/BlockBuffer.h     |   64 -------------------
 modules/demux/dash/buffer/IBufferObserver.h |   47 --------------
 4 files changed, 203 deletions(-)

diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index 1868716..2533305 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -251,9 +251,6 @@ libdash_plugin_la_SOURCES = \
     demux/dash/adaptationlogic/RateBasedAdaptationLogic.cpp \
     demux/dash/adaptationlogic/Representationselectors.hpp \
     demux/dash/adaptationlogic/Representationselectors.cpp \
-    demux/dash/buffer/BlockBuffer.cpp \
-    demux/dash/buffer/BlockBuffer.h \
-    demux/dash/buffer/IBufferObserver.h \
     demux/dash/http/Chunk.cpp \
     demux/dash/http/Chunk.h \
     demux/dash/http/HTTPConnection.cpp \
diff --git a/modules/demux/dash/buffer/BlockBuffer.cpp b/modules/demux/dash/buffer/BlockBuffer.cpp
deleted file mode 100644
index b7d5c5b..0000000
--- a/modules/demux/dash/buffer/BlockBuffer.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * BlockBuffer.cpp
- *****************************************************************************
- * Copyright (C) 2010 - 2011 Klagenfurt University
- *
- * Created on: Aug 10, 2010
- * Authors: Christopher Mueller <christopher.mueller at itec.uni-klu.ac.at>
- *          Christian Timmerer  <christian.timmerer at itec.uni-klu.ac.at>
- *
- * 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.
- *****************************************************************************/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "buffer/BlockBuffer.h"
-
-using namespace dash::buffer;
-
-BlockBuffer::BlockBuffer    () :
-             sizeBytes      (0),
-             isEOF          (false)
-
-{
-    fifo = block_FifoNew();
-    if(!fifo)
-        throw VLC_ENOMEM;
-}
-BlockBuffer::~BlockBuffer   ()
-{
-    block_FifoRelease(fifo);
-}
-
-int BlockBuffer::peek(const uint8_t **pp_peek, unsigned int len)
-{
-    block_t *p_block = block_FifoShow(fifo);
-    if(!p_block)
-        return 0;
-
-    *pp_peek = p_block->p_buffer;
-    return __MIN(len, p_block->i_buffer);
-}
-
-block_t * BlockBuffer::get()
-{
-    block_t *p_block = block_FifoGet(fifo);
-    if(p_block)
-        notify();
-    return p_block;
-}
-
-void BlockBuffer::put(block_t *block)
-{
-    block_FifoPut(fifo, block);
-    notify();
-}
-
-void BlockBuffer::setEOF(bool value)
-{
-    isEOF = value;
-    block_FifoWake(fifo);
-}
-
-bool BlockBuffer::getEOF()
-{
-    return isEOF;
-}
-
-void    BlockBuffer::attach               (IBufferObserver *observer)
-{
-    this->bufferObservers.push_back(observer);
-}
-void    BlockBuffer::notify               ()
-{
-//    for(size_t i = 0; i < this->bufferObservers.size(); i++)
-//        this->bufferObservers.at(i)->bufferLevelChanged(this->sizeMicroSec, ((float)this->sizeMicroSec / this->capacityMicroSec) * 100);
-}
diff --git a/modules/demux/dash/buffer/BlockBuffer.h b/modules/demux/dash/buffer/BlockBuffer.h
deleted file mode 100644
index 6913ff0..0000000
--- a/modules/demux/dash/buffer/BlockBuffer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * BlockBuffer.h
- *****************************************************************************
- * Copyright (C) 2010 - 2011 Klagenfurt University
- *
- * Created on: Aug 10, 2010
- * Authors: Christopher Mueller <christopher.mueller at itec.uni-klu.ac.at>
- *          Christian Timmerer  <christian.timmerer at itec.uni-klu.ac.at>
- *
- * 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 BLOCKBUFFER_H_
-#define BLOCKBUFFER_H_
-
-#include "buffer/IBufferObserver.h"
-
-#include <vlc_stream.h>
-#include <vector>
-
-#define DEFAULTBUFFERLENGTH 30000000
-#define INTIALPEEKSIZE      32768
-
-namespace dash
-{
-    namespace buffer
-    {
-        class BlockBuffer
-        {
-            public:
-                BlockBuffer           ();
-                virtual ~BlockBuffer  ();
-
-                void    put           (block_t *block);
-                block_t *get          ();
-                int     peek          (const uint8_t **pp_peek, unsigned int i_peek);
-                void    setEOF        (bool value);
-                bool    getEOF        ();
-                void    attach        (IBufferObserver *observer);
-                void    notify        ();
-
-            private:
-                size_t              sizeBytes;
-                bool                isEOF;
-                block_fifo_t        *fifo;
-
-                std::vector<IBufferObserver *> bufferObservers;
-        };
-    }
-}
-
-#endif /* BLOCKBUFFER_H_ */
diff --git a/modules/demux/dash/buffer/IBufferObserver.h b/modules/demux/dash/buffer/IBufferObserver.h
deleted file mode 100644
index b12985b..0000000
--- a/modules/demux/dash/buffer/IBufferObserver.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * IBufferObserver.h
- *****************************************************************************
- * Copyright (C) 2010 - 2011 Klagenfurt University
- *
- * Created on: Aug 10, 2010
- * Authors: Christopher Mueller <christopher.mueller at itec.uni-klu.ac.at>
- *          Christian Timmerer  <christian.timmerer at itec.uni-klu.ac.at>
- *
- * 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 IBUFFEROBSERVER_H_
-#define IBUFFEROBSERVER_H_
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-
-namespace dash
-{
-    namespace buffer
-    {
-        class IBufferObserver
-        {
-            public:
-                virtual ~IBufferObserver(){}
-                virtual void bufferLevelChanged(mtime_t bufferedMicroSec, int bufferedPercent) = 0;
-        };
-    }
-}
-
-#endif /* IBUFFEROBSERVER_H_ */



More information about the vlc-commits mailing list