Commit graph

3763 commits

Author SHA1 Message Date
Ruben Gonzalez 2e76ecd46e Fix typo in sdroege/gst-plugin-rs repo 2017-10-30 09:33:21 +01:00
Sebastian Dröge 0f9241dbb6 Fix unused import compiler warning 2017-10-29 18:14:20 +02:00
Sebastian Dröge b58f4cd1ed Add Object::connect_deep_notify() and test 2017-10-27 23:03:45 +02:00
Sebastian Dröge ec6dde855a Replace ulong for the property notify watches with a custom NotifyWatchId type 2017-10-27 17:55:48 +02:00
Sebastian Dröge a1a841afc8 Require Send+'static for Buffer::from_*slice() 2017-10-26 14:02:36 +02:00
Sebastian Dröge f08f0f6f15 Add tests for Bin::get_children() and Element::get_*pads() 2017-10-26 13:29:37 +02:00
Sebastian Dröge 50c8f32961 Clean up player example code a bit 2017-10-26 13:16:06 +02:00
Sebastian Dröge 6bb9eaf739 Remove unneeded reference 2017-10-26 12:56:52 +02:00
Sebastian Dröge 95317267ec Add BinExtManual::get_children() that returns a Vec<Element>
This is sometimes more convenient than using the iterator.
2017-10-25 12:58:22 +02:00
Sebastian Dröge 20729497a2 Add ElementExtManual::get_{,src,sink}pads() functions
These can sometimes be more usable than the iterator based approach
2017-10-25 12:58:22 +02:00
Sebastian Dröge f30121ec53 Add private utils module with a MutexGuard around GMutex 2017-10-25 12:58:16 +02:00
Luis de Bethencourt d94bb0e0fb Unnecessary reference
This creates a reference to a reference, clean it.

Fixes https://github.com/sdroege/gstreamer-rs/pull/48
Fixes https://github.com/sdroege/gstreamer-rs/issues/47
2017-10-24 23:41:48 +02:00
Luis de Bethencourt e82e8e0c34 Needless pass by value
Avoid an unnecessary allocation by passing the Caps by reference instead of
by value.

Fixes https://github.com/sdroege/gstreamer-rs/pull/46
Fixes https://github.com/sdroege/gstreamer-rs/issues/45
2017-10-24 23:41:20 +02:00
Luis de Bethencourt 95dc336b65 Use while let
When destructuring a single pattern in a loop it is nicer to use while let.

Fixes https://github.com/sdroege/gstreamer-rs/pull/46
Fixes https://github.com/sdroege/gstreamer-rs/issues/45
2017-10-24 23:41:05 +02:00
Sebastian Dröge 342d89dd44 Allow creating buffers from AsRef<[u8]> and AsMut<[u8]>
Not just from Vec<u8>.
2017-10-20 18:37:38 +02:00
Thijs Vermeir b24f628772 Add basic-tutorial-6 from the GStreamer tutorials
https://cgit.freedesktop.org/gstreamer/gst-docs/tree/examples/tutorials/basic-tutorial-6.c

Fixes https://github.com/sdroege/gstreamer-rs/pull/43
2017-10-17 12:24:54 +03:00
Sebastian Dröge e1d134c4be Run everything through latest rustfmt-nightly 2017-10-17 12:06:51 +03:00
Sebastian Dröge 9a6713b901 Store pointers for static caps and pad templates
We don't own them, we don't want to copy them. They're *statically*
allocated things in C.
2017-10-15 11:27:08 +03:00
Sebastian Dröge 9206ddba61 Add StaticCaps and StaticPadTemplate bindings
No way to create them though, just use lazy_static from Rust instead if
something like this is needed.
2017-10-15 11:08:56 +03:00
Thibault Saunier faae914f72 Add the tutorial5 (Gtk video player with informations about streams)
Fixes https://github.com/sdroege/gstreamer-rs/pull/41
2017-10-14 20:22:10 +03:00
Thibault Saunier 08c30a0566 Add basic-tutorial-7.rs
Fixes https://github.com/sdroege/gstreamer-rs/pull/42
2017-10-13 09:47:10 +03:00
Sebastian Dröge 1f16a39ca4 Move gst_mini_object_copy() from GstRc<T> to MiniObject directly
It can also be called on the shallow references.
2017-10-12 17:58:46 +03:00
Sebastian Dröge b773c0b46a Fix compilation again now that GstRc::get_mut() requires &mut self again 2017-10-11 15:39:27 +03:00
Sebastian Dröge 5589d5221f Revert "Don't require &mut self for GstRc::get_mut()"
This reverts commit 4b77c18b5b.

