]> git.sesse.net Git - vlc/commitdiff
en50221: Provide compile-time option for slow CAMs
authorMarian Ďurkovič <md@bts.sk>
Thu, 29 Oct 2009 07:26:04 +0000 (08:26 +0100)
committerMarian Ďurkovič <md@bts.sk>
Thu, 29 Oct 2009 07:26:04 +0000 (08:26 +0100)
modules/access/dvb/en50221.c

index bc8122576f1df6f6f497ed8f6976b5540ceece06..2f16fd47007611c3b81b093a20252f454eddd174 100644 (file)
@@ -79,6 +79,7 @@
 #undef DEBUG_TPDU
 #define HLCI_WAIT_CAM_READY 0
 #define CAM_PROG_MAX MAX_PROGRAMS
+//#define CAPMT_WAIT 100             /* uncomment this for slow CAMs */
 
 static void ResourceManagerOpen( access_t * p_access, int i_session_id );
 static void ApplicationInformationOpen( access_t * p_access, int i_session_id );
@@ -973,7 +974,7 @@ typedef struct
 static bool CheckSystemID( system_ids_t *p_ids, uint16_t i_id )
 {
     int i = 0;
-    if( !p_ids ) return false;
+    if( !p_ids ) return true;      /* dummy session for high-level CI intf */
 
     while ( p_ids->pi_system_ids[i] )
     {
@@ -1243,6 +1244,9 @@ static void CAPMTAdd( access_t * p_access, int i_session_id,
         return;
     }
  
+#ifdef CAPMT_WAIT
+    msleep( CAPMT_WAIT * 1000 );
+#endif
  
     msg_Dbg( p_access, "adding CAPMT for SID %d on session %d",
              p_pmt->i_program_number, i_session_id );