Commit graph

316 commits

Author SHA1 Message Date
Sebastian Dröge 196a9891cb Regenerate with latest gir
This switches the RTP constant strings over to once_cell::Lazy
2020-01-22 19:57:41 +02:00
Sebastian Dröge be3c378f28 Use Results instead of Options where they signal an error instead of just a missing value
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 22:21:28 +02:00
Sebastian Dröge eaafbd14f7 Regenerate 2019-12-15 12:19:33 +02:00
Sebastian Dröge 175863668d Regenerate everything with latest gir 2019-11-21 09:52:51 +02:00
Guillaume Gomez 457ac9118b Regenerate with latest gir 2019-11-11 11:34:09 +01:00
Sebastian Dröge 991f2e1576 Update and regenerate everything with latest gir 2019-10-05 00:03:57 +03:00
Sebastian Dröge 1faf41986b gstreamer: Add bindings for ClockEntryType and ClockFlags 2019-09-25 17:22:15 +03:00
Sebastian Dröge 8208ee0891 gstreamer/device: Device::create_element() is transfer floating, not transfer full
See https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/444
2019-09-11 22:41:59 +03:00
François Laignel 1367becfaf DateTime: manual impl for PartialOrd, PartialEq and Debug
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/217
2019-08-21 12:34:15 +02:00
François Laignel 5d012945df Regen 2019-08-11 10:43:30 +02:00
Sebastian Dröge bde6a04780 Regenerate everything with latest gir 2019-07-10 11:21:28 +03:00
Sebastian Dröge 47f0940b44 Regenerate everything with latest gir 2019-06-24 20:52:03 +03:00
Sebastian Dröge b87ffa17bb Run rustfmt also over all the generated code 2019-06-18 13:12:00 +03:00
Sebastian Dröge e5aa6f59f9 Regenerate everything 2019-06-18 13:10:46 +03:00
Guillaume Desmottes 7a69a1137c gstreamer: plugin_feature: use Rank enum 2019-06-04 12:56:18 +03:00
Guillaume Desmottes 1cd733fb0b gstreamer: allow to register using Rank enum directly
Prevent user to have to cast to a u32 manually.
2019-06-04 12:50:43 +03:00
Sebastian Dröge 2c31baaa0c gstreamer: Implement Add<u32> for gst::TypeFindProbability and fix comparison
While the enum is a signed integer, all operations inside GStreamer
(especially comparison) is based on unsigned integers.
2019-06-04 12:45:56 +03:00
Sebastian Dröge 620a9b2a95 gstreamer: Implement Add<u32> for gst::Rank and fix comparison
While the enum is a signed integer, all operations inside GStreamer
(especially comparison) is based on unsigned integers.
2019-06-04 12:45:56 +03:00
Vivia Nikolaidou 32e1d68d36 allocator: Expose GstAllocator 2019-05-24 10:32:57 +00:00
Vivia Nikolaidou 044d931d01 flags: Expose GstMemoryFlags 2019-05-24 10:32:57 +00:00
Vivia Nikolaidou 6403c06990 Add API for setting/getting object flags
Implemented for Object, Pipeline, Bin, Element, Plugin.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/104
2019-05-11 13:13:33 +03:00
Sebastian Dröge 88dcb82c8d Regenerate everything for 1.16.0 2019-04-23 19:15:53 +03:00
Sebastian Dröge 24305a19e8 Regenerate everything with latest gir 2019-04-15 18:38:05 +03:00
François Laignel bec3d84627 TagList: add TagScope {get, set} 2019-03-20 13:58:28 +00:00
Sebastian Dröge 8754e4220e Regenerate everything with latest gir 2019-02-22 11:55:16 +02:00
Sebastian Dröge 00cbd49923 Regenerate with latest gir 2019-01-29 16:28:51 +02:00
Sebastian Dröge 598e012568 Add bindings for gst::tags::register() 2019-01-23 15:52:51 +02:00
Sebastian Dröge ad24ab9638 Regenerate everything with latest gir 2019-01-21 22:00:48 +02:00
François Laignel 84ba2d7971 Use dedicated type DeviceMonitorFilterId
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/174
2019-01-19 14:52:15 +01:00
François Laignel b20e4454f1 Return () instead of bool for some functions
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/171
2019-01-17 23:49:35 +01:00
François Laignel 333d71f92b Update functions returning bool to use Result<(), glib::BoolError>
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/171
2019-01-17 23:13:44 +01:00
Sebastian Dröge 6da0a9d169 Regenerate everything with latest gir 2019-01-16 13:32:39 +02:00
François Laignel 948fb2ae4b Replace XXXReturn with Result<XXXSuccess, XXXError>
... in function signatures.

