Commit graph

178 commits

Author SHA1 Message Date
Sebastian Dröge
e0dc84c10a Run everything through rustfmt again 2017-12-20 19:30:14 +02:00
Sebastian Dröge
95c9f92549 Add StreamCollection::iter() 2017-12-20 18:54:56 +02:00
Sebastian Dröge
6d8cfa5de0 Add support for TypeFind and implement Ord on Rank and TypeFindProbability
Fixes https://github.com/sdroege/gstreamer-rs/issues/11
2017-12-19 19:14:12 +02:00
Sebastian Dröge
5108c941ed Various nullability fixes to plugin bindings, and add add_dependency() API
Also fix structure ownership for the cache data API
2017-12-17 14:26:17 +02:00
Sebastian Dröge
7065d1d884 Add constants for COPY_ALL and COPY_METADATA buffer copy flags 2017-12-16 17:40:47 +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
55f044dd83 Add newtype wrappers and INVALID constants for event/message GroupId and Seqnum 2017-12-05 21:33:04 +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
eee82fd402 Export FlowError/Success, ClockError/Success, PadLinkError/Success too 2017-11-26 20:40:05 +02:00
Sebastian Dröge
d4bd1c2d76 Add dox feature to everything as needed 2017-11-12 13:33:02 +01:00
Sebastian Dröge
126159c762 Run everything through rustfmt once again 2017-11-11 13:31:01 +01:00
Sebastian Dröge
f823ef9cf7 Add constants for SECONDS, etc in u64 2017-11-11 13:00:50 +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
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
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
f30121ec53 Add private utils module with a MutexGuard around GMutex 2017-10-25 12:58:16 +02:00
Sebastian Dröge
9206ddba61 Add StaticCaps and StaticPadTemplate bindings
No way to create them though, just use lazy_static from Rust instead if
something like this is needed.
2017-10-15 11:08:56 +03:00
Sebastian Dröge
5881dc7d53 Also export IteratorImpl trait 2017-09-17 18:51:45 +03:00
Sebastian Dröge
f7bce553cd Implement std::iter::Iterator<Item=Result<glib::Value, IteratorError> for gst::Iterator 2017-09-17 14:43:33 +03:00
Sebastian Dröge
3cb5b591ca Add bindings for Element::message_full() and _full_with_details() 2017-09-15 19:00: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
b4cb81cd56 Run everything through latest rustfmt-nightly 2017-09-10 15:21:26 +03:00
Sebastian Dröge
85b335fd89 Fix/hide various clippy warnings in gstreamer 2017-09-10 15:21:26 +03:00
Sebastian Dröge
ca6c597fad Add bindings for the GStreamer logging system 2017-09-09 16:35:01 +03:00
Sebastian Dröge
f05df73088 Add various gst_init() assertions to video/app bindings
audio and core should come next.

Also print something more meaningful than using assert_eq!().
2017-08-30 12:48:01 +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
767bd0537e Only re-export traits once 2017-08-17 16:32:17 +03:00
Sebastian Dröge
50a1535771 Add ParseContext bindings and corresponding functions
And use it in the launch example to print more useful error information,
like which elements are missing.
2017-08-17 16:17:02 +03:00
Sebastian Dröge
e7a0543c73 Clean up global functions 2017-08-17 15:31:00 +03:00
Sebastian Dröge
165d85646f Move futures based BusStream from examples to the bindings
And hide behind the "futures" feature.

Fixes https://github.com/sdroege/gstreamer-rs/issues/26
2017-08-17 13:07:59 +03:00
Sebastian Dröge
08e2f6d917 Add Element::get_metadata(), get_pad_template(), get_pad_template_list() and DeviceProvider::get_metadata()
As wrapper around the C class functions.

Fixes https://github.com/sdroege/gstreamer-rs/issues/28
2017-08-17 12:49:58 +03:00
Sebastian Dröge
77cb4da32a Add ClockId and related waiting API, and SystemClock
Fixes https://github.com/sdroege/gstreamer-rs/issues/23
2017-08-14 01:41:37 +03:00
Philippe Normand
8badc33df9 gstreamer: expose version functions 2017-08-11 15:41:20 +03:00
Sebastian Dröge
93cc21112c Don't re-export everything from the tags module
All the tags are supposed to be used via gst::tags::Title, etc to
prevent conflicts.
2017-08-11 15:32:28 +03:00
Sebastian Dröge
1a3b556fb6 Make Buffer map bindings more simple and consistent 2017-08-11 15:20:43 +03:00
Sebastian Dröge
e1538b6ca5 Add bindings for various audio channel position functions 2017-08-10 14:39:57 +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
f1ac59a400 Autogenerate GstObject bindings again now that gir has support for renaming the trait 2017-08-07 10:24:43 +03:00
Sebastian Dröge
86fc001e35 Regenerate code with new GIR and suppress various clippy warnings in generated code
Now only a few are left in the manually written code.
2017-08-03 21:56:39 +03:00
Sebastian Dröge
3fdc4cf5fc Add GstContext bindings 2017-08-02 20:34:37 +03:00
Sebastian Dröge
32c5218e7d Fix indentation 2017-08-02 19:41:33 +03:00
Sebastian Dröge
e55c7d4088 Rename ObjectExt trait to GstObjectExt
This works around a bug in the compiler with multiple traits having the
same name, but being re-exported with a different one.

