Commit graph

234 commits

Author SHA1 Message Date
Sebastian Dröge 963557b79f Query::get_structure() can also return NULL 2017-12-06 13:43:37 +02:00
Sebastian Dröge 1f80df493a Let the glib::Value destructor clean up our values instead of doing so manually 2017-12-06 11:17:59 +02:00
Sebastian Dröge ad7b21ba55 Use unwrap_or_else() for the default value in the DateTime Display impl 2017-12-05 23:20:10 +02:00
Sebastian Dröge 05c51dd778 Change all values in Segment to FormatValue 2017-12-05 23:16:12 +02:00
Sebastian Dröge e6da3554ee Use ClockTime for the Duration tag
And implement the Value traits for ClockTime
2017-12-05 22:54:03 +02:00
Sebastian Dröge f1c6c4fd06 Change various integers to FormatValue and ClockTime in events/queries/messages 2017-12-05 22:43:37 +02:00
Sebastian Dröge 801a7ed43c Use ClockTime instead of u64 for the Gap event 2017-12-05 21:36:56 +02:00
Sebastian Dröge 55f044dd83 Add newtype wrappers and INVALID constants for event/message GroupId and Seqnum 2017-12-05 21:33:04 +02:00
Sebastian Dröge 97b786a0c7 Regenerate element bindings for gst_element_remove_pad() annotation fix 2017-12-04 18:12:55 +02:00
Sebastian Dröge 88ff4289d1 Add Event::set_running_time_offset() 2017-12-03 17:13:46 +02:00
Sebastian Dröge e5bbf93670 Registry::scan_path() returning false is not an error 2017-12-03 14:54:52 +02:00
Sebastian Dröge 6015e74f0e Regenerate with gir filename/utf8 fixes 2017-12-03 14:51:16 +02:00
Sebastian Dröge 49e1fe1c3f Add bindings for Registry and PluginFeature 2017-12-03 14:40:38 +02:00
Sebastian Dröge c6c7693550 Add Buffer::get_dts_or_pts() 2017-12-02 12:15:07 +02:00
Sebastian Dröge 411f54afed Run everything to rustfmt again 2017-12-01 19:02:53 +02:00
Sebastian Dröge 0920008869 Print clock times as actual time in Segment/Buffer/BufferList debug output 2017-12-01 19:02:29 +02:00
Sebastian Dröge fccb1eca5e Implement fmt::Debug more consistently for miniobjects and various other types 2017-12-01 11:34:01 +02:00
Sebastian Dröge c57d5523d2 Implement ToOwned for Message/Event/QueryRef 2017-12-01 11:34:01 +02:00
Sebastian Dröge 1576ff6c32 Event/Message::get_structure() can return None 2017-12-01 11:33:21 +02:00
Sebastian Dröge 7342a0fb98 Implement some functions on EventType and implement PartialOrd for serialized events 2017-11-29 18:55:56 +02:00
Sebastian Dröge 8a2e78e586 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:16:34 +02:00
Sebastian Dröge b198ee21da Let Sample::new(), TagList::add(), Structure::set() and others take more values by reference instead of by value 2017-11-27 14:34:02 +02:00
Sebastian Dröge 2508f432f4 Remove some unneeded lifetime annotations 2017-11-27 14:03:33 +02:00
Sebastian Dröge 52d13c010a Add TagListRef::merge() and ::insert() 2017-11-27 14:03:33 +02:00
Sebastian Dröge 029527a6d4 Toc::merge() doesn't take ownership of the taglist 2017-11-27 14:03:33 +02:00
Sebastian Dröge 8c697b3a27 Use Arc::clone(&val) instead of val.clone() to make it more explicit that only the Arc cloned here 2017-11-27 14:03:33 +02:00
Sebastian Dröge 34f70ee0d7 Derive more useful traits for various enums 2017-11-27 14:03:30 +02:00
Sebastian Dröge eee82fd402 Export FlowError/Success, ClockError/Success, PadLinkError/Success too 2017-11-26 20:40:05 +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 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