These breaking changes aim at improving usability by allowing users
to take advantage of Rust error management features sur as `ok_or`,
`map_err`, `expect` and the `?` operator. See the `examples` and
`tutorials` to get an idea of the impacts.
2019-01-11 18:33:04 +01:00
François Laignel 3200574d31 Update to latest gir
See https://github.com/gtk-rs/gir/pull/687
2019-01-04 16:02:40 +01:00
Philippe Normand 9534416760 Regenerate and fix manual bindings for GString support 2019-01-03 22:01:41 +00:00
Sebastian Dröge 5c93e134a7 Regenerate everything with new version of gir 2018-12-08 14:58:14 +02:00
Sebastian Dröge d2b911a629 Port GhostPad subclassing 2018-11-21 16:14:06 +02:00
Sebastian Dröge ec2a0635ca Port Pad subclassing 2018-11-21 16:14:06 +02:00
Sebastian Dröge 97211e869b Port Pipeline subclassing 2018-11-21 16:14:06 +02:00
Sebastian Dröge 55dac7eeb4 Port Bin subclassing 2018-11-21 16:14:06 +02:00
Sebastian Dröge 56319f9294 Move subclassing infrastructure into the main bindings
And port Element bindings to the new infrastructure.
2018-11-21 16:14:06 +02:00
Sebastian Dröge f31827f194 Regenerate with latest gir
Gets rid of some unneeded property notification functions in GES
2018-11-05 11:18:31 +02:00
Thijs Vermeir 25e0baf483 update autogenerated files 2018-11-04 19:14:35 +01:00
Víctor Manuel Jáquez Leal 60c9cdfda1 Update autogenerated code with latest gir 2018-10-31 17:33:15 +02:00
Sebastian Dröge 0947c8f087 Rename gst::Bin traits from BinExt to GstBinExt to prevent conflicts with gtk::Bin 2018-10-28 11:30:41 +00:00
Sebastian Dröge 8f71a81cb5 Regenerate with latest gir to get rid of unneeded notify signal connectors for construct-only properties 2018-10-03 13:57:07 +03:00
Sebastian Dröge 3c900e6102 Regenerate with latest gir 2018-08-18 00:25:12 +03:00
François Laignel 3f0cd6fb87 Toc: serde impl 2018-07-30 23:18:30 +03:00
François Laignel 5e6f80cc32 Segment: serde impl 2018-07-30 23:18:30 +03:00
François Laignel a2c4e78f70 GenericFormattedValue: serde impl 2018-07-30 23:18:30 +03:00
François Laignel 862afe5cc7 Buffer: serde impl 2018-07-30 23:18:30 +03:00
Sebastian Dröge 2240ef109f Regenerate with latest GIR and update for the glib::Quark changes 2018-07-30 11:46:40 +03:00
Sebastian Dröge 2085d170be Get rid of callback_guard! as unwinding through FFI is defined behaviour now and aborts 2018-06-24 14:42:11 +03:00
Sebastian Dröge 1192a027b4 Regenerated with latest GIR and GIR files 2018-05-21 11:55:19 +03:00
Sebastian Dröge 4692806b00 Add Bus::remove_watch()
It was accidentially ignored before
2018-05-19 10:37:09 +03:00
Sebastian Dröge c31921e093 Further work-arounds for floating reference handling changes between 1.12 and 1.14
This fixes various memory-safety issues caused by broken reference
counting. We have to handle pre-1.14 and post-1.14 differently in
constructors.

