/*************************************************************************** * Universidade Federal da Paraíba * * Copyright (C) 2013 by Laboratório de Aplicações de Vídeo Digital * * * * Centro de Informática - UFPB - Campus I * * João Pessoa - PB - Brasil * * * * Author: Leonardo de Araújo Domingues (leonardo.araujo@lavid.ufpb.br) * * Date: Qui Out 24 18:25:51 BRT 2013 * * * **************************************************************************/ #ifndef READERSRT_H #define READERSRT_H #define MAX_LINE 1024 #define SIZE_CSCAPE 1 #define TARGET_TIME "-->" #include #include #include #include #include #include #include #include #include #include #include #include "reader.h" #include "reader_exception.h" #include "subtitle.h" using namespace lavidlib; namespace sndesc { class ReaderSRT : public Reader { public: ReaderSRT(std::string _filepath, FileIO::open_flags_t _mode); ~ReaderSRT(); bool hasNextSubtitle(); /* @Override: reader.h */ Subtitle* next(); private: File *file; FileIO *file_io; BufferedReader *bff_reader; int64_t seek_pos; bool hasNextSub; int64_t str_to_time(std::string str_time); }; } #endif // READERSRT_H