Struct URLProtocol

Source
#[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

Source§

fn clone(&self) -> URLProtocol

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for URLProtocol

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for URLProtocol

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.