Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gstreamer-rs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GStreamer
gstreamer-rs
Commits
9cfb83d6
Commit
9cfb83d6
authored
Jul 11, 2017
by
Sebastian Dröge
🍵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Source support to GstBus, and the sync message handler
parent
71c08855
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
108 additions
and
268 deletions
+108
-268
Cargo.lock
Cargo.lock
+10
-218
Gir_Gst.toml
Gir_Gst.toml
+7
-0
examples/Cargo.toml
examples/Cargo.toml
+0
-4
examples/src/launch_glib_main.rs
examples/src/launch_glib_main.rs
+26
-18
gstreamer/src/auto/alias.rs
gstreamer/src/auto/alias.rs
+4
-1
gstreamer/src/auto/bin.rs
gstreamer/src/auto/bin.rs
+1
-1
gstreamer/src/auto/bus.rs
gstreamer/src/auto/bus.rs
+2
-6
gstreamer/src/auto/clock.rs
gstreamer/src/auto/clock.rs
+1
-1
gstreamer/src/auto/device.rs
gstreamer/src/auto/device.rs
+1
-1
gstreamer/src/auto/device_monitor.rs
gstreamer/src/auto/device_monitor.rs
+1
-1
gstreamer/src/auto/device_provider.rs
gstreamer/src/auto/device_provider.rs
+1
-1
gstreamer/src/auto/device_provider_factory.rs
gstreamer/src/auto/device_provider_factory.rs
+1
-1
gstreamer/src/auto/element.rs
gstreamer/src/auto/element.rs
+1
-1
gstreamer/src/auto/element_factory.rs
gstreamer/src/auto/element_factory.rs
+1
-1
gstreamer/src/auto/enums.rs
gstreamer/src/auto/enums.rs
+37
-1
gstreamer/src/auto/flags.rs
gstreamer/src/auto/flags.rs
+1
-1
gstreamer/src/auto/functions.rs
gstreamer/src/auto/functions.rs
+1
-1
gstreamer/src/auto/mod.rs
gstreamer/src/auto/mod.rs
+2
-1
gstreamer/src/auto/object.rs
gstreamer/src/auto/object.rs
+1
-1
gstreamer/src/auto/pad.rs
gstreamer/src/auto/pad.rs
+1
-1
gstreamer/src/auto/pad_template.rs
gstreamer/src/auto/pad_template.rs
+1
-1
gstreamer/src/auto/pipeline.rs
gstreamer/src/auto/pipeline.rs
+1
-1
gstreamer/src/auto/plugin.rs
gstreamer/src/auto/plugin.rs
+1
-1
gstreamer/src/auto/stream.rs
gstreamer/src/auto/stream.rs
+1
-1
gstreamer/src/auto/stream_collection.rs
gstreamer/src/auto/stream_collection.rs
+1
-1
gstreamer/src/auto/u_r_i_handler.rs
gstreamer/src/auto/u_r_i_handler.rs
+1
-1
gstreamer/src/caps.rs
gstreamer/src/caps.rs
+1
-1
gstreamer/src/lib.rs
gstreamer/src/lib.rs
+1
-0
No files found.
Cargo.lock
View file @
9cfb83d6
...
...
@@ -7,19 +7,7 @@ dependencies = [
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gstreamer-sys 0.1.1 (git+https://github.com/sdroege/gstreamer-sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "atk-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#113444397b56ffda5214ffcc5a2ed80c25020fe5"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -27,157 +15,44 @@ name = "bitflags"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "c_vec"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cairo-rs"
version = "0.1.3"
source = "git+https://github.com/gtk-rs/cairo#ef0c3315a57b5cd7134801779c111c6b7d84a410"
dependencies = [
"c_vec 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-sys-rs 0.3.4 (git+https://github.com/gtk-rs/cairo)",
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cairo-sys-rs"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/cairo#ef0c3315a57b5cd7134801779c111c6b7d84a410"
dependencies = [
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "examples"
version = "0.1.0"
dependencies = [
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gstreamer 0.1.0",
"gstreamer-sys 0.1.1 (git+https://github.com/sdroege/gstreamer-sys)",
"gtk 0.1.3 (git+https://github.com/gtk-rs/gtk)",
]
[[package]]
name = "gdk"
version = "0.5.3"
source = "git+https://github.com/gtk-rs/gdk#6f6487a46874be4e96659f6697b480a8345d2690"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-rs 0.1.3 (git+https://github.com/gtk-rs/cairo)",
"cairo-sys-rs 0.3.4 (git+https://github.com/gtk-rs/cairo)",
"gdk-pixbuf 0.1.3 (git+https://github.com/gtk-rs/gdk-pixbuf)",
"gdk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gio 0.1.3 (git+https://github.com/gtk-rs/gio)",
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pango 0.1.3 (git+https://github.com/gtk-rs/pango)",
]
[[package]]
name = "gdk-pixbuf"
version = "0.1.3"
source = "git+https://github.com/gtk-rs/gdk-pixbuf#191812c0157e798dd680a34120bb1a5512bdb23f"
dependencies = [
"gdk-pixbuf-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gdk-pixbuf-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#113444397b56ffda5214ffcc5a2ed80c25020fe5"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gio-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gdk-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#113444397b56ffda5214ffcc5a2ed80c25020fe5"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-sys-rs 0.3.4 (git+https://github.com/gtk-rs/cairo)",
"gdk-pixbuf-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gio-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pango-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gio"
version = "0.1.3"
source = "git+https://github.com/gtk-rs/gio#c410bf7ca4561b6ee9a48e605474824e3eff85e5"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gio-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gio-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#113444397b56ffda5214ffcc5a2ed80c25020fe5"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "glib"
version = "0.1.3"
source = "git+https://github.com/gtk-rs/glib#
f874842c0a660165c08c2b522551cd6673431b39
"
source = "git+https://github.com/gtk-rs/glib#
aaad1963ea3b1b45c62a3f49a7a1ed0a7f3b12ab
"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.2
4
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.2
6
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "glib-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#
113444397b56ffda5214ffcc5a2ed80c25020fe5
"
source = "git+https://github.com/gtk-rs/sys#
9354d21dfdb9174bfecafbd75cf2a7c0c8ba5759
"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.2
4
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.2
6
(registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gobject-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#
113444397b56ffda5214ffcc5a2ed80c25020fe5
"
source = "git+https://github.com/gtk-rs/sys#
9354d21dfdb9174bfecafbd75cf2a7c0c8ba5759
"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.2
4
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.2
6
(registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -189,47 +64,7 @@ dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gtk"
version = "0.1.3"
source = "git+https://github.com/gtk-rs/gtk#bdf8319b8457dcca0b894ef1563fc0fc55ba2b45"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-rs 0.1.3 (git+https://github.com/gtk-rs/cairo)",
"cairo-sys-rs 0.3.4 (git+https://github.com/gtk-rs/cairo)",
"gdk 0.5.3 (git+https://github.com/gtk-rs/gdk)",
"gdk-pixbuf 0.1.3 (git+https://github.com/gtk-rs/gdk-pixbuf)",
"gdk-pixbuf-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gdk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gio 0.1.3 (git+https://github.com/gtk-rs/gio)",
"gio-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gtk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pango 0.1.3 (git+https://github.com/gtk-rs/pango)",
]
[[package]]
name = "gtk-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#113444397b56ffda5214ffcc5a2ed80c25020fe5"
dependencies = [
"atk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-sys-rs 0.3.4 (git+https://github.com/gtk-rs/cairo)",
"gdk-pixbuf-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gdk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gio-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pango-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -240,63 +75,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.2
4
"
version = "0.2.2
6
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "pango"
version = "0.1.3"
source = "git+https://github.com/gtk-rs/pango#e60e984a7e22e73c7de42adb5a485dde665a43e2"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.1.3 (git+https://github.com/gtk-rs/glib)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pango-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
]
[[package]]
name = "pango-sys"
version = "0.3.4"
source = "git+https://github.com/gtk-rs/sys#113444397b56ffda5214ffcc5a2ed80c25020fe5"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pkg-config"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum atk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum c_vec 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6237ac5a4b1e81c213c24c6437964c61e646df910a914b4ab1487b46df20bd13"
"checksum cairo-rs 0.1.3 (git+https://github.com/gtk-rs/cairo)" = "<none>"
"checksum cairo-sys-rs 0.3.4 (git+https://github.com/gtk-rs/cairo)" = "<none>"
"checksum gdk 0.5.3 (git+https://github.com/gtk-rs/gdk)" = "<none>"
"checksum gdk-pixbuf 0.1.3 (git+https://github.com/gtk-rs/gdk-pixbuf)" = "<none>"
"checksum gdk-pixbuf-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum gdk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum gio 0.1.3 (git+https://github.com/gtk-rs/gio)" = "<none>"
"checksum gio-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum glib 0.1.3 (git+https://github.com/gtk-rs/glib)" = "<none>"
"checksum glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum gstreamer-sys 0.1.1 (git+https://github.com/sdroege/gstreamer-sys)" = "<none>"
"checksum gtk 0.1.3 (git+https://github.com/gtk-rs/gtk)" = "<none>"
"checksum gtk-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
"checksum libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)" = "38f5c2b18a287cf78b4097db62e20f43cace381dc76ae5c0a3073067f78b7ddc"
"checksum pango 0.1.3 (git+https://github.com/gtk-rs/pango)" = "<none>"
"checksum pango-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "<none>"
"checksum libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "30885bcb161cf67054244d10d4a7f4835ffd58773bc72e07d35fecf472295503"
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
Gir_Gst.toml
View file @
9cfb83d6
...
...
@@ -47,10 +47,12 @@ generate = [
"Gst.StreamFlags"
,
"Gst.PadLinkReturn"
,
"Gst.ProgressType"
,
"Gst.BusSyncReply"
,
]
manual
=
[
"GLib.Error"
,
"GLib.Source"
,
"Gst.Message"
,
"Gst.Structure"
,
]
...
...
@@ -100,6 +102,11 @@ trait = false
# Uses enum as flags
ignore
=
true
[[object.function]]
name
=
"create_watch"
# More convenient manual implementation
ignore
=
true
[[object]]
name
=
"Gst.Caps"
status
=
"manual"
...
...
examples/Cargo.toml
View file @
9cfb83d6
...
...
@@ -5,11 +5,7 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
[dependencies]
glib
=
{
version
=
"0.1.3"
,
git
=
"https://github.com/gtk-rs/glib"
}
gtk
=
{
version
=
"0.1.3"
,
git
=
"https://github.com/gtk-rs/gtk"
}
gstreamer
=
{
path
=
"../gstreamer"
}
glib-sys
=
{
version
=
"0.3.4"
,
git
=
"https://github.com/gtk-rs/sys"
}
gobject-sys
=
{
version
=
"0.3.4"
,
git
=
"https://github.com/gtk-rs/sys"
}
gstreamer-sys
=
{
version
=
"0.1.1"
,
git
=
"https://github.com/sdroege/gstreamer-sys"
,
features
=
["v1_8"]
}
[[bin]]
name
=
"launch"
...
...
examples/src/launch_glib_main.rs
View file @
9cfb83d6
extern
crate
gstreamer
as
gst
;
use
gst
::
*
;
use
gst
::
ObjectExt
as
GstObjectExt
;
extern
crate
gtk
;
extern
crate
glib
;
use
glib
::
*
;
use
std
::
u64
;
fn
main
()
{
gst
::
init
()
.unwrap
();
// FIXME: Use glib crate once it has mainloop/etc bindings
// https://github.com/gtk-rs/glib/issues/168
gtk
::
init
()
.unwrap
();
let
main_loop
=
MainLoop
::
new
(
None
,
false
);
let
pipeline
=
gst
::
parse_launch
(
"audiotestsrc ! autoaudiosink"
)
.unwrap
();
let
bus
=
pipeline
.get_bus
()
.unwrap
();
...
...
@@ -18,22 +18,30 @@ fn main() {
let
ret
=
pipeline
.set_state
(
gst
::
State
::
Playing
);
assert_ne!
(
ret
,
gst
::
StateChangeReturn
::
Failure
);
bus
.add_signal_watch
();
bus
.connect_message
(|
_
,
msg
|
match
msg
.view
()
{
MessageView
::
Eos
=>
gtk
::
main_quit
(),
MessageView
::
Error
(
err
)
=>
{
println!
(
"Error from {}: {} ({:?})"
,
msg
.get_src
()
.get_path_string
(),
err
.get_error
(),
err
.get_debug
()
);
gtk
::
main_quit
();
}
_
=>
(),
let
main_loop_clone
=
main_loop
.clone
();
//bus.add_signal_watch();
//bus.connect_message(move |_, msg| {
bus
.add_watch
(
move
|
_
,
msg
|
{
let
main_loop
=
&
main_loop_clone
;
match
msg
.view
()
{
MessageView
::
Eos
=>
main_loop
.quit
(),
MessageView
::
Error
(
err
)
=>
{
println!
(
"Error from {}: {} ({:?})"
,
msg
.get_src
()
.get_path_string
(),
err
.get_error
(),
err
.get_debug
()
);
main_loop
.quit
();
}
_
=>
(),
};
glib
::
Continue
(
true
)
});
gtk
::
mai
n
();
main_loop
.ru
n
();
let
ret
=
pipeline
.set_state
(
gst
::
State
::
Null
);
assert_ne!
(
ret
,
gst
::
StateChangeReturn
::
Failure
);
...
...
gstreamer/src/auto/alias.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
#[allow(unused_imports)]
use
auto
::
*
;
pub
type
ClockTime
=
u64
;
pub
type
ElementFactoryListType
=
u64
;
gstreamer/src/auto/bin.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Element
;
...
...
gstreamer/src/auto/bus.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
ClockTime
;
...
...
@@ -51,10 +51,6 @@ impl Bus {
// unsafe { TODO: call ffi::gst_bus_async_signal_func() }
//}
//pub fn create_watch(&self) -> /*Ignored*/Option<glib::Source> {
// unsafe { TODO: call ffi::gst_bus_create_watch() }
//}
pub
fn
disable_sync_message_emission
(
&
self
)
{
unsafe
{
ffi
::
gst_bus_disable_sync_message_emission
(
self
.to_glib_none
()
.0
);
...
...
@@ -107,7 +103,7 @@ impl Bus {
// unsafe { TODO: call ffi::gst_bus_set_sync_handler() }
//}
//pub fn sync_signal_handler<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, message: &mut Message, data: P) ->
/*Ignored*/
BusSyncReply {
//pub fn sync_signal_handler<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, message: &mut Message, data: P) -> BusSyncReply {
// unsafe { TODO: call ffi::gst_bus_sync_signal_handler() }
//}
...
...
gstreamer/src/auto/clock.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
ClockTime
;
...
...
gstreamer/src/auto/device.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Caps
;
...
...
gstreamer/src/auto/device_monitor.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Bus
;
...
...
gstreamer/src/auto/device_provider.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Bus
;
...
...
gstreamer/src/auto/device_provider_factory.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
DeviceProvider
;
...
...
gstreamer/src/auto/element.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Bus
;
...
...
gstreamer/src/auto/element_factory.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Caps
;
...
...
gstreamer/src/auto/enums.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
@@ -46,6 +46,42 @@ impl FromGlib<ffi::GstBufferingMode> for BufferingMode {
}
}
#[derive(Clone,
Copy,
Debug,
Eq,
PartialEq,
Hash)]
pub
enum
BusSyncReply
{
Drop
,
Pass
,
Async
,
#[doc(hidden)]
__
Unknown
(
i32
),
}
#[doc(hidden)]
impl
ToGlib
for
BusSyncReply
{
type
GlibType
=
ffi
::
GstBusSyncReply
;
fn
to_glib
(
&
self
)
->
ffi
::
GstBusSyncReply
{
match
*
self
{
BusSyncReply
::
Drop
=>
ffi
::
GST_BUS_DROP
,
BusSyncReply
::
Pass
=>
ffi
::
GST_BUS_PASS
,
BusSyncReply
::
Async
=>
ffi
::
GST_BUS_ASYNC
,
BusSyncReply
::
__
Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
}
}
}
#[doc(hidden)]
impl
FromGlib
<
ffi
::
GstBusSyncReply
>
for
BusSyncReply
{
fn
from_glib
(
value
:
ffi
::
GstBusSyncReply
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
0
=>
BusSyncReply
::
Drop
,
1
=>
BusSyncReply
::
Pass
,
2
=>
BusSyncReply
::
Async
,
value
=>
BusSyncReply
::
__
Unknown
(
value
),
}
}
}
#[derive(Clone,
Copy,
Debug,
Eq,
PartialEq,
Hash)]
pub
enum
CoreError
{
Failed
,
...
...
gstreamer/src/auto/flags.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer/src/auto/functions.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Bin
;
...
...
gstreamer/src/auto/mod.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
mod
bin
;
...
...
@@ -74,6 +74,7 @@ pub use self::u_r_i_handler::URIHandlerExt;
mod
enums
;
pub
use
self
::
enums
::
BufferingMode
;
pub
use
self
::
enums
::
BusSyncReply
;
pub
use
self
::
enums
::
CoreError
;
pub
use
self
::
enums
::
FlowReturn
;
pub
use
self
::
enums
::
Format
;
...
...
gstreamer/src/auto/object.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
ClockTime
;
...
...
gstreamer/src/auto/pad.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Caps
;
...
...
gstreamer/src/auto/pad_template.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Caps
;
...
...
gstreamer/src/auto/pipeline.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Bin
;
...
...
gstreamer/src/auto/plugin.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Error
;
...
...
gstreamer/src/auto/stream.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
#[cfg(feature
=
"v1_10"
)]
...
...
gstreamer/src/auto/stream_collection.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Object
;
...
...
gstreamer/src/auto/u_r_i_handler.rs
View file @
9cfb83d6
// This file was generated by gir (
33e9567+
) from gir-files (???)
// This file was generated by gir (
7504fb6
) from gir-files (???)
// DO NOT EDIT
use
Error
;
...
...
gstreamer/src/caps.rs
View file @
9cfb83d6
...
...
@@ -230,7 +230,7 @@ mod tests {
fn test_simple() {
gst::init();
let caps = Caps
Ref
::new_simple(
let caps = Caps::new_simple(
"foo/bar",
&[
("int", 12.into()),
...
...
gstreamer/src/lib.rs
View file @
9cfb83d6
...
...
@@ -55,6 +55,7 @@ pub use caps::Caps;
mod
element
;
mod
bin
;
mod
bus
;
pub
use
bin
::
BinExtManual
;