<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class="">I have an Android app that uses libav to demux an RTSP stream (over TCP) originating from a wifi camera.</div><div class="">This camera has no internet connection, so naturally Android sends all outgoing traffic on the cellular data link.</div><div class="">In order to route traffic through the wifi link (to be sent to the camera), there's a specific function I have to call on the underlying socket ( <a href="https://developer.android.com/reference/android/net/Network#bindSocket(java.io.FileDescriptor)" class="">https://developer.android.com/reference/android/net/Network#bindSocket(java.io.FileDescriptor)</a> or <a href="https://developer.android.com/ndk/reference/group/networking#android_setsocknetwork" class="">https://developer.android.com/ndk/reference/group/networking#android_setsocknetwork</a> ).</div><div class="">I cannot bind all network traffic from my process on that specific link as I still need to reach the outside world for different kinds of traffic.</div><div class="">My question is - does libav support some kind of a hook mechanism to allow me do some processing on a socket file-descriptor after it is created but before it is connected? Or maybe support for delegation of socket creation to me, the user of libav, instead of calling socket(...)?</div><div class="">Many thanks!</div><div class="">Irad</div></body></html>