Commit graph

17 commits

Author SHA1 Message Date
Sebastian Dröge 4117c01ff2 Run everything through latest rustfmt-nightly 2018-02-22 11:18:37 +01:00
fengalin 21c687f256 Examples: message handlers: invoke generic Message method from the concrete message
Generic methods for events, messages and queries can now be invoked from the concrete type.
2018-01-29 17:33:49 +02:00
Sebastian Dröge b6d13272df Fix some clippy warnings in examples/tutorials 2017-11-27 14:03:33 +02:00
Sebastian Dröge f895f484cc Fix up tutorials and examples for Message::get_src() returning an Option now 2017-11-16 13:58:56 +02:00
Sebastian Dröge a01f1385ec examples: Set up a runloop on macOS 2017-11-12 19:07:02 +01:00
Sebastian Dröge c9027fb244 Switch appsrc example to failure based error handling 2017-11-12 10:15:37 +01: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 f1025170d9 Use while-let and CLOCK_TIME_NONE for the bus.timed_pop() loops in the examples/tutorials 2017-09-13 19:35:35 +03:00
Sebastian Dröge 062b596432 Fix-up various unused external crate warnings 2017-09-01 13:42:59 +03:00
Sebastian Dröge 8013169e09 Add constants for SECOND, MSECOND, USECOND, NSECOND
And use them in the examples.
2017-08-29 11:07:59 +03:00
Sebastian Dröge f751afc0fb Add prelude modules to all cratest that only re-export the traits
And use those in the examples instead of blanket * imports
2017-08-17 18:02:25 +03:00
Sebastian Dröge b392c82ba9 Use gstreamer-video API in appsrc example and make frame generation a bit more efficient 2017-08-11 17:59:05 +03:00
Sebastian Dröge c9423471b0 Fix some clippy warnings in the examples 2017-08-04 15:36:12 +03:00
Philippe Normand 7326377f5f examples: app*: refactor error enum to a utils module
The module also contains create_element, link_elements and set_state functions
to help reduce boilerplate.
2017-08-04 15:09:29 +03:00
Philippe Normand 50e6e2e108 examples: appsrc: improved error handling
The program should now exit gracefully with human readable messages.
2017-08-03 18:09:29 +03:00
Sebastian Dröge b08a101cc6 Fix clippy warnings in the examples 2017-08-02 20:15:16 +03:00
Sebastian Dröge dc640249ef Add simple appsrc example 2017-08-01 21:30:51 +03:00