From: Marten Richter Date: Sun, 18 Nov 2012 16:03:57 +0000 (+0100) Subject: tfeed line breaks X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=550eca4dacd9f79b0254cd55aaf8042a9756272f;p=vompclient-marten.git tfeed line breaks --- diff --git a/tfeed.cc b/tfeed.cc index 9192295..c52005f 100644 --- a/tfeed.cc +++ b/tfeed.cc @@ -1,54 +1,78 @@ -/* - Copyright 2008 Marten Richter - This file is part of VOMP. +/* + + Copyright 2008 Marten Richter + + This file is part of VOMP. + VOMP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + (at your option) any later version. VOMP 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 General Public License for more details. + GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with VOMP; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "tfeed.h" -#include "log.h" #include "demuxer.h" #include "callback.h" - -TFeed::TFeed(Callback* tcb) : cb(*tcb) { teletextEnabled = 1; } - -int TFeed::init() { return 1; } - -int TFeed::shutdown() { - // FIXME return 1; } - -void TFeed::disable() -{ teletextEnabled = 0; -} - + */ + + +#include "tfeed.h" +#include "log.h" +#include "demuxer.h" +#include "callback.h" + + +TFeed::TFeed(Callback* tcb) +: +cb(*tcb) +{ + teletextEnabled = 1; +} + + +int TFeed::init() +{ + return 1; +} + +int TFeed::shutdown() +{ + // FIXME + return 1; +} + +void TFeed::disable() +{ + teletextEnabled = 0; +} + void TFeed::enable() -{ teletextEnabled = 1; -} - +{ + teletextEnabled = 1; +} + int TFeed::start() { teletextEnabled = 1; return threadStart(); -} - +} + void TFeed::stop() { threadCancel(); -} - +} + void TFeed::threadMethod() { - bool tlen; - while(1) { + bool tlen; + + while(1){ threadCheckExit(); - tlen = Demuxer::getInstance()->writeTeletext(); + tlen = Demuxer::getInstance()->writeTeletext(); + if (tlen) { cb.call(this); @@ -61,4 +85,4 @@ void TFeed::threadMethod() } } } - \ No newline at end of file +