[][src]Struct ffmpeg_dev::sys::URLProtocol

#[repr(C)]
pub struct URLProtocol {
    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_charurl_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_intpriv_data_class: *const AVClassflags: c_inturl_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

impl Clone for URLProtocol[src]

impl Copy for URLProtocol[src]

impl Debug for URLProtocol[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]