See https://bugzilla.gnome.org/show_bug.cgi?id=743062#c30
2018-05-09 12:20:59 +03:00
Sebastian Dröge 46d27e3e75 Regenerate everything with latest GIR 2018-04-23 20:45:15 +03:00
Sebastian Dröge 9a3ef2e9f1 Regenerate with latest GIR and update for the non-bitflags flags in -sys now 2018-04-04 10:47:12 +03:00
Sebastian Dröge a33fd41d02 Regenerate everything with latest gir 2018-03-20 11:52:29 +02:00
Sebastian Dröge 3a755219f4 Add Promise bindings 2018-03-19 10:32:07 +02:00
Sebastian Dröge 0112d22804 Various manual 1.14 API additions and remove deprecated functions 2018-03-19 10:32:07 +02:00
Sebastian Dröge 4864a1e089 Fix build 2018-03-19 10:32:07 +02:00
Sebastian Dröge 1abe9cbeb9 Update gstreamer 2018-03-19 10:32:07 +02:00
Sebastian Dröge de8f4694f5 Add initial BufferPool bindings 2018-03-07 11:08:21 +02:00
Sebastian Dröge 808ff293ec Regenerate everything with latest gir 2018-03-02 21:34:29 +02:00
Sebastian Dröge f1426c82ba Remove callback guards
Since Rust 1.24 it is safe to let panics go to the FFI boundary
2018-02-17 19:58:41 +02:00
Sebastian Dröge 6d0d7a3df8 Regenerate everything with latest GIR 2018-02-06 16:42:34 +02:00
Sebastian Dröge 755982bb38 Correctly mark Stream and StreamType as requiring version 1.10 at least
Should fix https://github.com/sdroege/gstreamer-rs/issues/68
2017-12-26 18:13:15 +01:00
Sebastian Dröge f439f14ec3 SystemClock::set_default() can accept None 2017-12-20 18:57:16 +02:00
Sebastian Dröge 67a46b3bf5 Most Preset functions that return a bool signal an error with this, use a Result 2017-12-20 18:47:04 +02:00
Sebastian Dröge f2729fb730 Preset::set_app_dir() returning false is an error, make it a Result 2017-12-20 18:44:57 +02:00
Sebastian Dröge d182584c25 Object::set_name() should not accept NULL 2017-12-20 18:35:41 +02:00
Sebastian Dröge 55c8cf69f3 update_registry() returning false is not an error
It means that there were no changes.
2017-12-20 18:22:30 +02:00
Sebastian Dröge e34212d517 parse_bin_from_description() return value is not nullable, except for errors 2017-12-20 18:22:30 +02:00
Sebastian Dröge 210119d9aa Element::set_clock() allows None for the clock parameter 2017-12-20 18:22:30 +02:00
Sebastian Dröge 6d7acd200d Element::set_bus() allows None for the bus parameter 2017-12-20 18:10:50 +02:00
Sebastian Dröge 241bb823d5 Element::link_pads_full() should return a Result instead of a bool 2017-12-20 18:07:55 +02:00
Sebastian Dröge e2970db84c Failure to post a message is an error, so return a Result instead of a bool 2017-12-20 18:07:28 +02:00
Sebastian Dröge 12ee7358e3 Add bindings for TypeFindFactory 2017-12-18 09:53:08 +02:00
Sebastian Dröge 5dd89d01e2 DeviceMonitor/Provider::start() should return a Result 2017-12-18 09:49:15 +02:00
Sebastian Dröge 48958d381e Implement Sync for DateTime
It's immutable.
2017-12-18 09:42:27 +02:00
Sebastian Dröge 9223386750 Remove clock parameter from Clock::(un)adjust_with_calibration()
It's useless and not used.
2017-12-18 09:39:37 +02:00
Sebastian Dröge 9a7ede1dcc Bus::add_signal_watch_full() should take a Priority, not u32 for the priority 2017-12-18 09:39:14 +02:00
Sebastian Dröge 49627b8de7 Various nullability fixes everywhere and hide enum->string functions 2017-12-17 18:29:22 +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 ffb5869dd1 Use the correct pad type for the proxy/ghost pad default pad functions 2017-12-17 11:24:03 +02:00
Sebastian Dröge 3de73d89f2 Add Buffer::copy_into() and add flags parameter to ::copy_region()
Also ::copy_deep() can fail, return an Option<_>
2017-12-16 15:15:42 +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 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 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 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 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 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 ec6dde855a Replace ulong for the property notify watches with a custom NotifyWatchId type 2017-10-27 17:55:48 +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 19c5556239 Regenerate with latest GIR 2017-10-01 15:52:15 +02:00
Sebastian Dröge dc6c7500df Add bindings for remaining pad task functions
Especially Pad::start_task()
2017-09-18 00:32:29 +03:00
fengalin 7a108ddd0d Set version (1.12) for StackTraceFlags
Fixes https://github.com/sdroege/gstreamer-rs/pull/36
2017-09-17 18:58:10 +03:00
Sebastian Dröge ce5c01a88e Implement gst::Iterator as a generic type to not require using glib::Values everywhere 2017-09-17 18:45:38 +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 3b0e6843e2 Regenerate everything with latest GIR 2017-09-09 16:35:01 +03:00
Sebastian Dröge ca6c597fad Add bindings for the GStreamer logging system 2017-09-09 16:35:01 +03:00
Sebastian Dröge 0454a9cb95 Ignore some now generated functions for which we have manual implementations 2017-08-31 12:13:44 +03:00
Sebastian Dröge 52c013b834 Regenerate everything with latest GIR 2017-08-30 14:45:25 +03:00
Sebastian Dröge 342d5ab935 Add signal connectors for property notifications
Have to hide some properties again at a later time, which have actual
getter/setter functions already. We only need the notification signals
for those.

