title: Android rtsp client compiled with NDK cannot receive any UDP packets
body: <p>I recently compiled ffmpeg and live555 for android, and built my own media client wrapper. The whole system works perfectly in all other systems (windows and linux), but not in android, just no UDP packets could be ever received. The RTSP communication works fine, which uses TCP connection. The session starts successfully, and keeps running in server. After searching for the similar topics, I see it seems that I have to acquire a multicasting permission with wifi at first. So I did:<br>
  <strong>- put permissions in AndroidManifest.xml</strong>  </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.CHANGE_NETWORK_STATE""/&gt;  
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;  
  &lt;uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/&gt;
  </code></pre>
  
  <p><strong>- put following java codes in android Activity::onCreate()</strong>  </p>
  
  <pre><code>WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE);  
  if( wm != null ) {  
      mMCLock = wm.createMulticastLock( TAG );  
      mMCLock.acquire();  
  }
  </code></pre>
  
  <p>But it still doesn't work, the results are all the same in Emulator, in Galaxy S2 Phone and
  in Galaxy Tab 10.1. Even I deactivate the live555 module, and just use ffmpeg ( ffmpeg has also its build-in rtsp client, but not as stable as live555, therefor, I ported live555 into android). The results are the same, rtsp ok, rtp not, where rtp uses udp as underlying carrier.  </p>
  
  <p>In DDMS is an error registered:<br>
  <strong><em>Address Family not supported by protocol</em></strong>  </p>
  
  <p>I think, the problem is that the UDP port is still blocked. Maybe getting multicastlock in
  java is not enough for native code running in user kernel of android.</p>
  
  <p>Does anyone has idea? </p>
  
  <p>Steven</p>