ges: Work around trait naming conflicts

Fixes #151
This commit is contained in:
Thibault Saunier 2018-11-04 16:20:40 -03:00
parent 6570d67828
commit 7360e50280
5 changed files with 10 additions and 11 deletions

View file

@ -141,7 +141,7 @@ trait_name = "GESContainerExt"
[[object]]
name = "GES.Pipeline"
status = "generate"
trait_name = "PipelineExt"
trait_name = "GESPipelineExt"
[[object.function]]
name = "set_render_settings"
[object.function.return]
@ -160,7 +160,7 @@ trait_name = "PipelineExt"
[[object]]
name = "GES.Track"
status = "generate"
trait_name = "TrackExt"
trait_name = "GESTrackExt"
[[object.function]]
name = "add_element"
[object.function.return]

View file

@ -3,7 +3,6 @@ use gst::prelude::*;
extern crate gstreamer_editing_services as ges;
use ges::prelude::*;
use ges::PipelineExt;
use std::env;

View file

@ -35,7 +35,7 @@ pub use self::layer::LayerExt;
mod pipeline;
pub use self::pipeline::Pipeline;
pub use self::pipeline::PipelineExt;
pub use self::pipeline::GESPipelineExt;
mod project;
pub use self::project::Project;
@ -51,7 +51,7 @@ pub use self::timeline_element::TimelineElementExt;
mod track;
pub use self::track::Track;
pub use self::track::TrackExt;
pub use self::track::GESTrackExt;
mod track_element;
pub use self::track_element::TrackElement;
@ -86,11 +86,11 @@ pub mod traits {
pub use super::ExtractableExt;
pub use super::GroupExt;
pub use super::LayerExt;
pub use super::PipelineExt;
pub use super::GESPipelineExt;
pub use super::ProjectExt;
pub use super::TimelineExt;
pub use super::TimelineElementExt;
pub use super::TrackExt;
pub use super::GESTrackExt;
pub use super::TrackElementExt;
pub use super::UriClipExt;
pub use super::UriClipAssetExt;

View file

@ -51,7 +51,7 @@ impl Default for Pipeline {
}
}
pub trait PipelineExt {
pub trait GESPipelineExt {
fn get_mode(&self) -> PipelineFlags;
fn get_thumbnail(&self, caps: &gst::Caps) -> Option<gst::Sample>;
@ -105,7 +105,7 @@ pub trait PipelineExt {
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<Pipeline> + IsA<glib::object::Object>> PipelineExt for O {
impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
fn get_mode(&self) -> PipelineFlags {
unsafe {
from_glib(ffi::ges_pipeline_get_mode(self.to_glib_none().0))

View file

@ -43,7 +43,7 @@ impl Track {
}
}
pub trait TrackExt {
pub trait GESTrackExt {
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError>;
fn commit(&self) -> bool;
@ -91,7 +91,7 @@ pub trait TrackExt {
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<Track> + IsA<glib::object::Object>> TrackExt for O {
impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
unsafe {
glib::error::BoolError::from_glib(ffi::ges_track_add_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to add element")