Depends on the GIR patch in https://github.com/gtk-rs/gir/pull/441
2017-08-18 17:43:55 +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 33fb38efd9 Remove traits for things that are not subclassed 2017-08-17 14:50:25 +03:00
Sebastian Dröge de98b8039e Add GstPadLinkCheck 2017-08-14 22:19:47 +03:00
Sebastian Dröge 97bca10484 Add GstRank 2017-08-14 22:18:34 +03:00
Sebastian Dröge 474749598e Add GstElementFlags and suppressed_flags API of GstBin 2017-08-14 22:15:37 +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 d654252e65 gstreamer: disable calculate_linear_regression
It's not binding friendly.
2017-08-11 15:42:28 +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 88f4fe5ea3 The message signal of Bus only has to require Send for the closure 2017-08-04 23:04:42 +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 bf0f472014 Add autogenerated GstContext functions 2017-08-02 20:46:39 +03:00
Sebastian Dröge c4c8e738fd Enable Date tag and GDataTime support for GstDateTime 2017-08-02 11:39:37 +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 38496eca7d Pass events by value instead of reference 2017-08-01 13:59:12 +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 421e648a27 Enable functions working on Events 2017-07-30 15:09:51 +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 33ccfc7225 Add GDateTime bindings 2017-07-29 15:14:02 +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 e3c9965eee Add getters/setters for all the segment fields 2017-07-28 17:47:23 +01:00
Sebastian Dröge 7926257c3c Add auto-generated Segment bindings 2017-07-28 17:38:52 +01:00
Sebastian Dröge 29f20ebe13 Remove various property bindings for properties that have getters/setters 2017-07-25 15:28:09 +03:00
Sebastian Dröge 80265967f7 Add some more bindings related to buffers and taglists 2017-07-25 15:21:03 +03:00
Sebastian Dröge acd0fc7874 Add Buffer bindings from gst-plugin-rs 2017-07-25 15:01:24 +03:00
Sebastian Dröge 28f665502b Implement all caps/structure operations
Except for anything related to caps features
2017-07-25 02:03:18 +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 c750b62e98 Regenerate with latest gir and update everything 2017-07-21 15:14:58 +03:00
Sebastian Dröge 91649b259a Regenerate with latest gir 2017-07-19 21:41:25 +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 4964495b03 Implement some more missing API now that we have Structure 2017-07-11 00:26:27 +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 4808865371 Implement Builder for all Messages 2017-07-07 14:39:22 +03:00
Sebastian Dröge e3902bbbf6 Add decodebin example and add some missing API for it 2017-07-05 10:40:02 +03:00
Sebastian Dröge 9b91024221 Implement all message parsing API 2017-07-05 01:47:33 +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 eeea572c96 Implement further parts of the Message machinery 2017-07-03 17:52:10 +03:00
Sebastian Dröge 602c3f257f Generate Bus/ElementFactory without traits, generate Plugin 2017-07-03 14:06:08 +03:00
Sebastian Dröge aa3581cee9 Add initial Message/MiniObject bindings 2017-07-03 14:01:08 +03:00
Sebastian Dröge b14f0278c1 Regenerate everything with latest gir 2017-06-29 09:02:08 +03:00
Sebastian Dröge 771b5c8094 Add previously forgotten functions module 2017-06-25 11:26:16 +03:00
Sebastian Dröge f777258564 Update .gir files to 1.12.1 2017-06-25 11:17:06 +03:00
Sebastian Dröge b792f4b5da Regenerate with latest gir and configure default concurrency to send+sync 2017-06-25 11:04:37 +03:00
Sebastian Dröge e41fb76d2d Use new bool_return_is_error configuration for various functions
And ignore some wrong bindings.
2017-06-24 12:02:24 +03:00
Sebastian Dröge 6b4e3e9bd4 Switch to GIT versions of crates and regenerate with latest GIR 2017-06-24 11:55:28 +03:00
Sebastian Dröge d92f865f36 Update Gst-1.0.gir with floating reference fixups from GIT master
And regenerate everything.
2017-05-17 15:59:16 +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