#[repr(C)]pub struct URLProtocol {Show 25 fields
pub name: *const c_char,
pub url_open: Option<unsafe extern "C" fn(h: *mut URLContext, url: *const c_char, flags: c_int) -> c_int>,
pub url_open2: Option<unsafe extern "C" fn(h: *mut URLContext, url: *const c_char, flags: c_int, options: *mut *mut AVDictionary) -> c_int>,
pub url_accept: Option<unsafe extern "C" fn(s: *mut URLContext, c: *mut *mut URLContext) -> c_int>,
pub url_handshake: Option<unsafe extern "C" fn(c: *mut URLContext) -> c_int>,
pub url_read: Option<unsafe extern "C" fn(h: *mut URLContext, buf: *mut c_uchar, size: c_int) -> c_int>,
pub url_write: Option<unsafe extern "C" fn(h: *mut URLContext, buf: *const c_uchar, size: c_int) -> c_int>,
pub url_seek: Option<unsafe extern "C" fn(h: *mut URLContext, pos: i64, whence: c_int) -> i64>,
pub url_close: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>,
pub url_read_pause: Option<unsafe extern "C" fn(h: *mut URLContext, pause: c_int) -> c_int>,
pub url_read_seek: Option<unsafe extern "C" fn(h: *mut URLContext, stream_index: c_int, timestamp: i64, flags: c_int) -> i64>,
pub url_get_file_handle: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>,
pub url_get_multi_file_handle: Option<unsafe extern "C" fn(h: *mut URLContext, handles: *mut *mut c_int, numhandles: *mut c_int) -> c_int>,
pub url_get_short_seek: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>,
pub url_shutdown: Option<unsafe extern "C" fn(h: *mut URLContext, flags: c_int) -> c_int>,
pub priv_data_size: c_int,
pub priv_data_class: *const AVClass,
pub flags: c_int,
pub url_check: Option<unsafe extern "C" fn(h: *mut URLContext, mask: c_int) -> c_int>,
pub url_open_dir: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>,
pub url_read_dir: Option<unsafe extern "C" fn(h: *mut URLContext, next: *mut *mut AVIODirEntry) -> c_int>,
pub url_close_dir: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>,
pub url_delete: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>,
pub url_move: Option<unsafe extern "C" fn(h_src: *mut URLContext, h_dst: *mut URLContext) -> c_int>,
pub default_whitelist: *const c_char,
}
Fields§
§name: *const c_char
§url_open: Option<unsafe extern "C" fn(h: *mut URLContext, url: *const c_char, flags: c_int) -> c_int>
§url_open2: Option<unsafe extern "C" fn(h: *mut URLContext, url: *const c_char, flags: c_int, options: *mut *mut AVDictionary) -> c_int>
This callback is to be used by protocols which open further nested protocols. options are then to be passed to ffurl_open()/ffurl_connect() for those nested protocols.
url_accept: Option<unsafe extern "C" fn(s: *mut URLContext, c: *mut *mut URLContext) -> c_int>
§url_handshake: Option<unsafe extern "C" fn(c: *mut URLContext) -> c_int>
§url_read: Option<unsafe extern "C" fn(h: *mut URLContext, buf: *mut c_uchar, size: c_int) -> c_int>
Read data from the protocol. If data is immediately available (even less than size), EOF is reached or an error occurs (including EINTR), return immediately. Otherwise: In non-blocking mode, return AVERROR(EAGAIN) immediately. In blocking mode, wait for data/EOF/error with a short timeout (0.1s), and return AVERROR(EAGAIN) on timeout. Checking interrupt_callback, looping on EINTR and EAGAIN and until enough data has been read is left to the calling function; see retry_transfer_wrapper in avio.c.
url_write: Option<unsafe extern "C" fn(h: *mut URLContext, buf: *const c_uchar, size: c_int) -> c_int>
§url_seek: Option<unsafe extern "C" fn(h: *mut URLContext, pos: i64, whence: c_int) -> i64>
§url_close: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>
§url_read_pause: Option<unsafe extern "C" fn(h: *mut URLContext, pause: c_int) -> c_int>
§url_read_seek: Option<unsafe extern "C" fn(h: *mut URLContext, stream_index: c_int, timestamp: i64, flags: c_int) -> i64>
§url_get_file_handle: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>
§url_get_multi_file_handle: Option<unsafe extern "C" fn(h: *mut URLContext, handles: *mut *mut c_int, numhandles: *mut c_int) -> c_int>
§url_get_short_seek: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>
§url_shutdown: Option<unsafe extern "C" fn(h: *mut URLContext, flags: c_int) -> c_int>
§priv_data_size: c_int
§priv_data_class: *const AVClass
§flags: c_int
§url_check: Option<unsafe extern "C" fn(h: *mut URLContext, mask: c_int) -> c_int>
§url_open_dir: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>
§url_read_dir: Option<unsafe extern "C" fn(h: *mut URLContext, next: *mut *mut AVIODirEntry) -> c_int>
§url_close_dir: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>
§url_delete: Option<unsafe extern "C" fn(h: *mut URLContext) -> c_int>
§url_move: Option<unsafe extern "C" fn(h_src: *mut URLContext, h_dst: *mut URLContext) -> c_int>
§default_whitelist: *const c_char
Trait Implementations§
Source§impl Clone for URLProtocol
impl Clone for URLProtocol
Source§fn clone(&self) -> URLProtocol
fn clone(&self) -> URLProtocol
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for URLProtocol
impl Debug for URLProtocol
impl Copy for URLProtocol
Auto Trait Implementations§
impl Freeze for URLProtocol
impl RefUnwindSafe for URLProtocol
impl !Send for URLProtocol
impl !Sync for URLProtocol
impl Unpin for URLProtocol
impl UnwindSafe for URLProtocol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more