Commit graph

51 commits

Author SHA1 Message Date
Sebastian Dröge 62058ab1c3 Use &ToSendValue for the stream-status stream_object in the builder 2017-12-16 18:39:50 +02:00
Sebastian Dröge ccf6c1a632 Owner of structure-change and stream-status messages is mandatory 2017-12-16 18:39:33 +02:00
Sebastian Dröge bcf6b34c1b Code/text of progress messages is mandatory 2017-12-16 18:38:53 +02:00
Sebastian Dröge 974e681a5d Move optional taglist/entry_struct fields into the Redirect builder from the constructor 2017-12-16 18:13:25 +02:00
Sebastian Dröge 7bc1fce97d Move value for PropertyNotification message into the builder instead of constructor 2017-12-16 18:10:10 +02:00
Sebastian Dröge b9c4e4cd6e Allow no value for the PropertyNotify message
It can contain no value.

Also use &ToSendValue instead of an actual value for building the
message.
2017-12-16 15:37:06 +02:00
Sebastian Dröge c99928d030 Change FormatValue related API to be more convenient to use
FormatValue is now renamed to GenericFormattedValue and the API slightly
changed. In addition there is now a FormattedValue trait, and a
SpecificFormattedValue trait plus types for Bytes, Buffers and the
existing ClockTime.

This allows to create functions like
  Pad::query_duration<F: SpecificFormattedValue>() -> Option<F>
and doesn't require the caller to unwrap the generic value anymore,
which is completely unneeded in these cases.

In addition, Segment became FormattedSegment<T> with API to
upcast/downcast between the specific formatted values and the generic
formatted value. This greatly simplifies usage of Segments.
2017-12-09 19:45:18 +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 55f044dd83 Add newtype wrappers and INVALID constants for event/message GroupId and Seqnum 2017-12-05 21:33:04 +02:00
Sebastian Dröge 411f54afed Run everything to rustfmt again 2017-12-01 19:02:53 +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 2508f432f4 Remove some unneeded lifetime annotations 2017-11-27 14:03:33 +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 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 d4bd1c2d76 Add dox feature to everything as needed 2017-11-12 13:33:02 +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 e1d134c4be Run everything through latest rustfmt-nightly 2017-10-17 12:06:51 +03:00
Sebastian Dröge de10335167 Allow creating Error/Warning/Info messages only from specific kinds of glib::Error domains 2017-09-15 18:35:54 +03:00
Sebastian Dröge 499ca3eff3 Also implement Sync+Send for Event and Message 2017-09-14 15:52:40 +03:00
Sebastian Dröge 608279c6d4 Fix various clippy warnings 2017-09-13 23:54:22 +03:00
Sebastian Dröge 17cce1a3d7 Add support for setting custom fields in message/events during construction 2017-09-13 22:38:19 +03:00
Sebastian Dröge 85b335fd89 Fix/hide various clippy warnings in gstreamer 2017-09-10 15:21:26 +03:00
Sebastian Dröge dae1a51764 Work around rustdoc bug with impls on type aliases
https://github.com/rust-lang/rust/issues/44182
2017-08-30 15:12:11 +03:00
Sebastian Dröge f0935d7e1e Add remaining gst_init() assertions 2017-08-30 14:39:09 +03:00
Sebastian Dröge 14adb331ec Implement StaticType on the actual MiniObjects, not the GstRc wrapper 2017-08-18 16:21:49 +03:00
fengalin 04f09ebc86 Add bindings for GstToc/TocSetter
https://github.com/sdroege/gstreamer-rs/pull/22

Fixes https://github.com/sdroege/gstreamer-rs/issues/10
2017-08-09 19:38:39 +03:00
Sebastian Dröge a0c6db70e0 Add Context support for messages/queries 2017-08-02 20:58:33 +03:00
Sebastian Dröge d7baadee22 Fix various other compiler/clippy warnings 2017-08-02 20:09:00 +03:00
Sebastian Dröge 09db28bbf5 Fix various clippy warnings 2017-08-02 19:40:31 +03:00
Sebastian Dröge 03285a6311 Run everything through latest rustfmt-nightly 2017-07-31 12:16:42 +01:00
Sebastian Dröge f06bc0d6ef Add event example and clean-up event/message constructor API 2017-07-30 15:49:25 +01:00
Sebastian Dröge 2c949a9a05 Add Event bindings
And make Message bindings more consistent
2017-07-30 15:06:44 +01:00
Sebastian Dröge 02a4c8c14d Add new() functions for all messages 2017-07-29 14:56:34 +01:00
Sebastian Dröge 69e1fdd529 Add Query bindings 2017-07-29 13:52:31 +01:00
Sebastian Dröge 9c357abf1a Add support for Fractions 2017-07-12 13:25:11 +03:00
Sebastian Dröge 8421cec1ee Implement message types that use tag lists / structures 2017-07-12 11:06:21 +03:00
Sebastian Dröge 71c0885575 Remove some unused "use"s 2017-07-11 00:36:38 +03:00
Sebastian Dröge 4c5aa49fa2 Run manual code through rustfmt 2017-07-11 00:33:24 +03:00
Sebastian Dröge 4964495b03 Implement some more missing API now that we have Structure 2017-07-11 00:26:27 +03:00
Sebastian Dröge 1264f2f5c0 Rename MessageImpl to MessageRef
These will show up as (possibly mutable) references later in API from
which we explicitly borrow references instead of getting a new one.
2017-07-10 17:12:24 +03:00
Sebastian Dröge e43bf21ded Add initialization safety assertions
Ensure that GStreamer is initialized before allowing to call any
functions
2017-07-10 17:12:14 +03:00
Sebastian Dröge 992105b49f Implement basic GstStructure bindings 2017-07-10 17:10:15 +03:00
Sebastian Dröge 4808865371 Implement Builder for all Messages 2017-07-07 14:39:22 +03:00
Sebastian Dröge 9b91024221 Implement all message parsing API 2017-07-05 01:47:33 +03:00
Sebastian Dröge cb26c0aaed Remove some useless message code 2017-07-03 18:45:59 +03:00
Sebastian Dröge 9a364c26c6 Remove EOS message constructor for now
These should probably all use the builder pattern
2017-07-03 18:11:26 +03:00
Sebastian Dröge eeea572c96 Implement further parts of the Message machinery 2017-07-03 17:52:10 +03:00