https://github.com/gtk-rs/glib/issues/211
2017-08-01 14:04:42 +01:00
Sebastian Dröge
03285a6311 Run everything through latest rustfmt-nightly 2017-07-31 12:16:42 +01:00
Sebastian Dröge
ff12c054e3 Add all tags from core 2017-07-31 11:33:05 +01:00
Sebastian Dröge
7e24bae7c0 Improve Segment bindings to directly store the segment instead of a pointer to it 2017-07-31 10:54:22 +01:00
Sebastian Dröge
0a0b82d1b2 Get tag names from gstreamer-sys 2017-07-30 23:11:57 +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
5fa961f5b9 Add TagSetter and Preset bindings 2017-07-29 15:21:25 +01:00
Sebastian Dröge
9d35eff8d5 Add ChildProxy bindings 2017-07-29 15:10:10 +01:00
Sebastian Dröge
4730500662 Add Iterator bindings 2017-07-29 14:37:06 +01:00
Sebastian Dröge
21888daab6 Add GhostPad bindings 2017-07-29 14:19:15 +01:00
Sebastian Dröge
52dbf03d4f Add functions using queries 2017-07-29 14:04:34 +01:00
Sebastian Dröge
69e1fdd529 Add Query bindings 2017-07-29 13:52:31 +01:00
Sebastian Dröge
a76c51ac5c Add bufferlist bindings 2017-07-28 18:20:11 +01:00
Sebastian Dröge
210d641091 Implement Sample bindings 2017-07-28 18:04:15 +01:00
Sebastian Dröge
e3c9965eee Add getters/setters for all the segment fields 2017-07-28 17:47:23 +01:00
Sebastian Dröge
3dac0c8b30 Add constants for GST_BUFFER_OFFSET_NONE and GST_CLOCK_TIME_NONE 2017-07-25 15:31:45 +03:00
Sebastian Dröge
acd0fc7874 Add Buffer bindings from gst-plugin-rs 2017-07-25 15:01:24 +03:00
Sebastian Dröge
9fdf422e9b Random cleanup 2017-07-25 01:17:50 +03:00
Sebastian Dröge
e87c459099 Add bindings for pad probes
Missing for this to be actually useful: Buffer, BufferList, Event, Query bindings
2017-07-24 11:52:21 +03:00
Sebastian Dröge
ce33439465 Add GObjectExtManual trait and implement set_property_from_string() there 2017-07-20 11:39:44 +03:00
Sebastian Dröge
a94d4d583d Re-export gst::ObjectExt as gst::GstObjectExt to prevent conflict with glib::ObjectExt 2017-07-13 10:36:38 +03:00
Sebastian Dröge
9c357abf1a Add support for Fractions 2017-07-12 13:25:11 +03:00
Sebastian Dröge
796e37b4b6 Initial tag support 2017-07-12 10:27:43 +03:00
Sebastian Dröge
9cfb83d6a2 Add Source support to GstBus, and the sync message handler 2017-07-11 19:29:16 +03:00
Sebastian Dröge
4c5aa49fa2 Run manual code through rustfmt 2017-07-11 00:33:24 +03:00
Sebastian Dröge
c0707bed94 Add initial caps bindings 2017-07-11 00:11:55 +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
decf5da6d0 Add copyright notices 2017-07-07 14:47:28 +03:00
Sebastian Dröge
291f329fc3 Add Element::add_many(), ::remove_many(), Bin::link_many(), ::unlink_many() 2017-07-05 11:11:45 +03:00
Sebastian Dröge
fc8046b9bd Implement simple example application and clean up API 2017-07-03 18:08:43 +03:00
Sebastian Dröge
7a110ace10 Export parse_launch / parse_bin_from_description at the crate level 2017-07-03 17:57:57 +03:00
Sebastian Dröge
aa3581cee9 Add initial Message/MiniObject bindings 2017-07-03 14:01:08 +03:00
Sebastian Dröge
2546045593 Implement init() around gst_init_check() 2017-07-03 12:26:40 +03:00
Sebastian Dröge
15b08a4293 Initial commit
Requires
  https://github.com/gtk-rs/gir/pull/365
  https://github.com/gtk-rs/gir/pull/364
to be merged for autogeneration of the bindings.

Requires
  https://github.com/gtk-rs/gir/issues/367
for fixing memory leaks.
2017-05-12 14:24:03 +02:00