Commit graph

62 commits

Author SHA1 Message Date
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 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 3179806f01 Regenerate everything with latest GIR
And fix-up manual code
2017-11-05 19:08:39 +02:00
Sebastian Dröge e1d134c4be Run everything through latest rustfmt-nightly 2017-10-17 12:06:51 +03:00
Sebastian Dröge 19c5556239 Regenerate with latest GIR 2017-10-01 15:52:15 +02:00
Sebastian Dröge f0935d7e1e Add remaining gst_init() assertions 2017-08-30 14:39:09 +03:00
fengalin 46327b231f Define Sync and Send traits for AudioInfo
Fixes https://github.com/sdroege/gstreamer-rs/pull/27
2017-08-15 17:32:44 +03:00
Sebastian Dröge 21c4173051 Fix up some integer types 2017-08-11 00:41:36 +03:00
Sebastian Dröge e1538b6ca5 Add bindings for various audio channel position functions 2017-08-10 14:39:57 +03:00
Sebastian Dröge 2b33885c1e Add some more convenience API to AudioInfo 2017-08-10 01:39:55 +03:00
Sebastian Dröge ec41babc09 Implement all the translation traits for AudioInfo and AudioFormatInfo 2017-08-10 01:25:19 +03:00
Sebastian Dröge c8910aae08 Initial gstreamer-audio bindings
Only wrapping AudioInfo and AudioFormatInfo and related for now.

https://github.com/sdroege/gstreamer-rs/issues/4
2017-08-09 20:33:45 +03:00