From dcc05fb376b1045cdc278c6354ec5b4c84e6da2a Mon Sep 17 00:00:00 2001 From: Wesnydy Ribeiro Date: Wed, 23 Mar 2016 11:38:25 -0300 Subject: [PATCH] Remove o componente input --- input/src/include/inputException.h | 26 -------------------------- input/src/include/inputFile.h | 46 ---------------------------------------------- input/src/include/listenerInput.h | 19 ------------------- input/src/inputException.cpp | 20 -------------------- input/src/inputFile.cpp | 59 ----------------------------------------------------------- 5 files changed, 0 insertions(+), 170 deletions(-) delete mode 100644 input/src/include/inputException.h delete mode 100644 input/src/include/inputFile.h delete mode 100644 input/src/include/listenerInput.h delete mode 100644 input/src/inputException.cpp delete mode 100644 input/src/inputFile.cpp diff --git a/input/src/include/inputException.h b/input/src/include/inputException.h deleted file mode 100644 index dd4eeb5..0000000 --- a/input/src/include/inputException.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** - * Universidade Federal da Paraíba * - * Copyright (C) 2014 by Laboratório de Aplicações de Vídeo Digital * - * * - * Centro de Informática - UFPB - Campus I * - * João Pessoa - PB - Brasil * - * * - * Author: Erickson Silva (erickson.silva@lavid.ufpb.br) * - * * - **************************************************************************/ - - #ifndef INPUTEXCEPTION_H - #define INPUTEXCEPTION_H - - #include - - using namespace lavidlib; - - class InputException : public RuntimeException { - public: - InputException(const std::string message); - InputException(const char* message); - }; - - - #endif /* INPUTEXCEPTION_H */ \ No newline at end of file diff --git a/input/src/include/inputFile.h b/input/src/include/inputFile.h deleted file mode 100644 index f33b098..0000000 --- a/input/src/include/inputFile.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * File: fileInput.h - * Author: leonardo - * - * Created on 6 de Janeiro de 2012, 11:11 - */ - -#ifndef INPUTFILE_H -#define INPUTFILE_H - -#include -#include -#include -#include -#include -#include "logging.h" -#include "listenerInput.h" -#include "inputException.h" - -#define MAX_SIZE_PACKET 188 - -using namespace std; -using namespace util; - -class InputFile { - -public: - InputFile(char* path); - ~InputFile(); - void initialize(); - void addListener(ListenerInput* listener); - void removeListener(ListenerInput* listener); - void notifyListeners(unsigned char* pack); - bool isFinished(); - - //void notificaQuantidadeGlosas(int quantidade); - -private: - list *listeners; - char *path; - bool finish; - -}; - -#endif /* INPUTFILE_H */ - diff --git a/input/src/include/listenerInput.h b/input/src/include/listenerInput.h deleted file mode 100644 index 5fb0670..0000000 --- a/input/src/include/listenerInput.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * File: ouvinteInput.h - * Author: derzu - * - * Created on 8 de Fevereiro de 2010, 18:19 - */ - -#ifndef _LISTENERINPUT_H -#define _LISTENERINPUT_H - -class ListenerInput { -public: - virtual void notifyInput(unsigned char *pack)=0; - //virtual void finalizouInput()=0; - -}; - -#endif /* _LISTENERINPUT_H */ - diff --git a/input/src/inputException.cpp b/input/src/inputException.cpp deleted file mode 100644 index 9cc8a32..0000000 --- a/input/src/inputException.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/*************************************************************************** - * Universidade Federal da Paraíba * - * Copyright (C) 2014 by Laboratório de Aplicações de Vídeo Digital * - * * - * Centro de Informática - UFPB - Campus I * - * João Pessoa - PB - Brasil * - * * - * Author: Erickson Silva (erickson.silva@lavid.ufpb.br) * - * * - **************************************************************************/ - - #include "inputException.h" - - InputException::InputException(const std::string message) - : RuntimeException(message) - { /* TODO */ } - InputException::InputException(const char* message) - : RuntimeException(message) - { /* TODO */ } - \ No newline at end of file diff --git a/input/src/inputFile.cpp b/input/src/inputFile.cpp deleted file mode 100644 index 5879c9b..0000000 --- a/input/src/inputFile.cpp +++ /dev/null @@ -1,59 +0,0 @@ - -#include "inputFile.h" - -InputFile::InputFile(char* path) { - this->path = path; - this->listeners = new list(); - finish = false; - PRINTL(util::_DEBUG, "Done!\n"); -} - -InputFile::~InputFile(){ - listeners->clear(); - delete listeners; - PRINTL(util::_DEBUG, "Input finalized!\n"); -} - -void InputFile::initialize(){ - ifstream filein(path, ifstream::binary); - - if (strstr(path, ".ts") != NULL) { - if (filein.is_open()) { - char buffer [MAX_SIZE_PACKET]; - PRINTL(util::_INFO, "Lendo arquivo...\n"); - while (!filein.eof()) { - filein.read(buffer, MAX_SIZE_PACKET); - unsigned char* packet = (unsigned char*) buffer; - notifyListeners(packet); - } - printf("\n"); - filein.close(); - //finished = true; - } else { - finish = true; - Logging::instance()->writeLog("inputFile.cpp : Arquivo de vídeo não encontrado."); - throw InputException("Falha ao abrir o arquivo de vídeo! Verifique se o mesmo existe."); - } - } - finish = true; - -} - -bool InputFile::isFinished(){ - return this->finish; -} - -void InputFile::addListener(ListenerInput* listener){ - this->listeners->push_back(listener); -} - -void InputFile::removeListener(ListenerInput* listener) { - this->listeners->remove(listener); -} - -void InputFile::notifyListeners(unsigned char* pack){ - for(list::iterator it = this->listeners->begin(); it != this->listeners->end(); it++){ - (*it)->notifyInput(pack); - } -} - -- libgit2 0.21.2