forked from mirrors/gstreamer-rs
Add BaseSrc/BaseSink and URIHandler base types to AppSrc/AppSink
And also depend on the gstreamer-base bindings for that.
This commit is contained in:
parent
55ef03110a
commit
96d00c4ecc
5 changed files with 18 additions and 2 deletions
|
@ -12,6 +12,7 @@ external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
"GObject",
|
"GObject",
|
||||||
"Gst",
|
"Gst",
|
||||||
|
"GstBase",
|
||||||
]
|
]
|
||||||
|
|
||||||
generate = [
|
generate = [
|
||||||
|
@ -22,9 +23,12 @@ manual = [
|
||||||
"GObject.Object",
|
"GObject.Object",
|
||||||
"Gst.Object",
|
"Gst.Object",
|
||||||
"Gst.Element",
|
"Gst.Element",
|
||||||
|
"Gst.URIHandler",
|
||||||
"Gst.ClockTime",
|
"Gst.ClockTime",
|
||||||
"Gst.FlowReturn",
|
"Gst.FlowReturn",
|
||||||
"Gst.Format",
|
"Gst.Format",
|
||||||
|
"GstBase.BaseSrc",
|
||||||
|
"GstBase.BaseSink",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
|
|
|
@ -18,17 +18,19 @@ libc = "0.2"
|
||||||
glib-sys = { git = "https://github.com/gtk-rs/sys" }
|
glib-sys = { git = "https://github.com/gtk-rs/sys" }
|
||||||
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
|
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
|
||||||
gstreamer-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_8"] }
|
gstreamer-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_8"] }
|
||||||
|
gstreamer-base-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_8"] }
|
||||||
gstreamer-app-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_8"] }
|
gstreamer-app-sys = { git = "https://github.com/sdroege/gstreamer-sys", features = ["v1_8"] }
|
||||||
glib = { git = "https://github.com/gtk-rs/glib" }
|
glib = { git = "https://github.com/gtk-rs/glib" }
|
||||||
gstreamer = { path = "../gstreamer" }
|
gstreamer = { path = "../gstreamer" }
|
||||||
|
gstreamer-base = { path = "../gstreamer-base" }
|
||||||
|
|
||||||
[build-dependencies.rustdoc-stripper]
|
[build-dependencies.rustdoc-stripper]
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-app-sys/v1_10"]
|
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-base/v1_10", "gstreamer-app-sys/v1_10"]
|
||||||
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-app-sys/v1_12", "v1_10"]
|
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base/v1_12", "gstreamer-app-sys/v1_12", "v1_10"]
|
||||||
embed-lgpl-docs = ["rustdoc-stripper"]
|
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||||
default-features = []
|
default-features = []
|
||||||
|
|
|
@ -9,6 +9,8 @@ use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
|
use gst_base;
|
||||||
|
use gst_base_ffi;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
@ -17,8 +19,10 @@ use std::ptr;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct AppSink(Object<ffi::GstAppSink>): [
|
pub struct AppSink(Object<ffi::GstAppSink>): [
|
||||||
|
gst_base::BaseSink => gst_base_ffi::GstBaseSink,
|
||||||
gst::Element => gst_ffi::GstElement,
|
gst::Element => gst_ffi::GstElement,
|
||||||
gst::Object => gst_ffi::GstObject,
|
gst::Object => gst_ffi::GstObject,
|
||||||
|
gst::URIHandler => gst_ffi::GstURIHandler,
|
||||||
];
|
];
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
|
|
|
@ -10,6 +10,8 @@ use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
|
use gst_base;
|
||||||
|
use gst_base_ffi;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
|
@ -19,8 +21,10 @@ use std::ptr;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct AppSrc(Object<ffi::GstAppSrc>): [
|
pub struct AppSrc(Object<ffi::GstAppSrc>): [
|
||||||
|
gst_base::BaseSrc => gst_base_ffi::GstBaseSrc,
|
||||||
gst::Element => gst_ffi::GstElement,
|
gst::Element => gst_ffi::GstElement,
|
||||||
gst::Object => gst_ffi::GstObject,
|
gst::Object => gst_ffi::GstObject,
|
||||||
|
gst::URIHandler => gst_ffi::GstURIHandler,
|
||||||
];
|
];
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
|
|
|
@ -11,8 +11,10 @@ extern crate libc;
|
||||||
extern crate glib_sys as glib_ffi;
|
extern crate glib_sys as glib_ffi;
|
||||||
extern crate gobject_sys as gobject_ffi;
|
extern crate gobject_sys as gobject_ffi;
|
||||||
extern crate gstreamer as gst;
|
extern crate gstreamer as gst;
|
||||||
|
extern crate gstreamer_base as gst_base;
|
||||||
extern crate gstreamer_app_sys as ffi;
|
extern crate gstreamer_app_sys as ffi;
|
||||||
extern crate gstreamer_sys as gst_ffi;
|
extern crate gstreamer_sys as gst_ffi;
|
||||||
|
extern crate gstreamer_base_sys as gst_base_ffi;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate glib;
|
extern crate glib;
|
||||||
|
|
Loading…
Reference in a new issue