You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
avio: Add an internal utility function for checking the new interrupt callback
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
committed by
Anton Khirnov
parent
6aa0b98fb2
commit
c4a090ddb5
@ -408,6 +408,14 @@ void avio_set_interrupt_cb(int (*interrupt_cb)(void))
|
|||||||
url_interrupt_cb = interrupt_cb;
|
url_interrupt_cb = interrupt_cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ff_check_interrupt(AVIOInterruptCB *cb)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
|
||||||
|
return ret;
|
||||||
|
return url_interrupt_cb();
|
||||||
|
}
|
||||||
|
|
||||||
#if FF_API_OLD_AVIO
|
#if FF_API_OLD_AVIO
|
||||||
int av_url_read_pause(URLContext *h, int pause)
|
int av_url_read_pause(URLContext *h, int pause)
|
||||||
{
|
{
|
||||||
|
@ -170,6 +170,12 @@ int ffurl_get_file_handle(URLContext *h);
|
|||||||
*/
|
*/
|
||||||
int ffurl_register_protocol(URLProtocol *protocol, int size);
|
int ffurl_register_protocol(URLProtocol *protocol, int size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the user has requested to interrup a blocking function
|
||||||
|
* associated with cb.
|
||||||
|
*/
|
||||||
|
int ff_check_interrupt(AVIOInterruptCB *cb);
|
||||||
|
|
||||||
/* udp.c */
|
/* udp.c */
|
||||||
int ff_udp_set_remote_url(URLContext *h, const char *uri);
|
int ff_udp_set_remote_url(URLContext *h, const char *uri);
|
||||||
int ff_udp_get_local_port(URLContext *h);
|
int ff_udp_get_local_port(URLContext *h);
|
||||||
|
Reference in New Issue
Block a user