Commit graph

443 commits

Author SHA1 Message Date
Sebastian Dröge
7eb8429046 Run everything through latest rustfmt-nightly again 2017-11-15 22:33:51 +02:00
Sebastian Dröge
0629a0283e Use SendValue instead of Value for all our GValue usage
We require types that can be sent between threads.
2017-11-15 20:32:52 +02:00
Sebastian Dröge
9734ec29cc Implement macros for Element::message_full_with_details()
Allows attaching arbitrary structures to error/warning/info messages
2017-11-15 17:03:19 +02:00
Sebastian Dröge
4ab5893359 Allow to return something from the examples/tutorials main() wrapper 2017-11-12 20:11:25 +01:00
Sebastian Dröge
a01f1385ec examples: Set up a runloop on macOS 2017-11-12 19:07:02 +01:00
Kornel
10151b9f0d tutorials: Set up a runloop on macOS
Fixes https://github.com/sdroege/gstreamer-rs/pull/62
Fixes https://github.com/sdroege/gstreamer-rs/issues/58
2017-11-12 18:58:15 +01:00
Sebastian Dröge
d4bd1c2d76 Add dox feature to everything as needed 2017-11-12 13:33:02 +01:00
Sebastian Dröge
a557a8d66e Require the dox feature of dependant crates 2017-11-12 12:58:30 +01:00
Sebastian Dröge
1c0e802bc8 Remove utils module from examples
It's unused now
2017-11-12 10:15:54 +01:00
Sebastian Dröge
c9027fb244 Switch appsrc example to failure based error handling 2017-11-12 10:15:37 +01:00
Kornel
1481cba5d9 Fixed macOS framework path in README.md
Fixes https://github.com/sdroege/gstreamer-rs/pull/57
2017-11-12 09:33:26 +01:00
Sebastian Dröge
eb99694ed3 Minor cleanup of appsink example 2017-11-11 16:56:37 +01:00
Sebastian Dröge
90700aa9b2 Switch appsink example to failure based error handling 2017-11-11 16:43:29 +01:00
Sebastian Dröge
d857fbd349 Add helper macros for generating error/warning/info messages 2017-11-11 16:43:29 +01:00
Sebastian Dröge
5494e5b827 Use u32 instead of i32 for Element::message_full() line numbers 2017-11-11 16:38:54 +01:00
Sebastian Dröge
c06c12dc87 Free memory of the correct type for the callback structs in appsink/appsrc 2017-11-11 16:38:54 +01:00
Sebastian Dröge
126159c762 Run everything through rustfmt once again 2017-11-11 13:31:01 +01:00
Sebastian Dröge
2fc3470fa1 Add a Builder for caps and structures 2017-11-11 13:18:50 +01:00
Sebastian Dröge
f823ef9cf7 Add constants for SECONDS, etc in u64 2017-11-11 13:00:50 +01:00
Sebastian Dröge
d5b2f5900c Add API for converting ClockTime to/from mseconds, useconds, nseconds 2017-11-11 12:44:58 +01:00
Zeeshan Ali
d18cbe5943 examples: More robust cli arg handling 2017-11-11 12:28:34 +01:00
Sebastian Dröge
246a54368d Clean up Query API a bit
There's now get_result() instead of get(), and separate getters for only
getting the constructor arguments of each query (otherwise query
handlers will get useless values when trying to answer a query).
2017-11-11 12:27:30 +01:00
Sebastian Dröge
c39c0c7264 Implement ClockTime as ClockTime(Option<u64>)
And also implement a FormatValue type that holds a value together with
its format to make usage of the positions/durations/seek positions/etc
more convenient and safe.

Fixes https://github.com/sdroege/gstreamer-rs/issues/3
2017-11-11 11:57:29 +01:00
Philippe Normand
bdcf0246eb player example: Error management with the failure crate 2017-11-11 09:47:48 +01:00
Sebastian Dröge
f6ffa6919f Run latest commit through rustfmt 2017-11-10 18:24:44 +01:00
Philippe Normand
93a1b3929c Implement Error trait for error enums. 2017-11-10 17:51:06 +01:00
Sebastian Dröge
5d266bf31b Regenerate with latest GIR
Which gives us mappings between instance and class struct for now.
2017-11-09 13:33:40 +02:00
Sebastian Dröge
2f7ee30aa1 Implement std::io::Read on Adapter
Patch based on the one from Thibault Saunier for gst-plugin-rs's Adapter
2017-11-06 14:53:34 +02:00
Sebastian Dröge
95204c2294 Add Success/Error variants of #[must_use] enums
And implement basically the Try trait for them. This will be replaced by
the Try trait once it is stable.

Fixes https://github.com/sdroege/gstreamer-rs/issues/44
2017-11-06 11:43:54 +02:00
Sebastian Dröge
e8638c1630 Mark various enums that can signal errors as #[must_use]
See https://github.com/sdroege/gstreamer-rs/issues/44
2017-11-05 19:16:50 +02:00
Sebastian Dröge
3179806f01 Regenerate everything with latest GIR
And fix-up manual code
2017-11-05 19:08:39 +02:00
Sebastian Dröge
99a60e921d Ignore property notify functions
They're manually implemented now.
2017-11-04 12:12:07 +02:00
Sebastian Dröge
3193c19131 Add a table of contents to the README.md 2017-10-31 21:08:40 +02:00
Sebastian Dröge
1b5762c02f Update README.md with installation instructions and some links for getting started
https://github.com/sdroege/gstreamer-rs/issues/49
https://github.com/sdroege/gstreamer-rs/issues/50
2017-10-30 13:00:39 +02: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