format: rename open*
function to open_input*
This commit is contained in:
parent
b5c7d27f96
commit
9b612fc90f
@ -75,7 +75,7 @@ fn main() {
|
||||
if let Some(file) = env::args().nth(1) {
|
||||
let path = Path::new(&file);
|
||||
|
||||
match ffmpeg::format::open(&path) {
|
||||
match ffmpeg::format::open_input(&path) {
|
||||
Ok(context) => print_metadata(&context),
|
||||
Err(error) => println!("error: {}", error),
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ fn from_path<T: AsRef<Path>>(path: &T) -> CString {
|
||||
CString::new(path.as_ref().as_os_str().to_str().unwrap()).unwrap()
|
||||
}
|
||||
|
||||
pub fn open<T: AsRef<Path>>(path: &T) -> Result<Context, Error> {
|
||||
pub fn open_input<T: AsRef<Path>>(path: &T) -> Result<Context, Error> {
|
||||
unsafe {
|
||||
let mut ps = ptr::null_mut();
|
||||
let path = from_path(path);
|
||||
@ -81,7 +81,7 @@ pub fn open<T: AsRef<Path>>(path: &T) -> Result<Context, Error> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn open_with<T: AsRef<Path>>(path: &T, options: Dictionary) -> Result<Context, Error> {
|
||||
pub fn open_input_with<T: AsRef<Path>>(path: &T, options: Dictionary) -> Result<Context, Error> {
|
||||
unsafe {
|
||||
let mut ps = ptr::null_mut();
|
||||
let path = from_path(path);
|
||||
@ -105,7 +105,7 @@ pub fn open_with<T: AsRef<Path>>(path: &T, options: Dictionary) -> Result<Contex
|
||||
}
|
||||
}
|
||||
|
||||
pub fn open_as<T: AsRef<Path>>(path: &T, format: &Format) -> Result<Context, Error> {
|
||||
pub fn open_input_as<T: AsRef<Path>>(path: &T, format: &Format) -> Result<Context, Error> {
|
||||
if let &Format::Input(ref format) = format {
|
||||
unsafe {
|
||||
let mut ps = ptr::null_mut();
|
||||
@ -131,7 +131,7 @@ pub fn open_as<T: AsRef<Path>>(path: &T, format: &Format) -> Result<Context, Err
|
||||
}
|
||||
}
|
||||
|
||||
pub fn open_as_with<T: AsRef<Path>>(path: &T, format: &Format, options: Dictionary) -> Result<Context, Error> {
|
||||
pub fn open_input_as_with<T: AsRef<Path>>(path: &T, format: &Format, options: Dictionary) -> Result<Context, Error> {
|
||||
if let &Format::Input(ref format) = format {
|
||||
unsafe {
|
||||
let mut ps = ptr::null_mut();
|
||||
|
Loading…
x
Reference in New Issue
Block a user