Commit graph

238 commits

Author SHA1 Message Date
Sebastian Dröge 7ceff5bafd Print clock times as actual time in Segment/Buffer/BufferList debug output 2017-12-01 19:03:15 +02:00
Sebastian Dröge 927b1ac822 Revert "Event/Message::get_structure() can return None"
This reverts commit aa275d5ddb.

It actually breaks the API, we need to find another way.
2017-12-01 16:08:12 +02:00
Sebastian Dröge aa275d5ddb Event/Message::get_structure() can return None 2017-12-01 11:54:57 +02:00
Sebastian Dröge affc53a515 Implement fmt::Debug more consistently for miniobjects and various other types 2017-12-01 11:35:46 +02:00
Sebastian Dröge ec900d7e3f Implement some functions on EventType and implement PartialOrd for serialized events 2017-12-01 11:35:43 +02:00
Sebastian Dröge bc991708e5 Implement ToOwned for Message/Event/QueryRef 2017-12-01 11:35:14 +02:00
Sebastian Dröge 6f09e5c791 Regenerate with latest GIR to fix various issues with property getters
Get rid of unneeded transmutes and actually initialize flags/enum
GValues with the correct type instead of using integers.
2017-11-27 19:19:00 +02:00
Sebastian Dröge 291193c1ad Remove some unneeded lifetime annotations 2017-11-27 14:35:24 +02:00
Sebastian Dröge 0483d0881f Add TagListRef::merge() and ::insert() 2017-11-27 14:35:24 +02:00
Sebastian Dröge a4eea8734d Toc::merge() doesn't take ownership of the taglist 2017-11-27 14:35:24 +02:00
Sebastian Dröge 918b34fb7a Use Arc::clone(&val) instead of val.clone() to make it more explicit that only the Arc cloned here 2017-11-27 14:35:24 +02:00
Sebastian Dröge 2b0674b7cb Derive more useful traits for various enums 2017-11-27 14:35:24 +02:00
Sebastian Dröge 124564d6f0 Update version to 0.9.1 2017-11-26 20:41:38 +02:00
Sebastian Dröge 1d63b0d89b Export FlowError/Success, ClockError/Success, PadLinkError/Success too 2017-11-26 20:40:20 +02:00
Sebastian Dröge 4e2f89835b Update CHANGELOG.md for 0.9.0 2017-11-26 19:32:20 +02:00
Sebastian Dröge 1d80323b58 Update versions of all dependencies and point to releases instead of GIT 2017-11-26 19:32:20 +02:00
Sebastian Dröge 94ba143c74 Allow anything that implements Into<Option<&str>> to be used for creating new pads 2017-11-21 16:16:56 +02:00
Sebastian Dröge 1dbc63dcb3 Message::get_src() can return None
The src is optional
2017-11-16 13:58:42 +02:00
Sebastian Dröge d430467ed5 Don't require Send for Structure::get()
Otherwise we won't be able to get references here.
2017-11-16 13:39:01 +02:00
Sebastian Dröge 9085474e37 Fix error/warning/info message macros that use format strings 2017-11-16 13:37:52 +02:00
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 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 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 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
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
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 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 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 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
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