It unfortunately allows to get multiple mutable references to the same
underlying data, which is not allowed.
2017-10-11 15:30:55 +03:00
Sebastian Dröge 2e2dd95365 Re-export gst_base::FlowCombiner again from the module 2017-10-11 13:52:49 +03:00
fengalin 4b228f5f7f gtsreamer-base: Fix version for gst_flow_combiner_ref/unref
gst_flow_combiner_ref/unref were introduced in gstreamer-1.12.1 but they
inherit the `since version` declared for `GstFlowCombiner` which is 1.4.

Fixes https://github.com/sdroege/gstreamer-sys/pull/5
2017-10-11 11:33:01 +03:00
Sebastian Dröge fd8ffffaa7 Add comment about why FlowCombiner bindings are manually generated 2017-10-11 11:30:28 +03:00
fengalin 44130794f1 gstreamer-base: use g_boxed_copy/free for GstFlowCombiner
This avoids depending on gst_flow_combiner_ref/unref which were
introduced in gstreamer-1.12.1.

Fixes https://github.com/sdroege/gstreamer-rs/pull/40
2017-10-11 11:29:35 +03:00
Thijs Vermeir f253caac19 Add basic-tutorial-4 from the GStreamer tutorials
https://cgit.freedesktop.org/gstreamer/gst-docs/tree/examples/tutorials/basic-tutorial-4.c

Fixes https://github.com/sdroege/gstreamer-rs/pull/39
2017-10-11 11:29:35 +03:00
Sebastian Dröge d85be4fe03 Don't make variable mutable if not needed 2017-10-09 16:38:13 +03:00
Thijs Vermeir 38b58cbf9d Add basic-tutorial-3 from the GStreamer tutorials
https://cgit.freedesktop.org/gstreamer/gst-docs/tree/examples/tutorials/basic-tutorial-3.c

Fixes https://github.com/sdroege/gstreamer-rs/pull/38
2017-10-09 16:38:13 +03:00
Sebastian Dröge 4b77c18b5b Don't require &mut self for GstRc::get_mut() 2017-10-05 14:48:33 +03:00
Sebastian Dröge 884c9790ef Fix compilation of GTK examples with latest gio 2017-10-01 16:32:33 +02:00
Sebastian Dröge 92e0b525ad Fix build of unit tests 2017-10-01 16:02:29 +02:00
Sebastian Dröge 19c5556239 Regenerate with latest GIR 2017-10-01 15:52:15 +02:00
Sebastian Dröge 1349ab5b30 Add dox feature to gstreamer-mpegts-sys 2017-10-01 15:31:53 +02:00
Russel Winder b3cc2251ba Add gstreamer-mpegts-sys bindings
Fixes https://github.com/sdroege/gstreamer-sys/pull/4
2017-10-01 15:16:55 +02:00
Sebastian Dröge 52b7c65080 Regenerate everything with latest GIR 2017-10-01 15:08:00 +02:00
Sebastian Dröge d608cff9e9 Fix build with latest GApplication API changes 2017-09-26 10:41:03 +03:00
Sebastian Dröge 19e40a5e2c Remove accidental leftover debug output 2017-09-18 20:44:59 +03:00
Sebastian Dröge e026c2f652 Directly poke at GstPad struct for retrieving pad function data
glib-sys was just fixed: https://github.com/gtk-rs/sys/pull/62
2017-09-18 17:26:42 +03:00
Sebastian Dröge f4958b71d7 Add test for pad tasks 2017-09-18 01:53:02 +03:00
Sebastian Dröge c471a67e78 Add test for pad chain/event function and fix-up code
Need to handle NULL parents, and also work-around incomplete GstPad
struct definition in gstreamer-sys due to GHookList being incomplete.
2017-09-18 01:45:39 +03:00
Sebastian Dröge dc6c7500df Add bindings for remaining pad task functions
Especially Pad::start_task()
2017-09-18 00:32:29 +03:00
Sebastian Dröge 88f37b799c Re-add Pad::iterate_internal_links()
It was accidentially dropped when making Iterator generic.
2017-09-18 00:24:36 +03:00
fengalin 7a108ddd0d Set version (1.12) for StackTraceFlags
Fixes https://github.com/sdroege/gstreamer-rs/pull/36
2017-09-17 18:58:10 +03:00
fengalin 8b735ff536 Set version (1.12) for StackTraceFlags
Fixes https://github.com/sdroege/gstreamer-sys/pull/2
2017-09-17 18:57:14 +03:00
Sebastian Dröge 5881dc7d53 Also export IteratorImpl trait 2017-09-17 18:51:45 +03:00
Sebastian Dröge 191b90b1df Add copyright/license header to iterator.rs 2017-09-17 18:50:35 +03:00
Sebastian Dröge ce5c01a88e Implement gst::Iterator as a generic type to not require using glib::Values everywhere 2017-09-17 18:45:38 +03:00