[FFmpeg-devel] [PATCH v4] Add ZeroMQ as protocol option

Marton Balint cus at passwd.hu
Thu Aug 29 22:01:10 EEST 2019



On Thu, 29 Aug 2019, Andriy Gelman wrote:

> Changes in v4:
>  - Use polling instead of non-blocking option for socket
>    read/write operations.
>  - Added pkt_size, timeout_send, timeout_recv options.
>    Updated documentation for new options.

No, timeout_send and timeout_recv is not needed. The URL context has a 
timeout parameter.

Please see how unix.c or tcp.c does the polling: They both use a helper 
funciton called ff_network_wait_fd_timeout (implemented in network.c) 
which does polling in a loop with small timeouts in order to be able to 
check the interrupt callback. After successful polling you can call the 
actual transfer function.

You should do something similar, copy ff_network_wait_fd_timeout, replace 
the file descriptor polling with zmq polling and you should be good to go.

Thanks,
Marton


More information about the ffmpeg-devel mailing list