forked from mirrors/gstreamer-rs
Remove traits for things that are not subclassed
This commit is contained in:
parent
41e812d075
commit
33fb38efd9
46 changed files with 255 additions and 426 deletions
14
Gir_Gst.toml
14
Gir_Gst.toml
|
@ -24,7 +24,6 @@ generate = [
|
|||
"Gst.SeekType",
|
||||
"Gst.FlowReturn",
|
||||
"Gst.PadDirection",
|
||||
"Gst.PadTemplate",
|
||||
"Gst.PadPresence",
|
||||
"Gst.URIHandler",
|
||||
"Gst.URIType",
|
||||
|
@ -41,7 +40,6 @@ generate = [
|
|||
"Gst.StructureChangeType",
|
||||
"Gst.StreamStatusType",
|
||||
"Gst.DeviceProvider",
|
||||
"Gst.DeviceProviderFactory",
|
||||
"Gst.StreamType",
|
||||
"Gst.StreamFlags",
|
||||
"Gst.PadLinkReturn",
|
||||
|
@ -280,6 +278,11 @@ name = "Gst.ElementFactory"
|
|||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "Gst.DeviceProviderFactory"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "Gst.Device"
|
||||
status = "generate"
|
||||
|
@ -450,6 +453,11 @@ status = "generate"
|
|||
# Pass by value
|
||||
ignore = true
|
||||
|
||||
[[object]]
|
||||
name = "Gst.PadTemplate"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "Gst.GhostPad"
|
||||
status = "generate"
|
||||
|
@ -487,6 +495,7 @@ status = "generate"
|
|||
[[object]]
|
||||
name = "Gst.Stream"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object.property]]
|
||||
name = "caps"
|
||||
|
@ -516,6 +525,7 @@ status = "generate"
|
|||
[[object]]
|
||||
name = "Gst.StreamCollection"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object.property]]
|
||||
name = "upstream-id"
|
||||
|
|
|
@ -14,18 +14,12 @@ external_libraries = [
|
|||
]
|
||||
|
||||
generate = [
|
||||
"GstPlayer.PlayerAudioInfo",
|
||||
"GstPlayer.PlayerColorBalanceType",
|
||||
"GstPlayer.PlayerError",
|
||||
"GstPlayer.PlayerGMainContextSignalDispatcher",
|
||||
"GstPlayer.PlayerMediaInfo",
|
||||
"GstPlayer.PlayerSignalDispatcher",
|
||||
"GstPlayer.PlayerSnapshotFormat",
|
||||
"GstPlayer.PlayerState",
|
||||
"GstPlayer.PlayerStreamInfo",
|
||||
"GstPlayer.PlayerSubtitleInfo",
|
||||
"GstPlayer.PlayerVideoInfo",
|
||||
"GstPlayer.PlayerVideoOverlayVideoRenderer",
|
||||
"GstPlayer.PlayerVideoRenderer",
|
||||
"GstPlayer.PlayerVisualization",
|
||||
]
|
||||
|
@ -59,7 +53,6 @@ name = "Gst.Structure"
|
|||
status = "manual"
|
||||
ref_mode = "ref-mut"
|
||||
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.Player"
|
||||
status = "generate"
|
||||
|
@ -130,3 +123,33 @@ trait = false
|
|||
[[object.signal]]
|
||||
name = "warning"
|
||||
concurrency = "send"
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.PlayerAudioInfo"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.PlayerVideoInfo"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.PlayerSubtitleInfo"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.PlayerMediaInfo"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.PlayerVideoOverlayVideoRenderer"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstPlayer.PlayerGMainContextSignalDispatcher"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
mod player;
|
||||
|
@ -6,15 +6,12 @@ pub use self::player::Player;
|
|||
|
||||
mod player_audio_info;
|
||||
pub use self::player_audio_info::PlayerAudioInfo;
|
||||
pub use self::player_audio_info::PlayerAudioInfoExt;
|
||||
|
||||
mod player_g_main_context_signal_dispatcher;
|
||||
pub use self::player_g_main_context_signal_dispatcher::PlayerGMainContextSignalDispatcher;
|
||||
pub use self::player_g_main_context_signal_dispatcher::PlayerGMainContextSignalDispatcherExt;
|
||||
|
||||
mod player_media_info;
|
||||
pub use self::player_media_info::PlayerMediaInfo;
|
||||
pub use self::player_media_info::PlayerMediaInfoExt;
|
||||
|
||||
mod player_signal_dispatcher;
|
||||
pub use self::player_signal_dispatcher::PlayerSignalDispatcher;
|
||||
|
@ -26,15 +23,12 @@ pub use self::player_stream_info::PlayerStreamInfoExt;
|
|||
|
||||
mod player_subtitle_info;
|
||||
pub use self::player_subtitle_info::PlayerSubtitleInfo;
|
||||
pub use self::player_subtitle_info::PlayerSubtitleInfoExt;
|
||||
|
||||
mod player_video_info;
|
||||
pub use self::player_video_info::PlayerVideoInfo;
|
||||
pub use self::player_video_info::PlayerVideoInfoExt;
|
||||
|
||||
mod player_video_overlay_video_renderer;
|
||||
pub use self::player_video_overlay_video_renderer::PlayerVideoOverlayVideoRenderer;
|
||||
pub use self::player_video_overlay_video_renderer::PlayerVideoOverlayVideoRendererExt;
|
||||
|
||||
mod player_video_renderer;
|
||||
pub use self::player_video_renderer::PlayerVideoRenderer;
|
||||
|
@ -51,13 +45,7 @@ pub use self::enums::PlayerState;
|
|||
|
||||
#[doc(hidden)]
|
||||
pub mod traits {
|
||||
pub use super::PlayerAudioInfoExt;
|
||||
pub use super::PlayerGMainContextSignalDispatcherExt;
|
||||
pub use super::PlayerMediaInfoExt;
|
||||
pub use super::PlayerSignalDispatcherExt;
|
||||
pub use super::PlayerStreamInfoExt;
|
||||
pub use super::PlayerSubtitleInfoExt;
|
||||
pub use super::PlayerVideoInfoExt;
|
||||
pub use super::PlayerVideoOverlayVideoRendererExt;
|
||||
pub use super::PlayerVideoRendererExt;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Error;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use PlayerStreamInfo;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -18,49 +17,37 @@ glib_wrapper! {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerAudioInfo {}
|
||||
unsafe impl Sync for PlayerAudioInfo {}
|
||||
|
||||
pub trait PlayerAudioInfoExt {
|
||||
fn get_bitrate(&self) -> i32;
|
||||
|
||||
fn get_channels(&self) -> i32;
|
||||
|
||||
fn get_language(&self) -> Option<String>;
|
||||
|
||||
fn get_max_bitrate(&self) -> i32;
|
||||
|
||||
fn get_sample_rate(&self) -> i32;
|
||||
}
|
||||
|
||||
impl<O: IsA<PlayerAudioInfo>> PlayerAudioInfoExt for O {
|
||||
fn get_bitrate(&self) -> i32 {
|
||||
impl PlayerAudioInfo {
|
||||
pub fn get_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_channels(&self) -> i32 {
|
||||
pub fn get_channels(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_channels(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_language(&self) -> Option<String> {
|
||||
pub fn get_language(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_audio_info_get_language(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_max_bitrate(&self) -> i32 {
|
||||
pub fn get_max_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_max_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_sample_rate(&self) -> i32 {
|
||||
pub fn get_sample_rate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_sample_rate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerAudioInfo {}
|
||||
unsafe impl Sync for PlayerAudioInfo {}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use PlayerSignalDispatcher;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::Value;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -21,6 +20,14 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl PlayerGMainContextSignalDispatcher {
|
||||
pub fn get_property_application_context(&self) -> Option<glib::MainContext> {
|
||||
let mut value = Value::from(None::<&glib::MainContext>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "application-context".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
pub fn new<'a, P: Into<Option<&'a glib::MainContext>>>(application_context: P) -> Option<PlayerSignalDispatcher> {
|
||||
assert_initialized_main_thread!();
|
||||
let application_context = application_context.into();
|
||||
|
@ -33,17 +40,3 @@ impl PlayerGMainContextSignalDispatcher {
|
|||
|
||||
unsafe impl Send for PlayerGMainContextSignalDispatcher {}
|
||||
unsafe impl Sync for PlayerGMainContextSignalDispatcher {}
|
||||
|
||||
pub trait PlayerGMainContextSignalDispatcherExt {
|
||||
fn get_property_application_context(&self) -> Option<glib::MainContext>;
|
||||
}
|
||||
|
||||
impl<O: IsA<PlayerGMainContextSignalDispatcher> + IsA<glib::object::Object>> PlayerGMainContextSignalDispatcherExt for O {
|
||||
fn get_property_application_context(&self) -> Option<glib::MainContext> {
|
||||
let mut value = Value::from(None::<&glib::MainContext>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "application-context".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use PlayerAudioInfo;
|
||||
|
@ -6,7 +6,6 @@ use PlayerStreamInfo;
|
|||
use PlayerSubtitleInfo;
|
||||
use PlayerVideoInfo;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -22,137 +21,103 @@ glib_wrapper! {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerMediaInfo {}
|
||||
unsafe impl Sync for PlayerMediaInfo {}
|
||||
|
||||
pub trait PlayerMediaInfoExt {
|
||||
fn get_audio_streams(&self) -> Vec<PlayerAudioInfo>;
|
||||
|
||||
fn get_container_format(&self) -> Option<String>;
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_image_sample(&self) -> Option<gst::Sample>;
|
||||
|
||||
fn get_number_of_audio_streams(&self) -> u32;
|
||||
|
||||
fn get_number_of_streams(&self) -> u32;
|
||||
|
||||
fn get_number_of_subtitle_streams(&self) -> u32;
|
||||
|
||||
fn get_number_of_video_streams(&self) -> u32;
|
||||
|
||||
fn get_stream_list(&self) -> Vec<PlayerStreamInfo>;
|
||||
|
||||
fn get_subtitle_streams(&self) -> Vec<PlayerSubtitleInfo>;
|
||||
|
||||
fn get_tags(&self) -> Option<gst::TagList>;
|
||||
|
||||
fn get_title(&self) -> Option<String>;
|
||||
|
||||
fn get_uri(&self) -> Option<String>;
|
||||
|
||||
fn get_video_streams(&self) -> Vec<PlayerVideoInfo>;
|
||||
|
||||
fn is_live(&self) -> bool;
|
||||
|
||||
fn is_seekable(&self) -> bool;
|
||||
}
|
||||
|
||||
impl<O: IsA<PlayerMediaInfo>> PlayerMediaInfoExt for O {
|
||||
fn get_audio_streams(&self) -> Vec<PlayerAudioInfo> {
|
||||
impl PlayerMediaInfo {
|
||||
pub fn get_audio_streams(&self) -> Vec<PlayerAudioInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_audio_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_container_format(&self) -> Option<String> {
|
||||
pub fn get_container_format(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
pub fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_duration(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_image_sample(&self) -> Option<gst::Sample> {
|
||||
pub fn get_image_sample(&self) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_image_sample(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_number_of_audio_streams(&self) -> u32 {
|
||||
pub fn get_number_of_audio_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_number_of_streams(&self) -> u32 {
|
||||
pub fn get_number_of_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_number_of_subtitle_streams(&self) -> u32 {
|
||||
pub fn get_number_of_subtitle_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_number_of_video_streams(&self) -> u32 {
|
||||
pub fn get_number_of_video_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_list(&self) -> Vec<PlayerStreamInfo> {
|
||||
pub fn get_stream_list(&self) -> Vec<PlayerStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_stream_list(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_subtitle_streams(&self) -> Vec<PlayerSubtitleInfo> {
|
||||
pub fn get_subtitle_streams(&self) -> Vec<PlayerSubtitleInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tags(&self) -> Option<gst::TagList> {
|
||||
pub fn get_tags(&self) -> Option<gst::TagList> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_tags(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_title(&self) -> Option<String> {
|
||||
pub fn get_title(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_uri(&self) -> Option<String> {
|
||||
pub fn get_uri(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_video_streams(&self) -> Vec<PlayerVideoInfo> {
|
||||
pub fn get_video_streams(&self) -> Vec<PlayerVideoInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_video_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_live(&self) -> bool {
|
||||
pub fn is_live(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_media_info_is_live(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_seekable(&self) -> bool {
|
||||
pub fn is_seekable(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_media_info_is_seekable(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerMediaInfo {}
|
||||
unsafe impl Sync for PlayerMediaInfo {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use PlayerStreamInfo;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -18,17 +17,13 @@ glib_wrapper! {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerSubtitleInfo {}
|
||||
unsafe impl Sync for PlayerSubtitleInfo {}
|
||||
|
||||
pub trait PlayerSubtitleInfoExt {
|
||||
fn get_language(&self) -> Option<String>;
|
||||
}
|
||||
|
||||
impl<O: IsA<PlayerSubtitleInfo>> PlayerSubtitleInfoExt for O {
|
||||
fn get_language(&self) -> Option<String> {
|
||||
impl PlayerSubtitleInfo {
|
||||
pub fn get_language(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_subtitle_info_get_language(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerSubtitleInfo {}
|
||||
unsafe impl Sync for PlayerSubtitleInfo {}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use PlayerStreamInfo;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -18,31 +17,14 @@ glib_wrapper! {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerVideoInfo {}
|
||||
unsafe impl Sync for PlayerVideoInfo {}
|
||||
|
||||
pub trait PlayerVideoInfoExt {
|
||||
fn get_bitrate(&self) -> i32;
|
||||
|
||||
fn get_framerate(&self) -> (i32, i32);
|
||||
|
||||
fn get_height(&self) -> i32;
|
||||
|
||||
fn get_max_bitrate(&self) -> i32;
|
||||
|
||||
fn get_pixel_aspect_ratio(&self) -> (u32, u32);
|
||||
|
||||
fn get_width(&self) -> i32;
|
||||
}
|
||||
|
||||
impl<O: IsA<PlayerVideoInfo>> PlayerVideoInfoExt for O {
|
||||
fn get_bitrate(&self) -> i32 {
|
||||
impl PlayerVideoInfo {
|
||||
pub fn get_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_framerate(&self) -> (i32, i32) {
|
||||
pub fn get_framerate(&self) -> (i32, i32) {
|
||||
unsafe {
|
||||
let mut fps_n = mem::uninitialized();
|
||||
let mut fps_d = mem::uninitialized();
|
||||
|
@ -51,19 +33,19 @@ impl<O: IsA<PlayerVideoInfo>> PlayerVideoInfoExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_height(&self) -> i32 {
|
||||
pub fn get_height(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_height(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_max_bitrate(&self) -> i32 {
|
||||
pub fn get_max_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_max_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_pixel_aspect_ratio(&self) -> (u32, u32) {
|
||||
pub fn get_pixel_aspect_ratio(&self) -> (u32, u32) {
|
||||
unsafe {
|
||||
let mut par_n = mem::uninitialized();
|
||||
let mut par_d = mem::uninitialized();
|
||||
|
@ -72,9 +54,12 @@ impl<O: IsA<PlayerVideoInfo>> PlayerVideoInfoExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_width(&self) -> i32 {
|
||||
pub fn get_width(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_width(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PlayerVideoInfo {}
|
||||
unsafe impl Sync for PlayerVideoInfo {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use PlayerVideoRenderer;
|
||||
|
@ -22,6 +22,51 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl PlayerVideoOverlayVideoRenderer {
|
||||
pub fn expose(&self) {
|
||||
unsafe {
|
||||
ffi::gst_player_video_overlay_video_renderer_expose(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_render_rectangle(&self) -> (i32, i32, i32, i32) {
|
||||
unsafe {
|
||||
let mut x = mem::uninitialized();
|
||||
let mut y = mem::uninitialized();
|
||||
let mut width = mem::uninitialized();
|
||||
let mut height = mem::uninitialized();
|
||||
ffi::gst_player_video_overlay_video_renderer_get_render_rectangle(self.to_glib_none().0, &mut x, &mut y, &mut width, &mut height);
|
||||
(x, y, width, height)
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_window_handle(&self) -> /*Unimplemented*/Option<Fundamental: Pointer> {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_get_window_handle() }
|
||||
//}
|
||||
|
||||
pub fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) {
|
||||
unsafe {
|
||||
ffi::gst_player_video_overlay_video_renderer_set_render_rectangle(self.to_glib_none().0, x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn set_window_handle<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, window_handle: P) {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_set_window_handle() }
|
||||
//}
|
||||
|
||||
pub fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||
let mut value = Value::from(None::<&gst::Element>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-sink".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
pub fn set_property_video_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-sink".to_glib_none().0, Value::from(video_sink).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn new<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(window_handle: P) -> Option<PlayerVideoRenderer> {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new() }
|
||||
//}
|
||||
|
@ -33,66 +78,3 @@ impl PlayerVideoOverlayVideoRenderer {
|
|||
|
||||
unsafe impl Send for PlayerVideoOverlayVideoRenderer {}
|
||||
unsafe impl Sync for PlayerVideoOverlayVideoRenderer {}
|
||||
|
||||
pub trait PlayerVideoOverlayVideoRendererExt {
|
||||
fn expose(&self);
|
||||
|
||||
fn get_render_rectangle(&self) -> (i32, i32, i32, i32);
|
||||
|
||||
//fn get_window_handle(&self) -> /*Unimplemented*/Option<Fundamental: Pointer>;
|
||||
|
||||
fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32);
|
||||
|
||||
//fn set_window_handle<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, window_handle: P);
|
||||
|
||||
fn get_property_video_sink(&self) -> Option<gst::Element>;
|
||||
|
||||
fn set_property_video_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>);
|
||||
}
|
||||
|
||||
impl<O: IsA<PlayerVideoOverlayVideoRenderer> + IsA<glib::object::Object>> PlayerVideoOverlayVideoRendererExt for O {
|
||||
fn expose(&self) {
|
||||
unsafe {
|
||||
ffi::gst_player_video_overlay_video_renderer_expose(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_render_rectangle(&self) -> (i32, i32, i32, i32) {
|
||||
unsafe {
|
||||
let mut x = mem::uninitialized();
|
||||
let mut y = mem::uninitialized();
|
||||
let mut width = mem::uninitialized();
|
||||
let mut height = mem::uninitialized();
|
||||
ffi::gst_player_video_overlay_video_renderer_get_render_rectangle(self.to_glib_none().0, &mut x, &mut y, &mut width, &mut height);
|
||||
(x, y, width, height)
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_window_handle(&self) -> /*Unimplemented*/Option<Fundamental: Pointer> {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_get_window_handle() }
|
||||
//}
|
||||
|
||||
fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) {
|
||||
unsafe {
|
||||
ffi::gst_player_video_overlay_video_renderer_set_render_rectangle(self.to_glib_none().0, x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_window_handle<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, window_handle: P) {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_set_window_handle() }
|
||||
//}
|
||||
|
||||
fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||
let mut value = Value::from(None::<&gst::Element>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-sink".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
}
|
||||
value.get()
|
||||
}
|
||||
|
||||
fn set_property_video_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-sink".to_glib_none().0, Value::from(video_sink).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (3294959) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[allow(unused_imports)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ChildProxy;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ClockTime;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ClockTime;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Caps;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use DeviceProvider;
|
||||
|
@ -6,7 +6,6 @@ use Object;
|
|||
use Rank;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -22,6 +21,44 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl DeviceProviderFactory {
|
||||
pub fn get(&self) -> Option<DeviceProvider> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_device_provider_factory_get(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_device_provider_type(&self) -> glib::types::Type {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_device_provider_factory_get_device_provider_type(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_metadata(&self, key: &str) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_device_provider_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_metadata_keys(&self) -> Vec<String> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_classes<'a, P: Into<Option<&'a str>>>(&self, classes: P) -> bool {
|
||||
let classes = classes.into();
|
||||
let classes = classes.to_glib_none();
|
||||
unsafe {
|
||||
from_glib(ffi::gst_device_provider_factory_has_classes(self.to_glib_none().0, classes.0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_classesv(&self, classes: &[&str]) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_device_provider_factory_has_classesv(self.to_glib_none().0, classes.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find(name: &str) -> Option<DeviceProviderFactory> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
|
@ -46,57 +83,3 @@ impl DeviceProviderFactory {
|
|||
|
||||
unsafe impl Send for DeviceProviderFactory {}
|
||||
unsafe impl Sync for DeviceProviderFactory {}
|
||||
|
||||
pub trait DeviceProviderFactoryExt {
|
||||
fn get(&self) -> Option<DeviceProvider>;
|
||||
|
||||
fn get_device_provider_type(&self) -> glib::types::Type;
|
||||
|
||||
fn get_metadata(&self, key: &str) -> Option<String>;
|
||||
|
||||
fn get_metadata_keys(&self) -> Vec<String>;
|
||||
|
||||
fn has_classes<'a, P: Into<Option<&'a str>>>(&self, classes: P) -> bool;
|
||||
|
||||
fn has_classesv(&self, classes: &[&str]) -> bool;
|
||||
}
|
||||
|
||||
impl<O: IsA<DeviceProviderFactory>> DeviceProviderFactoryExt for O {
|
||||
fn get(&self) -> Option<DeviceProvider> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_device_provider_factory_get(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_device_provider_type(&self) -> glib::types::Type {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_device_provider_factory_get_device_provider_type(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_metadata(&self, key: &str) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_device_provider_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_metadata_keys(&self) -> Vec<String> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn has_classes<'a, P: Into<Option<&'a str>>>(&self, classes: P) -> bool {
|
||||
let classes = classes.into();
|
||||
let classes = classes.to_glib_none();
|
||||
unsafe {
|
||||
from_glib(ffi::gst_device_provider_factory_has_classes(self.to_glib_none().0, classes.0))
|
||||
}
|
||||
}
|
||||
|
||||
fn has_classesv(&self, classes: &[&str]) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_device_provider_factory_has_classesv(self.to_glib_none().0, classes.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Caps;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bin;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Object;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
mod bin;
|
||||
|
@ -30,7 +30,6 @@ pub use self::device_provider::DeviceProviderExt;
|
|||
|
||||
mod device_provider_factory;
|
||||
pub use self::device_provider_factory::DeviceProviderFactory;
|
||||
pub use self::device_provider_factory::DeviceProviderFactoryExt;
|
||||
|
||||
mod element;
|
||||
pub use self::element::Element;
|
||||
|
@ -53,7 +52,6 @@ pub use self::pad::PadExt;
|
|||
|
||||
mod pad_template;
|
||||
pub use self::pad_template::PadTemplate;
|
||||
pub use self::pad_template::PadTemplateExt;
|
||||
|
||||
mod pipeline;
|
||||
pub use self::pipeline::Pipeline;
|
||||
|
@ -74,15 +72,11 @@ pub use self::proxy_pad::ProxyPadExt;
|
|||
mod stream;
|
||||
#[cfg(feature = "v1_10")]
|
||||
pub use self::stream::Stream;
|
||||
#[cfg(feature = "v1_10")]
|
||||
pub use self::stream::StreamExt;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
mod stream_collection;
|
||||
#[cfg(feature = "v1_10")]
|
||||
pub use self::stream_collection::StreamCollection;
|
||||
#[cfg(feature = "v1_10")]
|
||||
pub use self::stream_collection::StreamCollectionExt;
|
||||
|
||||
mod system_clock;
|
||||
pub use self::system_clock::SystemClock;
|
||||
|
@ -245,19 +239,13 @@ pub mod traits {
|
|||
pub use super::DeviceExt;
|
||||
pub use super::DeviceMonitorExt;
|
||||
pub use super::DeviceProviderExt;
|
||||
pub use super::DeviceProviderFactoryExt;
|
||||
pub use super::ElementExt;
|
||||
pub use super::GhostPadExt;
|
||||
pub use super::GstObjectExt;
|
||||
pub use super::PadExt;
|
||||
pub use super::PadTemplateExt;
|
||||
pub use super::PipelineExt;
|
||||
pub use super::PresetExt;
|
||||
pub use super::ProxyPadExt;
|
||||
#[cfg(feature = "v1_10")]
|
||||
pub use super::StreamExt;
|
||||
#[cfg(feature = "v1_10")]
|
||||
pub use super::StreamCollectionExt;
|
||||
pub use super::SystemClockExt;
|
||||
pub use super::TagSetterExt;
|
||||
pub use super::TocSetterExt;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ClockTime;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Caps;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Caps;
|
||||
|
@ -7,9 +7,7 @@ use Pad;
|
|||
use PadDirection;
|
||||
use PadPresence;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::Value;
|
||||
use glib::object::Downcast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
|
@ -35,39 +33,20 @@ impl PadTemplate {
|
|||
from_glib_none(ffi::gst_pad_template_new(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for PadTemplate {}
|
||||
unsafe impl Sync for PadTemplate {}
|
||||
|
||||
pub trait PadTemplateExt {
|
||||
fn get_caps(&self) -> Option<Caps>;
|
||||
|
||||
fn pad_created<P: IsA<Pad>>(&self, pad: &P);
|
||||
|
||||
fn get_property_direction(&self) -> PadDirection;
|
||||
|
||||
fn get_property_name_template(&self) -> Option<String>;
|
||||
|
||||
fn get_property_presence(&self) -> PadPresence;
|
||||
|
||||
fn connect_pad_created<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<PadTemplate> + IsA<glib::object::Object>> PadTemplateExt for O {
|
||||
fn get_caps(&self) -> Option<Caps> {
|
||||
pub fn get_caps(&self) -> Option<Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pad_template_get_caps(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn pad_created<P: IsA<Pad>>(&self, pad: &P) {
|
||||
pub fn pad_created<P: IsA<Pad>>(&self, pad: &P) {
|
||||
unsafe {
|
||||
ffi::gst_pad_template_pad_created(self.to_glib_none().0, pad.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_direction(&self) -> PadDirection {
|
||||
pub fn get_property_direction(&self) -> PadDirection {
|
||||
let mut value = Value::from(&0);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "direction".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
|
@ -75,7 +54,7 @@ impl<O: IsA<PadTemplate> + IsA<glib::object::Object>> PadTemplateExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_name_template(&self) -> Option<String> {
|
||||
pub fn get_property_name_template(&self) -> Option<String> {
|
||||
let mut value = Value::from(None::<&str>);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "name-template".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
|
@ -83,7 +62,7 @@ impl<O: IsA<PadTemplate> + IsA<glib::object::Object>> PadTemplateExt for O {
|
|||
value.get()
|
||||
}
|
||||
|
||||
fn get_property_presence(&self) -> PadPresence {
|
||||
pub fn get_property_presence(&self) -> PadPresence {
|
||||
let mut value = Value::from(&0);
|
||||
unsafe {
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "presence".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
|
@ -91,18 +70,20 @@ impl<O: IsA<PadTemplate> + IsA<glib::object::Object>> PadTemplateExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn connect_pad_created<F: Fn(&Self, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
pub fn connect_pad_created<F: Fn(&PadTemplate, &Pad) + Send + Sync + 'static>(&self, f: F) -> u64 {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&Self, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
let f: Box_<Box_<Fn(&PadTemplate, &Pad) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "pad-created",
|
||||
transmute(pad_created_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||
transmute(pad_created_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn pad_created_trampoline<P>(this: *mut ffi::GstPadTemplate, pad: *mut ffi::GstPad, f: glib_ffi::gpointer)
|
||||
where P: IsA<PadTemplate> {
|
||||
unsafe impl Send for PadTemplate {}
|
||||
unsafe impl Sync for PadTemplate {}
|
||||
|
||||
unsafe extern "C" fn pad_created_trampoline(this: *mut ffi::GstPadTemplate, pad: *mut ffi::GstPad, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f);
|
||||
f(&PadTemplate::from_glib_none(this).downcast_unchecked(), &from_glib_none(pad))
|
||||
let f: &&(Fn(&PadTemplate, &Pad) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_none(this), &from_glib_none(pad))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Bin;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Iterator;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
|
@ -11,7 +11,6 @@ use StreamType;
|
|||
#[cfg(feature = "v1_10")]
|
||||
use TagList;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -38,78 +37,44 @@ impl Stream {
|
|||
from_glib_full(ffi::gst_stream_new(stream_id.0, caps.0, type_.to_glib(), flags.to_glib()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Stream {}
|
||||
unsafe impl Sync for Stream {}
|
||||
|
||||
pub trait StreamExt {
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_caps(&self) -> Option<Caps>;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream_flags(&self) -> StreamFlags;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream_id(&self) -> Option<String>;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream_type(&self) -> StreamType;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_tags(&self) -> Option<TagList>;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_caps<'a, P: Into<Option<&'a Caps>>>(&self, caps: P);
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_stream_flags(&self, flags: StreamFlags);
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_stream_type(&self, stream_type: StreamType);
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_tags<'a, P: Into<Option<&'a TagList>>>(&self, tags: P);
|
||||
}
|
||||
|
||||
impl<O: IsA<Stream>> StreamExt for O {
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_caps(&self) -> Option<Caps> {
|
||||
pub fn get_caps(&self) -> Option<Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_stream_get_caps(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream_flags(&self) -> StreamFlags {
|
||||
pub fn get_stream_flags(&self) -> StreamFlags {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_stream_get_stream_flags(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream_id(&self) -> Option<String> {
|
||||
pub fn get_stream_id(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_stream_get_stream_id(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream_type(&self) -> StreamType {
|
||||
pub fn get_stream_type(&self) -> StreamType {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_stream_get_stream_type(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_tags(&self) -> Option<TagList> {
|
||||
pub fn get_tags(&self) -> Option<TagList> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_stream_get_tags(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_caps<'a, P: Into<Option<&'a Caps>>>(&self, caps: P) {
|
||||
pub fn set_caps<'a, P: Into<Option<&'a Caps>>>(&self, caps: P) {
|
||||
let caps = caps.into();
|
||||
let caps = caps.to_glib_none();
|
||||
unsafe {
|
||||
|
@ -118,21 +83,21 @@ impl<O: IsA<Stream>> StreamExt for O {
|
|||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_stream_flags(&self, flags: StreamFlags) {
|
||||
pub fn set_stream_flags(&self, flags: StreamFlags) {
|
||||
unsafe {
|
||||
ffi::gst_stream_set_stream_flags(self.to_glib_none().0, flags.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_stream_type(&self, stream_type: StreamType) {
|
||||
pub fn set_stream_type(&self, stream_type: StreamType) {
|
||||
unsafe {
|
||||
ffi::gst_stream_set_stream_type(self.to_glib_none().0, stream_type.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn set_tags<'a, P: Into<Option<&'a TagList>>>(&self, tags: P) {
|
||||
pub fn set_tags<'a, P: Into<Option<&'a TagList>>>(&self, tags: P) {
|
||||
let tags = tags.into();
|
||||
let tags = tags.to_glib_none();
|
||||
unsafe {
|
||||
|
@ -140,3 +105,6 @@ impl<O: IsA<Stream>> StreamExt for O {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Stream {}
|
||||
unsafe impl Sync for Stream {}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Object;
|
||||
#[cfg(feature = "v1_10")]
|
||||
use Stream;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
|
@ -30,57 +29,39 @@ impl StreamCollection {
|
|||
from_glib_full(ffi::gst_stream_collection_new(upstream_id.0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for StreamCollection {}
|
||||
unsafe impl Sync for StreamCollection {}
|
||||
|
||||
pub trait StreamCollectionExt {
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn add_stream(&self, stream: &Stream) -> bool;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_size(&self) -> u32;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream(&self, index: u32) -> Option<Stream>;
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_upstream_id(&self) -> Option<String>;
|
||||
|
||||
//fn connect_stream_notify<Unsupported or ignored types>(&self, f: F) -> u64;
|
||||
}
|
||||
|
||||
impl<O: IsA<StreamCollection>> StreamCollectionExt for O {
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn add_stream(&self, stream: &Stream) -> bool {
|
||||
pub fn add_stream(&self, stream: &Stream) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_stream_collection_add_stream(self.to_glib_none().0, stream.to_glib_full()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_size(&self) -> u32 {
|
||||
pub fn get_size(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_stream_collection_get_size(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_stream(&self, index: u32) -> Option<Stream> {
|
||||
pub fn get_stream(&self, index: u32) -> Option<Stream> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_stream_collection_get_stream(self.to_glib_none().0, index))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_10")]
|
||||
fn get_upstream_id(&self) -> Option<String> {
|
||||
pub fn get_upstream_id(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_stream_collection_get_upstream_id(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn connect_stream_notify<Unsupported or ignored types>(&self, f: F) -> u64 {
|
||||
//pub fn connect_stream_notify<Unsupported or ignored types>(&self, f: F) -> u64 {
|
||||
// Ignored p0: GObject.ParamSpec
|
||||
//}
|
||||
}
|
||||
|
||||
unsafe impl Send for StreamCollection {}
|
||||
unsafe impl Sync for StreamCollection {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Clock;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Element;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Element;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file was generated by gir (cf27827) from gir-files (???)
|
||||
// This file was generated by gir (651da6e) from gir-files (???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use Error;
|
||||
|
|
Loading…
Reference in a new issue