-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
c_*
: Use std::ffi
for C FFI types instead of libc
.
- Loading branch information
Showing
76 changed files
with
10,690 additions
and
11,658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
use std::ffi::c_char; | ||
use std::ffi::c_uint; | ||
use std::ffi::c_void; | ||
|
||
pub use crate::src::internal::Dav1dContext; | ||
pub use crate::src::r#ref::Dav1dRef; | ||
|
||
#[derive(Clone)] | ||
#[repr(C)] | ||
pub struct Dav1dLogger { | ||
pub cookie: *mut libc::c_void, | ||
pub callback: Option< | ||
unsafe extern "C" fn(*mut libc::c_void, *const libc::c_char, ::core::ffi::VaList) -> (), | ||
>, | ||
pub cookie: *mut c_void, | ||
pub callback: | ||
Option<unsafe extern "C" fn(*mut c_void, *const c_char, ::core::ffi::VaList) -> ()>, | ||
} | ||
|
||
pub type Dav1dInloopFilterType = libc::c_uint; | ||
pub type Dav1dInloopFilterType = c_uint; | ||
pub const DAV1D_INLOOPFILTER_ALL: Dav1dInloopFilterType = 7; | ||
pub const DAV1D_INLOOPFILTER_RESTORATION: Dav1dInloopFilterType = 4; | ||
pub const DAV1D_INLOOPFILTER_CDEF: Dav1dInloopFilterType = 2; | ||
pub const DAV1D_INLOOPFILTER_DEBLOCK: Dav1dInloopFilterType = 1; | ||
pub const DAV1D_INLOOPFILTER_NONE: Dav1dInloopFilterType = 0; | ||
|
||
pub type Dav1dDecodeFrameType = libc::c_uint; | ||
pub type Dav1dDecodeFrameType = c_uint; | ||
pub const DAV1D_DECODEFRAMETYPE_KEY: Dav1dDecodeFrameType = 3; | ||
pub const DAV1D_DECODEFRAMETYPE_INTRA: Dav1dDecodeFrameType = 2; | ||
pub const DAV1D_DECODEFRAMETYPE_REFERENCE: Dav1dDecodeFrameType = 1; | ||
pub const DAV1D_DECODEFRAMETYPE_ALL: Dav1dDecodeFrameType = 0; | ||
|
||
pub type Dav1dEventFlags = libc::c_uint; | ||
pub type Dav1dEventFlags = c_uint; | ||
pub const DAV1D_EVENT_FLAG_NEW_OP_PARAMS_INFO: Dav1dEventFlags = 2; | ||
pub const DAV1D_EVENT_FLAG_NEW_SEQUENCE: Dav1dEventFlags = 1; |
Oops, something went wrong.