53 #include "util/functions.h"
54 using namespace ::br::pucrio::telemidia::util;
56 #include "system/compat/SystemCompat.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::system::compat;
59 #include "system/thread/Thread.h"
60 using namespace ::br::pucrio::telemidia::ginga::core::system::thread;
64 using namespace ::br::pucrio::telemidia::ginga::core::tsparser::si;
66 #include "FrontendFilter.h"
68 #include "ITSFilter.h"
71 #include <sys/types.h>
91 map<unsigned int, Pmt*> pmts;
92 map<unsigned int, ITSFilter*> pidFilters;
93 map<short, ITSFilter*> stFilters;
94 map<unsigned int, ITSFilter*> pesFilters;
95 IFrontendFilter* audioFilter;
96 IFrontendFilter* videoFilter;
97 set<IFrontendFilter*> feFilters;
98 set<IFrontendFilter*> feFiltersToSetup;
99 static vector<Pat*> pats;
100 static unsigned int sectionPid;
101 static set<unsigned int> knownSectionPids;
105 unsigned int debugPacketCounter;
108 pthread_mutex_t flagLockUntilSignal;
109 pthread_cond_t flagCondSignal;
111 static pthread_mutex_t stlMutex;
113 unsigned char packetSize;
119 PipeDescriptor outPipeD;
124 static const short NB_PID_MAX = 0x1FFF;
125 static const short ERR_CONDITION_SATISFIED = 5;
131 string disableDemuxer(
string tsOutputUri);
132 bool hasStreamType(
short streamType);
134 void setNptPrinter(
bool nptPrinter);
142 void setDestination(
short streamType);
143 void removeFilter(IFrontendFilter* filter);
144 void setupUnsolvedFilters();
145 bool setupFilter(IFrontendFilter* filter);
147 static void* createNullDemuxer(
void* ptr);
150 map<unsigned int, Pmt*>* getProgramsInfo();
151 unsigned int getTSId();
153 int getDefaultMainVideoPid();
154 int getDefaultMainAudioPid();
155 int getDefaultMainCarouselPid();
157 void addFilter(
ITSFilter* tsFilter,
int pid,
int tid);
158 void addFilter(IFrontendFilter* filter);
161 void attachFilter(IFrontendFilter* filter);
162 void createPatFilter(INetworkInterface* ni);
163 void createPmtFilter(INetworkInterface* ni);
167 char* section,
int secLen, IFrontendFilter* filter);
169 void addPidFilter(
unsigned int pid,
ITSFilter* filter);
170 void addSectionFilter(
unsigned int tid,
ITSFilter* filter);
171 void addStreamTypeFilter(
short streamType,
ITSFilter* filter);
172 void addPesFilter(
short type,
ITSFilter* filter);
173 void addVideoFilter(
unsigned int pid,
ITSFilter* f);
176 void receiveData(
char* buff,
unsigned int size);
177 void updateChannelStatus(
short newStatus, IChannel* channel);
180 static void addPat(Pat* pat);
181 static bool isSectionStream(
unsigned int pid);
182 static void setSectionPid(
unsigned int pid);
185 unsigned int hunt(
char* buff,
unsigned int size);
191 void checkProgramInformation();
192 void programInfoSatisfied();
195 bool waitProgramInformation();
Definition: ITSFilter.h:67
Definition: IDemuxer.h:108
Definition: ITSPacket.h:59