Ticket #344: eit.2.patch
File eit.2.patch, 4.3 KB (added by , 19 years ago) |
---|
-
sitypes.h
238 238 QString loadStatus(); 239 239 240 240 int AddSection(tablehead *head); 241 bool isEmpty() { return Empty; } 241 242 242 243 private: 243 244 int16_t MaxSections; // Max number of sections 244 245 int8_t Version; // Table Version 245 246 uint8_t Filled[0x100]; // Fill status of each section 247 bool Empty; // Any entries ? 246 248 }; 247 249 248 250 // Tables to hold Actual Network Objects -
sitypes.cpp
92 92 { 93 93 MaxSections = -1; 94 94 Version = -1; 95 Empty = true; 95 96 memset(&Filled, 0, sizeof(Filled)); 96 97 } 97 98 … … 136 137 137 138 int SectionTracker::AddSection(tablehead *head) 138 139 { 140 Empty = false; 139 141 if (MaxSections == -1) 140 142 { 141 143 MaxSections = head->section_last; … … 797 799 status[key].requested = true; 798 800 status[key].requestedEmit = true; 799 801 status[key].emitted = false; 802 status[key].pulling = true; 800 803 } 801 804 802 805 bool EventHandler::EmitRequired() … … 814 817 if (!(sttloaded)) 815 818 return false; 816 819 } 820 817 821 if (!(servicesloaded)) 822 { 823 #ifdef EIT_DEBUG_SID 824 static int n =0; 825 if (!(n++%100)) 826 printf("EventHandler::EmitRequired no services\n"); 827 #endif 818 828 return false; 829 } 819 830 820 831 for (s = status.begin() ; s != status.end() ; ++s) 821 832 { 833 #ifdef EIT_DEBUG_SID 834 if (s.key()==EIT_DEBUG_SID) 835 { 836 if (s.data().emitted || !s.data().pulling) 837 printf("EventHandler::EmitRequired %d: tracker not pulling\n",EIT_DEBUG_SID); 838 } 839 #endif 822 840 if (s.data().emitted || !s.data().pulling) 823 {824 841 continue; 825 }826 842 843 if (TrackerSetup[s.key()] == false) 844 continue; 827 845 AllComplete = true; 828 846 /* Make sure all sections are being pulled otherwise your not done */ 829 if (TrackerSetup[s.key()] == false)830 AllComplete = false;831 847 for (i = Tracker[s.key()].begin() ; i != Tracker[s.key()].end() ; ++i) 832 848 { 833 849 if (!i.data().Complete()) 834 850 { 851 #ifdef EIT_DEBUG_SID 852 if (s.key()==EIT_DEBUG_SID) 853 printf("EventHandler::EmitRequired %d: 0%x is not complete\n",EIT_DEBUG_SID,i.key()); 854 #endif 835 855 AllComplete = false; 836 856 break; 837 857 } 838 858 } 839 if ( SIStandard == SI_STANDARD_ATSC)859 if (AllComplete && (SIStandard == SI_STANDARD_ATSC)) 840 860 { 841 861 for (e = Events[s.key()].begin() ; e != Events[s.key()].end() ; ++e) 842 862 { … … 857 877 } 858 878 } 859 879 } 880 #ifdef EIT_DEBUG_SID 881 if (s.key()==EIT_DEBUG_SID) 882 printf("EventHandler::EmitRequired (End) %d: AllComplete=%d\n",EIT_DEBUG_SID,AllComplete); 883 #endif 860 884 if (AllComplete) 861 885 return true; 862 886 } … … 877 901 { 878 902 AllComplete = true; 879 903 if (TrackerSetup[s.key()] == false) 880 AllComplete = false;904 continue; 881 905 /* Make sure all sections are being pulled otherwise your not done */ 882 for (i = Tracker[s.key()].begin() ; i != Tracker[s.key()].end(); ++i)906 for (i = Tracker[s.key()].begin(); i != Tracker[s.key()].end(); ++i) 883 907 { 884 908 if (!(i.data().Complete())) 909 { 885 910 AllComplete = false; 911 break; 912 } 886 913 } 887 if (SIStandard == SI_STANDARD_ATSC) 914 915 if (AllComplete && (SIStandard == SI_STANDARD_ATSC)) 888 916 { 889 917 for (e = Events[s.key()].begin() ; e != Events[s.key()].end() ; ++e) 890 918 { … … 967 995 } 968 996 #endif 969 997 998 //If we are interested in this but the tracker does not have any data 999 //in it then set the status back to pulling if appropriate 1000 if (status[key0].requestedEmit && Tracker[key0][key1].isEmpty() && 1001 status[key0].emitted) 1002 { 1003 status[key0].pulling = true; 1004 status[key0].emitted = false; 1005 } 1006 970 1007 if (SIStandard == SI_STANDARD_ATSC) 971 1008 { 972 1009 QMap_pidHandler::Iterator p;