00001 // -*- Mode: c++ -*- 00002 // Copyright (c) 2003-2005, Daniel Kristjansson 00003 00004 #ifndef CC708DECODER_H_ 00005 #define CC708DECODER_H_ 00006 00007 #include <stdint.h> 00008 #include <time.h> 00009 00010 #include "format.h" 00011 #include "compat.h" 00012 00013 #ifndef __CC_CALLBACKS_H__ 00014 00015 typedef struct CaptionPacket 00016 { 00017 unsigned char data[128+16]; 00018 int size; 00019 } CaptionPacket; 00020 #endif 00021 00022 class CC708Reader; 00023 00024 class CC708Decoder 00025 { 00026 public: 00027 CC708Decoder(CC708Reader *ccr) : reader(ccr) 00028 { 00029 memset(&partialPacket, 0, sizeof(CaptionPacket)); 00030 memset(last_seen, 0, sizeof(last_seen)); 00031 } 00032 ~CC708Decoder() {} 00033 00034 void decode_cc_data(uint cc_type, uint data1, uint data2); 00035 void decode_cc_null(void); 00036 00038 void services(uint seconds, bool[64]) const; 00039 00040 private: 00041 CaptionPacket partialPacket; 00042 CC708Reader *reader; 00043 time_t last_seen[64]; 00044 }; 00045 00046 #endif // CC708DECODER_H_
1.6.3