53 #include "tuner/ITuner.h"
54 #include "tuner/providers/frontends/IFrontendFilter.h"
55 using namespace ::br::pucrio::telemidia::ginga::core::tuning;
57 #include "ITSFilter.h"
66 static const short PAT_PID = 0x0000;
67 static const short CAT_PID = 0x0001;
68 static const short TSDT_PID = 0x0001;
69 static const short NIT_PID = 0x0010;
70 static const short SDT_PID = 0x0011;
71 static const short EIT_PID = 0x0012;
72 static const short CDT_PID = 0x0029;
75 static const short PAT_TID = 0x00;
76 static const short CAT_TID = 0x01;
77 static const short PMT_TID = 0x02;
78 static const short TSDT_TID = 0x03;
79 static const short OCI_TID = 0x3B;
80 static const short OCD_TID = 0x3C;
81 static const short DDE_TID = 0x3D;
82 static const short NIT_TID = 0x40;
83 static const short SDT_TID = 0x42;
84 static const short EIT_TID = 0x4E;
85 static const short CDT_TID = 0xC8;
86 static const short AIT_TID = 0x74;
87 static const short TOT_TID = 0x73;
90 static const short STREAM_TYPE_VIDEO_MPEG1 = 0x01;
91 static const short STREAM_TYPE_VIDEO_MPEG2 = 0x02;
92 static const short STREAM_TYPE_AUDIO_MPEG1 = 0x03;
93 static const short STREAM_TYPE_AUDIO_MPEG2 = 0x04;
94 static const short STREAM_TYPE_PRIVATE_SECTION = 0x05;
95 static const short STREAM_TYPE_PRIVATE_DATA = 0x06;
96 static const short STREAM_TYPE_MHEG = 0x07;
97 static const short STREAM_TYPE_DSMCC_TYPE_A = 0x0A;
98 static const short STREAM_TYPE_DSMCC_TYPE_B = 0x0B;
99 static const short STREAM_TYPE_DSMCC_TYPE_C = 0x0C;
100 static const short STREAM_TYPE_DSMCC_TYPE_D = 0x0D;
101 static const short STREAM_TYPE_AUDIO_AAC = 0x0F;
102 static const short STREAM_TYPE_VIDEO_MPEG4 = 0x10;
103 static const short STREAM_TYPE_AUDIO_MPEG4 = 0x11;
104 static const short STREAM_TYPE_VIDEO_H264 = 0x1B;
105 static const short STREAM_TYPE_AUDIO_AC3 = 0x81;
106 static const short STREAM_TYPE_AUDIO_DTS = 0x8A;
112 virtual string disableDemuxer(
string tsOutputUri)=0;
113 virtual bool hasStreamType(
short streamType)=0;
114 virtual void printPat()=0;
115 virtual void setNptPrinter(
bool nptPrinter)=0;
117 virtual unsigned int getTSId()=0;
119 static int getTableIdFromStreamType(
short streamType) {
120 switch (streamType) {
121 case STREAM_TYPE_DSMCC_TYPE_B:
124 case STREAM_TYPE_DSMCC_TYPE_C:
127 case STREAM_TYPE_DSMCC_TYPE_D:
130 case STREAM_TYPE_PRIVATE_SECTION:
138 static int getStreamTypeFromTableId(
short tid) {
141 return STREAM_TYPE_DSMCC_TYPE_B;
144 return STREAM_TYPE_DSMCC_TYPE_C;
147 return STREAM_TYPE_DSMCC_TYPE_D;
150 return STREAM_TYPE_PRIVATE_SECTION;
157 virtual void setDestination(
short streamType)=0;
158 virtual void removeFilter(
ITSFilter* tsFilter)=0;
159 virtual void addFilter(
ITSFilter* tsFilter,
int pid,
int tid)=0;
160 virtual void addFilter(IFrontendFilter* filter)=0;
161 virtual void receiveSection(
162 char* section,
int secLen, IFrontendFilter* filter)=0;
164 virtual void addPidFilter(
unsigned int pid,
ITSFilter* filter)=0;
165 virtual void addSectionFilter(
unsigned int tid,
ITSFilter* filter)=0;
166 virtual void addStreamTypeFilter(
short streamType,
ITSFilter* filter)=0;
167 virtual void addPesFilter(
short type,
ITSFilter* filter)=0;
169 virtual int getDefaultMainVideoPid()=0;
170 virtual int getDefaultMainAudioPid()=0;
171 virtual int getDefaultMainCarouselPid()=0;
173 virtual void receiveData(
char* buff,
unsigned int size)=0;
174 virtual void updateChannelStatus(
short newStatus, IChannel* channel)=0;
176 virtual short getCaps()=0;
178 virtual bool waitProgramInformation()=0;
179 virtual bool waitBuffers()=0;
188 typedef ::br::pucrio::telemidia::ginga::core::tsparser::IDemuxer* demCreator(
191 typedef void demDestroyer(
Definition: ITSFilter.h:67
Definition: IDemuxer.h:108