-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revise `extract_mvs` example * Remove `AVFrame::get_motion_vectors` * Add `get_media_type_string`
- Loading branch information
Showing
4 changed files
with
69 additions
and
69 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
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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use crate::{ffi, shared::PointerUpgrade}; | ||
use std::ffi::CStr; | ||
|
||
/// Return a string describing the media_type enum, NULL if media_type is unknown. | ||
pub fn get_media_type_string(media_type: i32) -> Option<&'static CStr> { | ||
unsafe { ffi::av_get_media_type_string(media_type) } | ||
.upgrade() | ||
.map(|str| unsafe { CStr::from_ptr(str.as_ptr()) }) | ||
} |
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