From 2a7908ae275bcab4a783b7a8960befd065eb4d92 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 16 Feb 2012 20:40:21 +0400 Subject: [PATCH] eitd/dmx.cpp: add next_filter() --- src/eitd/dmx.cpp | 9 +++++++++ src/eitd/dmx.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/eitd/dmx.cpp b/src/eitd/dmx.cpp index 892a9aa1d..1af0770ab 100644 --- a/src/eitd/dmx.cpp +++ b/src/eitd/dmx.cpp @@ -551,6 +551,15 @@ int DMX::request_unpause(void) return 0; } +bool DMX::next_filter() +{ + if (filter_index + 1 < (signed) filters.size()) { + change(filter_index + 1); + return true; + } + return false; +} + const char *dmx_filter_types [] = { "dummy filter", "actual transport stream, scheduled", diff --git a/src/eitd/dmx.h b/src/eitd/dmx.h index 8b5200264..02ab69bf2 100644 --- a/src/eitd/dmx.h +++ b/src/eitd/dmx.h @@ -41,7 +41,7 @@ typedef unsigned char version_number_t; class DMX { -private: +protected: int fd; cDemux * dmx; @@ -63,6 +63,7 @@ private: bool check_complete(const unsigned char table_id, const unsigned short extension_id, const unsigned short onid, const unsigned short tsid, const unsigned char); sections_id_t create_sections_id(const unsigned char table_id, const unsigned short extension_id, const unsigned char section_number, const unsigned short onid, const unsigned short tsid); + bool next_filter(); void init(); public: