Sebastian Dröge
68d492bb33
gstreamer: Mark Structure
and CapsFeatures
as #[repr(transparent)]
too
2022-01-17 19:42:20 +00:00
Jan Alexander Steffens (heftig)
fb56bbda6e
gstreamer: Split parsers for owned and borrowed views
...
When we have a view like `Caps<&EventRef>`, we can return a `CapsRef`
borrowing from the wrapped `EventRef`. This way, the `CapsRef` we return
can outlive the view itself.
This is in contrast to a `Caps<Event>` view which owns the `Event`.
Here, the `CapsRef` we return cannot outlive the view.
gstreamer-rs 0.18 consolidated code and treated everything like the
latter case. Fix this by duplicating the accessors for each case.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/367
2022-01-17 19:13:47 +00:00
Sebastian Dröge
8f5e373882
gstreamer: Mark miniobject wrapper types as #[repr(transparent)]
...
That way they're treated everywhere exactly like a raw pointer.
2022-01-17 18:04:40 +00:00
Sebastian Dröge
8fa1076dfa
Replace Foo::from_instance(foo)
with foo.imp()
2022-01-17 19:34:06 +02:00
Sebastian Dröge
971f35754c
Change default branch from master to main
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/364
2022-01-16 16:15:48 +02:00
Sebastian Dröge
8b09a84bf1
Update CHANGELOG.md for 0.18.0
2022-01-16 13:36:18 +02:00
Sebastian Dröge
22a86a66b4
Update CHANGELOG.md for 0.17.4
2022-01-16 12:17:18 +02:00
Sebastian Dröge
7444975421
Update versions to 0.19.0
2022-01-15 20:21:53 +02:00
Sebastian Dröge
711a4bb76e
gstreamer: Silence a new clippy warning in the tests
2022-01-14 12:58:26 +02:00
Sebastian Dröge
605c633579
Ignore clippy::non_send_fields_in_send_ty
lint
...
It's useless in its current shape and wrongly triggering on all types.
See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-13 23:38:11 +02:00
Sebastian Dröge
9eb479cf78
Regenerate everything
2022-01-12 15:40:36 +02:00
Sebastian Dröge
843d3749b7
caps: Add bindings for foreach()
, map_in_place() and
filter_map_in_place()`
2022-01-11 13:37:40 +00:00
Sebastian Dröge
1b46bca2db
structure: Add bindings for foreach()
, map_in_place() and
filter_map_in_place()`
2022-01-11 13:37:40 +00:00
Sebastian Dröge
6d63180bfc
Update for glib::Quark API changes
2022-01-11 12:50:13 +02:00
Guillaume Gomez
ac9b1e881c
Add missing #[must_use] attribute for clippy
2022-01-04 19:43:07 +01:00
Guillaume Gomez
27dd305cb4
Regen to get #[must_use] attributes generated
2022-01-04 19:02:58 +01:00
Sebastian Dröge
bbcd221e8d
Change from impl_() to imp()
2021-12-28 17:50:06 +02:00
Sebastian Dröge
1e18c59d2a
Implement glib::ValueTypeOptional for various types
2021-12-16 17:40:39 +00:00
Luca BRUNO
c30eff771a
Regenerate with latest gir (gboolean return codes)
2021-12-14 11:43:30 +00:00
Paolo Borelli
97f59d34fa
Add the has_name() fn to EventRef, MessageRef and StructureRef
...
They are handy and they match the C api
2021-12-14 09:59:39 +01:00
Sebastian Dröge
9bf5f641ff
Regenerate with latest gir
2021-12-12 17:54:20 +02:00
Sebastian Dröge
1541fbf32a
gstreamer: Add many new doc aliases for C function
2021-12-12 17:52:32 +02:00
Luca BRUNO
d1cc8d1298
Regenerate with latest gir (assert safe gerror)
2021-12-07 12:07:45 +00:00
Sebastian Dröge
ee1a5e8395
Add #[must_use] attribute to many builders
2021-12-04 10:26:08 +02:00
Sebastian Dröge
8f3ed6d289
Add checks for the Gir.tomls
...
... and fix all the failures.
2021-12-03 20:27:50 +00:00
Sebastian Dröge
f6dc14b946
Add a few missing docs aliases for constants
2021-12-03 10:19:22 +02:00
Sebastian Dröge
7d968d78bb
Silence false needless_option_as_deref
clippy warnings
...
See https://github.com/rust-lang/rust-clippy/issues/8047
2021-12-02 17:52:23 +02:00
Mathieu Duponchelle
8e6c08f8fd
gstreamer/value_serde: fix nested structures
...
When serializing a structure, if it contains a nested structure
the serialization / deserialization code goes through value_serde,
which was lacking support for Structure.
2021-12-01 17:41:48 +00:00
Sebastian Dröge
c965217e54
gstreamer: bufferlist: Implement buffer foreach functions around ControlFlow
enum
...
This makes it clearer than a plain `bool` or `Result<Option<Buffer>, Option<Buffer>>`.
Also pass a `&Buffer` instead of a `&BufferRef` to the immutable foreach
function to allow taking references of the buffer outside the scope of
the closure by cloning instead of requiring a full copy.
2021-12-01 14:16:33 +02:00
Sebastian Dröge
15fbb17a09
gstreamer: buffer: Implement meta foreach functions around ControlFlow
enum
...
This makes it clearer than a plain `bool` or `Result<bool, bool>`.
2021-12-01 14:02:50 +02:00
Tim-Philipp Müller
e0e17b8b25
gstreamer: pad: use ControlFlow with custom enum for sticky_events_foreach() return value
...
... instead of Result<Option<Event>,Option<Event>> which isn't very nice.
And use static dispatch instead of dynamic dispatch.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/361
2021-12-01 14:02:50 +02:00
Piotrek Brzeziński
abd2d4dfd7
gstreamer: Add getters for ElementFactory/DeviceProviderFactory metadata
2021-11-28 21:00:05 +01:00
Bilal Elmoussaoui
86b07ce5b9
regen per emit_by_name changes
2021-11-21 09:35:36 +01:00
Sebastian Dröge
668b2b3fdf
gstreamer: Use glib::List
in various places for reducing allocations when working with factory lists
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/359
2021-11-20 14:44:49 +02:00
Sebastian Dröge
9263c9f42e
gstreamer: Correctly rename ParamSpecArray
constructor
2021-11-20 13:47:18 +02:00
Sebastian Dröge
21d38e41d6
gstreamer: Rename DateTime
constructors to replace the new_
prefix with from_
2021-11-20 12:20:25 +02:00
Sebastian Dröge
3b28bccf03
Update for GLib constructor renames
...
See https://github.com/gtk-rs/gtk-rs-core/pull/384
2021-11-20 12:20:17 +02:00
Sebastian Dröge
ddf398e3da
gstreamer: Add various missing doc aliases to event/message/query functions
...
This is going to make it easier to find them from the corresponding C
function names.
2021-11-19 10:38:46 +00:00
Sebastian Dröge
2471150e72
gstreamer: Add bindings for StreamCollection::stream-notify
signal
2021-11-19 10:57:54 +02:00
Sebastian Dröge
63f6d6a7d3
gstreamer: Make child proxy property API more consistent with the object property API
...
And especially check various conditions for the property and the value.
Also add `ChildProxy::lookup()`.
2021-11-19 10:54:52 +02:00
Sebastian Dröge
7c1ed9ff4d
Regenerate with latest gir
...
Updates to use system-deps 6
2021-11-18 16:32:17 +02:00
Bilal Elmoussaoui
8faaf8a629
rename ffi crates on Cargo.toml
2021-11-17 12:00:06 +01:00
Bilal Elmoussaoui
e61b83f592
regenerate with not renamed libs on ffi crates
2021-11-17 12:00:06 +01:00
Sebastian Dröge
279f1a404b
gstreamer: Use glib::SList
instead of our own version of it for listing all debug categories
2021-11-16 20:18:31 +02:00
Sebastian Dröge
e68790d579
gstreamer: Directly format into a NUL
-terminated C string for debug log messages
...
And also replace `%` with `%%` for < 1.20 inline, and for >= 1.20 use
the new `gst_debug_log_literal()` function that doesn't require this and
also reduces string allocations further.
2021-11-16 20:18:31 +02:00
Sebastian Dröge
e74f54a64f
Regenerate with latest gst-gir-files
2021-11-16 20:18:31 +02:00
Bilal Elmoussaoui
0d391d5031
regenerate with latest gir
2021-11-16 15:47:44 +01:00
Sebastian Dröge
a2e22416fe
gstreamer: Don't try removing locked metas from buffers
...
And return success from the `remove()` function.
2021-11-16 13:08:23 +02:00
Sebastian Dröge
df36a7c57a
gstreamer: Add gst::MetaFlags
and accessor on meta
2021-11-16 13:05:47 +02:00
Sebastian Dröge
0b544ffbd3
Simplify glib::IsImplementable
trait implementations
2021-11-15 11:48:14 +02:00
Sebastian Dröge
dd9e12822f
Regenerate with latest gir
2021-11-13 11:05:09 +02:00
Sebastian Dröge
c6c499aed2
gstreamer: Update test for glib::EnumClass API changes
2021-11-13 11:03:52 +02:00
Bilal Elmoussaoui
d788a10856
re-generate with per crate min version
2021-11-11 12:26:29 +01:00
Sebastian Dröge
f27a2bddd6
gstreamer: Add bindings for DebugCategory::all() to list all available debug categories
2021-11-09 09:58:22 +00:00
Bilal Elmoussaoui
e3a65a3a88
gst object: add a panicking variant of set_property_from_str
...
Similar to what was added to ObjectExt
2021-11-08 14:42:59 +01:00
Bilal Elmoussaoui
213020165a
manual changes post ObjectExt improvements
2021-11-08 14:42:59 +01:00
Bilal Elmoussaoui
0d009bca31
regen with latest gir
2021-11-08 14:42:59 +01:00
Sebastian Dröge
0444660d1f
gstreamer: Don't use a trait object for the property value in ChildProxy::set_child_property()
...
This makes it nicer to use as `1` can be passed directly instead of `&1`.
2021-11-06 09:36:38 +02:00
Sebastian Dröge
220c500799
gstreamer: Add numer()/denom() functions to gst::Fraction to get the values by value instead of reference
2021-11-06 00:23:07 +02:00
Sebastian Dröge
a3015ab507
gstreamer: Refactor gst::IntRange constructors to not require specifying the contained type necessarily
2021-11-06 00:23:07 +02:00
Sebastian Dröge
9901f0c6a2
gstreamer: Refactor gst::Array / gst::List bindings to work correctly with the refactored traits in glib
...
Also allow only a single type inside them.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/360
2021-11-06 00:23:07 +02:00
Sebastian Dröge
30bb699cbc
gstreamer: Use plain &str for parameters instead of Into<&str>
...
The latter doesn't really have any advantage and only bloats the API.
2021-11-05 17:37:41 +02:00
François Laignel
82b7239379
regen: NONE as associated consts
2021-11-04 18:42:06 +01:00
Sebastian Dröge
c942a1d563
gstreamer: Implement Element::request_pad_simple()
only once
...
With < 1.20 it will use `gst_element_get_request_pad()` and otherwise
`gst_element_request_pad_simple()`. It's not marked as deprecated in
either case.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/358
2021-11-04 15:44:35 +02:00
Sebastian Dröge
cdfe4b3d67
Remove unneeded std::convert::TryFrom/TryInto and std::str::FromStr imports
2021-10-31 18:20:31 +02:00
Sebastian Dröge
d785bf8c3a
Regenerate with latest gir
2021-10-31 11:47:34 +02:00
Sebastian Dröge
c00a97f5ec
Update to Rust edition 2021 and minimum supported Rust version 1.56
...
Also update CI image to use meson 0.60.
2021-10-31 11:47:34 +02:00
Sebastian Dröge
b43d785d83
Move README.md to the repo root and link it from inside the gstreamer subdirectory
2021-10-27 00:01:00 +03:00
Sebastian Dröge
e657e676d5
Relax main context checks in Bus::add_local()
and gst_video::convert_sample_async_local()
2021-10-25 09:54:33 +00:00
Sebastian Dröge
c2e43f86a5
gstreamer: Update to option-operations 0.4
2021-10-25 09:51:14 +03:00
Sebastian Dröge
92f9f3be39
Remove various unnecessary & from property/structure field related code
2021-10-24 20:52:23 +03:00
Sebastian Dröge
b4a3738b82
Move more code to caps/structure builders
...
Instead of the new() functions requiring slices. The code reads cleaner.
2021-10-24 18:57:15 +03:00
Sebastian Dröge
7f0ca0011c
Add gst::GstObjectImpl, gst::ProxyPadImpl, gst_audio::AudioBaseSrc, gst_audio::AudioBaseSink subclassing traits
...
These were missing from the type hierarchy previously and are now
required because of more strict checks in the GLib bindings.
2021-10-23 11:59:03 +03:00
Sebastian Dröge
12fec484c7
Simplify IsSubclassable trait impls
2021-10-23 11:27:46 +03:00
Sebastian Dröge
cc76442601
gstreamer: Update ron dev-dependency to 0.7
2021-10-23 10:40:24 +03:00
Sebastian Dröge
18e45dd991
gstreamer: Add FromIterator/Extend impls based on owned Strings and glib::Quark
2021-10-20 14:28:14 +03:00
Sebastian Dröge
a7be9ea9d9
gstreamer: Implement Extend trait for buffer, buffer list, caps, caps features and structure
...
And also implement FromIterator<Memory> for buffer.
2021-10-20 13:53:23 +03:00
Sebastian Dröge
febd0ee144
Declare the minimum supported Rust version in Cargo.toml
2021-10-18 19:30:37 +03:00
Sebastian Dröge
e6b78d1489
gstreamer: Have Structure::from_iter() take owned values
...
They were copied internally, which can be avoided in many cases if
working with owned values anyway.
2021-10-18 16:36:15 +03:00
François Laignel
f315d3a052
Use published option-operations
2021-10-18 14:30:59 +02:00
François Laignel
4bbd201377
Impl Option*{Div,Mul,Rem}
...
Use the inner type for Rhs, as implemented for Duration.
These operations make sense without providing a "unit".
2021-10-18 14:30:59 +02:00
François Laignel
deb22b264e
format, clock_time: gather macros together
...
The modules format and clock_time share common macros which are
scattered between each modules. This cross reference makes it
difficult to maintain the macros.
This commit also make it possible to use macro
impl_common_ops_for_newtype_uint for Percent.
2021-10-18 14:30:59 +02:00
François Laignel
986a136492
clock_time & format: basic opt-ops impl
...
The option-operations crate provides traits to improve usability
when dealing with `Option`s, which is often the case with
`ClockTime` & most formats.
2021-10-18 14:30:59 +02:00
François Laignel
051df59cd1
clock_time, format: fix checked, saturating, wrapping ops
...
These operations were implemented using the integer implementations.
These types' MAX values are different from the integers so they must
use specific implementations.
Also add the overflowing variants.
2021-10-18 14:30:59 +02:00
Guillaume Desmottes
675fe349a7
gstreamer: implement Sum on ClockTime
...
Small convenient helper.
2021-10-18 08:05:56 +02:00
Sebastian Dröge
67af5ac569
gstreamer: Add support for 1.18 instant rate request message
2021-10-17 14:39:38 +03:00
Sebastian Dröge
cdddf48f08
gstreamer: Correctly mark various messages as new in 1.10/1.16
2021-10-17 14:33:34 +03:00
Sebastian Dröge
6e3878c8f5
gstreamer: Add bindings for 1.18 instant-rate-change related events
2021-10-17 14:27:44 +03:00
Sebastian Dröge
8b77bd4068
gstreamer: Mark select-streams / stream-collection as only available in 1.10
2021-10-17 14:11:56 +03:00
Sebastian Dröge
d01ed466d0
gstreamer: Use #[non_exhaustive] annotation instead of a dummy enum variant
2021-10-17 14:04:18 +03:00
Sebastian Dröge
aab0a45cfc
gstreamer: Implement pad sticky event getter by type
...
This allows the caller to directly use the specific event type API on
the result instead of first having to match on it first.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/314
2021-10-17 14:04:18 +03:00
Sebastian Dröge
87e7a84a27
gstreamer: Remove one unnecessary use of unsafe in query code
2021-10-17 12:38:59 +03:00
Sebastian Dröge
e989899467
gstreamer: Remove FromIterator impls on references
...
Creating copies silently while calling collect() is unexpected and can
explicitly added to the iterator via map() if needed.
2021-10-17 11:21:31 +03:00
Sebastian Dröge
3670076f07
gstreamer: Implement IntoIterator / FromIterator for Buffer, BufferList, Caps, CapsFeatures, StreamCollection and Structure
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/285
2021-10-16 23:24:08 +03:00
Philippe Normand
b9cd38b796
gstreamer: query: Tidy up allocation pool API
...
Use `impl IsA<BufferPool>` and make the `set_nth_` and
`remove_nth_` methods check the index bounds.
2021-10-12 17:16:21 +01:00
Philippe Normand
6d88e18772
gstreamer: Add bindings for querying allocation params
...
This can be used to query downstream for custom allocators.
2021-10-12 17:16:21 +01:00
Sebastian Dröge
8fb37c5134
gstreamer: Implement Deref<Target=[glib::SendValue]> for List and Array
2021-10-12 11:24:54 +03:00
Sebastian Dröge
1c7b4516f9
Regenerate everything with latest GStreamer gir files
2021-10-08 19:44:38 +03:00
Sebastian Dröge
c4cbcecc7c
Regenerate everything
2021-09-28 18:11:20 +03:00
Sebastian Dröge
baccf52e43
Regenerate with latest gir
2021-09-28 15:46:37 +03:00
Sebastian Dröge
f5f5fae815
Regenerate with latest gir and gtk-rs gir-files
2021-09-28 12:55:58 +03:00
Jan Alexander Steffens (heftig)
c05d2e24af
gstreamer/clock_time: Format Debug like Display
...
This allows us to drop `.to_string()` from the custom Debug
implementations, which now also no longer print as strings.
2021-09-23 02:19:41 +02:00
Sebastian Dröge
14edcf9aaf
Regenerate with latest gir
2021-09-22 12:02:53 +03:00
Marijn Suijten
226419003d
Use impl
for some Into*
trait bounds
2021-09-21 23:54:11 +02:00
Marijn Suijten
669bf52291
Use impl
for AsRef
trait bounds
2021-09-21 23:54:07 +02:00
Marijn Suijten
13165938ab
Regen
2021-09-20 20:38:25 +02:00
Marijn Suijten
e2a9f83f5b
gir: Update and regenerate with impl Trait
instead of named types
...
https://github.com/gtk-rs/gir/pull/1153
2021-09-20 20:19:04 +02:00
Sebastian Dröge
a1c4a58180
Bind various new API
2021-09-19 13:12:58 +00:00
Sebastian Dröge
4b8f85c4c6
Regenerate with new gir and gir files
2021-09-19 13:12:58 +00:00
Sebastian Dröge
1856d47a06
gstreamer: Add bindings to MiniObject together with casting functionality
...
This is only possible with 1.20 because gst_mini_object_get_type() was
added then. Previous versions only provide bindings for the specific
types, like Caps, Event, etc.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/353
2021-09-19 13:12:58 +00:00
Sebastian Dröge
538ce91987
gstreamer: Provide getter for meta type in addition to meta API type
2021-09-19 15:45:58 +03:00
Sebastian Dröge
7c5303c492
gstreamer: Add support for gst::CustomMeta
2021-09-19 15:45:58 +03:00
Sebastian Dröge
80ee1edec5
gstreamer: Clean up meta code a bit
2021-09-19 15:45:58 +03:00
Jonas Platte
4b2f0a936b
Derive PartialOrd, Ord and Hash for PadProbeId
2021-09-15 20:12:03 +02:00
Sebastian Dröge
6b4f6ca45c
gstreamer/device_provider: Add constructor for device provider metadata
2021-09-13 11:34:00 +03:00
Guillaume Gomez
c68b601c74
regen
2021-08-31 15:11:15 +02:00
Simonas Kazlauskas
db30c121a0
const ElementMetadata constructor
...
The usual use of this will be through the `ElementImpl::metadata`
method, which requires a `&'static` reference to `ElementMetadata` to be
returned, so we better make it easy to construct these (without forcing
people to resort to `Lazy`'n'stuff)
2021-08-31 09:10:31 +00:00
Marijn Suijten
adfb6e35a4
Update gir and regenerate with attributes removed from macro calls
...
See https://github.com/gtk-rs/gir/pull/1213 .
2021-08-30 09:52:36 +02:00
Marijn Suijten
12887f1931
gstreamer: Move attributes on macro-calls like cfg_if
inside the macro
...
Attributes don't do anything when applied to macro invocations:
warning: unused attribute `doc`
--> gstreamer/src/lib.rs:146:29
|
146 | #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_attributes)]` on by default
note: the built-in attribute `doc` will be ignored, since it's applied to the macro invocation `cfg_if::cfg_if`
--> gstreamer/src/lib.rs:147:1
|
147 | cfg_if::cfg_if! {
| ^^^^^^^^^^^^^^
And, on line 294-295:
warning: unused attribute `doc`
--> gstreamer/src/lib.rs:294:33
|
294 | #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the built-in attribute `doc` will be ignored, since it's applied to the macro invocation `cfg_if::cfg_if`
--> gstreamer/src/lib.rs:295:5
|
295 | cfg_if::cfg_if! {
| ^^^^^^^^^^^^^^
Fortunately these two `cfg_if`'s for the Unix and Windows bus already
apply unnecessary trickery that duplicates the `mod`s and `use`s in
order to get documenation for both no matter the target platform; we can
capitalize on that by removing the `cfg_if` altogether and instead
applying the `cfg` and `doc(cfg())` attributes directly.
2021-08-29 11:21:46 +02:00
Simonas Kazlauskas
782d84bede
Remove the links
annotations
...
The `links` annotation in `Cargo.toml` is intended to ensure that in the
crate graph there's at most one crate that's an implementation of
some sort concept.
This can make sense in some scenarios, most prominent of which is when
the crate defines `#[no_mangle]` symbols (e.g. by compiling a vendored C
library.) In that situation linking a binary that depends on two
versions of the library cannot work because of colliding symbol names.
There does not appear to be a similar reason to impose such a
restriction on the users of `gstreamer-sys` and similar, however. All of
these crates link to a system library, they do not define any
`#[no_mangle]` symbols nor they vendor and build C libraries as part of
their build process. All they do is linking to a system library. Most
likely all the different versions of the bindings will link to the exact
same library too.
I haven't seen any global resources that these bindings use to ensure
soundness of the library, either.
2021-08-23 16:56:27 +00:00
Sebastian Dröge
ece84597fd
Update CHANGELOG.md for 0.17.3
2021-08-23 09:11:50 +03:00
Marijn Suijten
068b078edf
README: Replace shell
with console
codeblocks
2021-08-18 15:28:00 +02:00
Marijn Suijten
323c67dee4
README: Use symlink to point to gstreamer/README.md
...
These files are (supposed to be) identical. This also synchronizes the
missing bits from README.md to gstreamer/README.md.
2021-08-18 15:14:33 +02:00
Sebastian Dröge
bdccaeee0d
gstreamer: Manually implement Object::set_property_from_str() to be able to catch deserialization errors
2021-08-17 09:12:38 +03:00
Sebastian Dröge
43bfd1ae85
gstreamer: Add Value::deserialize_with_pspec() from 1.20
2021-08-17 08:53:53 +03:00
Sebastian Dröge
c5c9fd81e4
gstreamer: Value::deserialize() needs to take the target type as parameter
...
Otherwise it will always fail.
2021-08-17 08:53:52 +03:00
Jordan Petridis
2ded2837ba
tracer: add rustdoc-stripper-ignore-next annotations
2021-08-16 18:49:23 +03:00
Edward Hervey
f504493134
gstreamer: Add serde support for more enums and flags
...
PadDirection, PadPresence, URITYpe, Rank
2021-08-16 15:05:37 +02:00
Simonas Kazlauskas
cb475e0965
Bindings to GstTracer and GstTracerFactory
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/147
2021-08-16 14:38:22 +03:00
Simonas Kazlauskas
3ad9d3340b
Make plugin date-time optional
...
It is described as optional in
https://gstreamer.freedesktop.org/documentation/gstreamer/gstplugin.html?gi-language=c#GstPluginDesc
and is also pretty difficult to provide for Rust plugins, I feel. For C
stuff the expectation is that build system would set something like
GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` which is
terrible.
2021-08-10 17:38:55 +03:00
Sebastian Dröge
f84fc0dc59
Update CHANGELOG.md for 0.17.2
2021-08-05 18:01:23 +03:00
Guillaume Gomez
26a6fba6e2
regen
2021-08-03 11:55:44 +02:00
Guillaume Gomez
e2264a3f3f
Fix (new) clippy warnings
2021-08-03 10:08:32 +02:00
Guillaume Gomez
a0d82ec741
Merge README files and crate documentation
2021-07-30 20:26:11 +02:00
Sebastian Dröge
b1afc4804a
Fix various needless-borrow clippy warnings
2021-07-30 13:19:24 +03:00
Sebastian Dröge
386bd05817
Update CHANGELOG.md for 0.17.1
2021-07-13 09:20:57 +03:00
Olivier Crête
93c794b338
subclass: Declare minimum to be 1.19 for v1_20
2021-07-13 08:42:56 +03:00
Sebastian Dröge
b73b4428ba
gstreamer/segment: Return a segment reference instead of the value itself from the getter
2021-07-12 14:22:09 +03:00
Vivia Nikolaidou
eb5df0ae26
event: Implement gap_flags
2021-07-09 16:27:41 +03:00
Vivia Nikolaidou
45f8035ccb
structure, caps: Implement 1.20 serialize functions
2021-07-09 15:10:02 +03:00
Sebastian Dröge
edac1a1d3a
gstreamer/element: Include ElementExtManual::request_pad_simple() in the docs too
...
Currently only the v1_20 ElementExt::request_pad_simple() appears in the
docs but it's available from the other trait in older versions.
2021-06-30 09:26:51 +00:00
François Laignel
c9b88afcb4
gstreamer-*/CHANGELOG.md use symlinks
2021-06-29 15:45:58 +02:00
François Laignel
393d8959bd
CHANGELOG: mention fix-getters migration tools
2021-06-29 11:40:56 +02:00
Sebastian Dröge
a06cf66e6d
Update versions to 0.18.0
2021-06-29 00:08:16 +03:00
Sebastian Dröge
35c2086e2a
Update CHANGELOG.md for 0.17.0
2021-06-29 00:07:36 +03:00
Sebastian Dröge
c0904af4a7
Regenerate with latest gir-files
2021-06-28 18:34:03 +03:00
Sebastian Dröge
1cec94af1a
gstreamer: Mark all kinds of miniobject memory management convenience functions as existing since 1.18.3
...
Previously they were only available as inline functions in the headers.
2021-06-28 17:54:48 +03:00
Sebastian Dröge
9123143b57
Regenerate
2021-06-24 08:58:46 +03:00
Guillaume Gomez
dfeb777513
regen
2021-06-21 23:07:45 +02:00
Sebastian Dröge
a94d84e780
Silence/fix various clippy warnings
2021-06-20 10:59:49 +03:00
Guillaume Gomez
64d1598336
regen
2021-06-13 20:52:12 +02:00
Sebastian Dröge
0a71e3c8da
Regenerate with latest gir
2021-06-10 12:53:52 +03:00
François Laignel
e31ce9d07b
Manual ClockTime updates
2021-06-04 22:09:38 +02:00
François Laignel
90bb458e64
Rework ClockTime & FormattedValues
2021-06-04 22:09:38 +02:00
François Laignel
8dda8def6e
Manual try_from_glib shortcuts + unsafe
2021-06-04 22:09:38 +02:00
François Laignel
03e8e6d22f
regen: use TryFromGlib::Option for ClockTime
2021-06-04 22:09:38 +02:00
François Laignel
532af96ef9
Gir.toml: use TryFromGlib::Option for ClockTime
2021-06-04 22:09:38 +02:00
Marijn Suijten
8226c94110
sys: Link all v1_20 sys crates against library 1.19
2021-06-04 11:51:00 +02:00
Marijn Suijten
510e4cd2b1
Regenerate with 1.19.1 updates
2021-06-04 11:51:00 +02:00
Marijn Suijten
aa60c40c61
gst/gir: Generate new flags since 1.19.1
2021-06-04 10:26:24 +02:00
Marijn Suijten
7d13ecf1aa
gst,gl: Drop superfluous enum/flag member versions (since 1.19.1)
...
https://github.com/gtk-rs/gir/pull/1180 now parses these from `.gir`
directly, and `1.19.1` now includes the version for a few more of these
enums.
2021-06-03 21:24:12 +02:00
Marijn Suijten
bdc26746b6
treewide/gir: Mark Gst.Structure as ref
instead of ref-mut
mode
...
The only bindings using this type show up in v1.20 and use `&mut` which
lacks a matching `.to_glib_full()` implementation.
2021-06-03 20:35:35 +02:00
Marijn Suijten
9fd768425e
Rename request_pad_simple to avoid 1.19.1 clash
...
Fixes: 3f442d977
("prep for regen: relaxed get fn identification")
2021-06-03 20:35:35 +02:00
Marijn Suijten
3d8d1ffb19
Update gir and regenerate with automated enum/flag member versioning
...
https://github.com/gtk-rs/gir/pull/1180
2021-06-03 20:33:34 +02:00
Guillaume Gomez
b0fc500ed1
Generate missing doc aliases
2021-06-02 20:23:29 +02:00
Guillaume Gomez
abf82e6f7a
Replace raw constants with the FFI constants
2021-06-02 20:23:01 +02:00
Guillaume Gomez
96266ff922
Generate missing doc aliases
2021-06-02 17:35:30 +02:00
Marijn Suijten
7fcd560d18
Update gir and regenerate
...
- Doc aliases for types;
- ffi constants for bitflags too;
- Completely overhauled docs generation under the hood (only emitting
valid links, more types receive documentation now).
2021-06-02 09:47:51 +02:00
Marijn Suijten
170f7214eb
Regen with extended Gir.toml
2021-06-01 13:40:52 +00:00
Marijn Suijten
4f479326f3
gstreamer/gir: Document manually implemented types and functions
2021-06-01 13:40:52 +00:00
Marijn Suijten
1e58dd553c
treewide: Add missing external external types to manual
list
...
Gir now uses analyzed objects to generate documentation, and to know
exactly what is available. Additionally, this allows more bindings to
be generated.
2021-06-01 13:40:52 +00:00
Guillaume Gomez
5ba79976a9
Generate missing doc aliases for newtypes
2021-06-01 15:15:59 +02:00
Sebastian Dröge
849a524b09
element: Make caps in link_filtered() / link_pads_filtered() mandatory
...
Instead of passing `None`, the non-filtered variants of the functions
can be used.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/328
2021-05-30 17:30:22 +00:00
Sebastian Dröge
34f3e7710c
Point to the new documentation location everywhere
2021-05-29 19:00:50 +03:00
Bilal Elmoussaoui
b2083d0973
gir-files: drop broken commit & regen
2021-05-28 14:16:15 +02:00
Marijn Suijten
0f73912133
gstreamer/gir: Remove duplicate function configurations
...
Found this ambiguity in https://github.com/gtk-rs/gir/pull/1164 .
2021-05-28 13:24:49 +02:00
Marijn Suijten
eaed54e279
Update gir and regenerate with simplified trait bounds
...
Trait bounds moved from `where T: Foo` directly into the type parameter
definition at `<T: Foo>`: https://github.com/gtk-rs/gir/pull/1160 .
2021-05-27 00:02:42 +02:00
Sebastian Dröge
88c4f70195
Regenerate with latest gir
2021-05-23 16:27:57 +00:00
Guillaume Gomez
dcd0695567
Improve conversion code for enum variants
2021-05-23 13:15:27 +02:00
Guillaume Gomez
7e892b507f
Add missing doc aliases on variants
2021-05-23 13:06:57 +02:00
Marijn Suijten
540062b97c
Add missing doc aliases to manual code
...
Using the same script as [1], called with:
python3 add_doc_alias.py gstreamer*/**/src
[1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
2021-05-19 22:36:18 +02:00
Sebastian Dröge
b02f2acae5
gstreamer: Update for try_from_glib() having become an unsafe function
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/337
2021-05-19 11:47:11 +03:00
Sebastian Dröge
11a85449e7
gstreamer/uri_handler: Only assign to GError**
s if they're not NULL
2021-05-15 10:41:34 +03:00
Guillaume Gomez
6fdf35846e
Update repository URL for gtk-rs "core" crates
2021-05-12 21:21:18 +02:00
François Laignel
65fd79f973
ParamSpec: conform to glib naming for constructors
2021-05-06 21:40:19 +02:00
Marijn Suijten
e8c90c9186
gstreamer/lib: Prevent fn deinit()
docs from being stripped
2021-05-05 12:23:40 +02:00
Marijn Suijten
d50d7b4a95
Update gir and regenerate
...
This version adds a `--strip-docs` flag to `generator.py`, used in
conjunction with `--strip-docs --embed-docs` to clean documentation
first before re-embedding it (otherwise the same text would show up
multiple times). It is also used in the CI to check that no
documentation disappears on stripping, ie. all documentation is properly
annotated with `// rustdoc-stripper-ignore-next`.
2021-05-05 12:23:40 +02:00
Sebastian Dröge
aa3cc48756
Fix new 1.52 clippy warnings
2021-05-05 12:02:03 +03:00
François Laignel
5505715cc4
Manual code updates for *Return types
2021-05-04 11:33:51 +00:00
François Laignel
2364361f6b
regen: use TryFromGlib for *Return types
2021-05-04 11:33:51 +00:00
François Laignel
4b2e001f8e
Gir.toml: use TryFromGlib for *Return types
2021-05-04 11:33:51 +00:00
François Laignel
49583597ed
manual code: fix-getters-def doc aliases
2021-05-03 20:46:57 +02:00
François Laignel
01b6d342a4
regen: prop alias + connect_*_notify signal + add fn doc alias
2021-05-03 20:46:56 +02:00
François Laignel
7b0a3487c8
gstreamer/ControlSource: fix explicit getter rename
2021-05-03 20:45:26 +02:00
Marijn Suijten
1eb0c483fe
gstreamer: Fix some clippy::use_self warnings
2021-04-30 10:58:36 +02:00
Marijn Suijten
980304ce36
Replace T::type_data with Self::type_data for clippy::use_self
2021-04-30 10:02:55 +02:00
Marijn Suijten
e52e4328b3
Allow clippy::use_self on auto module
2021-04-30 10:02:47 +02:00
Marijn Suijten
10c93807fb
Replace explicit type with Self in for_value_type::<> turbofish
2021-04-30 10:02:47 +02:00
Marijn Suijten
e8f340c60a
Update gir and regenerate with clippy::use_self fixes
...
`Self` is now used in more places, shortening the code and making it
more readable at the same time.
2021-04-30 10:02:44 +02:00
Marijn Suijten
f89e840d27
Remove redundant prelude imports
...
When importing the prelude of a crate like `gst` the `glib` prelude is
provided too. Shedding these imports saves quite a few lines and
adheres to keeping it simple; we're not reexporting base/parent preludes
for no reason :)
2021-04-29 12:05:13 +02:00
Sebastian Dröge
3ad7a18792
gstreamer: Remove unused leftover ToGlib import
...
And directly call from_glib_borrow() instead of adding a use statement
for it.
2021-04-28 09:28:54 +03:00
Bilal Elmoussaoui
890cd03632
manual renames of to_glib into into_glib
2021-04-27 19:44:41 +02:00
Bilal Elmoussaoui
060a7df448
regen with renamed ToGlib into IntoGlib
2021-04-27 19:14:52 +02:00
Marijn Suijten
da156e8ce7
Update gir and regenerate without unused glib::ToValue
imports
2021-04-27 10:14:19 +02:00
Marijn Suijten
5dade6a93c
Disallow unused_imports in auto
module again
...
This was temporarily allowed by Value trait refactoring, but the root
cause of the unused imports has been found (`glib::ToValue` for property
getters) and fixed in https://github.com/gtk-rs/gir/pull/1117 .
2021-04-27 10:14:12 +02:00
Sebastian Dröge
1d59ea91c5
Clean up various imports everywhere
2021-04-26 15:16:58 +03:00
Marijn Suijten
1a07bfc710
Update gir
and regenerate without trait reexports in crate root
2021-04-26 13:24:02 +02:00
Marijn Suijten
2c40ce10ab
gstreamer,pbutils: Only import traits from prelude
...
Future changes will make all traits - both manual and auto - unavailable
from the crate root; they can then only be imported from the `prelude`.
2021-04-26 13:24:02 +02:00
Marijn Suijten
827ff99965
lib: Only export traits (Ext and ExtManual) from prelude
...
In gir it was brought up [1] that some traits (in particular
`*ExtManual`) are exported from the crate root in addition to the
prelude, cluttering the environment unnecessarily. This commit removes
all these reexports, leaving those in prelude (that were already there)
only.
After this commit everything matching `Ext(Manual)?\b` in `lib.rs` sits
within `pub mod prelude {};`.
[1]: https://github.com/gtk-rs/gir/pull/1111
2021-04-26 11:25:23 +02:00
Sebastian Dröge
5b7b39c448
gstreamer: Add CapsFeatures API using glib::Quarks instead of strings
...
The same API for Structures already exists.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/141
2021-04-26 10:54:23 +03:00
Sebastian Dröge
eda1d3d4a7
Update for Value trait refactoring
2021-04-25 14:45:08 +03:00
Sebastian Dröge
0eb5845934
Regenerate with latest gir
2021-04-25 14:45:01 +03:00
Marijn Suijten
1b2b3a75bc
Update gir with generator.py included and regenerate
...
The `gir` repository now includes `generator.py` for easier sharing of
improvements with other projects like `gtk(4)-rs`.
2021-04-24 09:39:04 +02:00
Marijn Suijten
3f508963e7
gstreamer: Remove now-unused build.rs from "normal" crates
...
The `lgpl-docs` and documentation embedding step is now solely invoked
from `./gir/generator.py` in the CI, and does not need the embed/purge
build features anymore.
2021-04-24 09:39:04 +02:00
Marijn Suijten
e62558dde4
Remove docs/
crate and references to it
...
The `lgpl-docs` crate and all precompiled (easy to get outdated!)
docmentation files are removed in favour of being generated at runtime
by the improved generator, both during local development as well as in
the CI.
2021-04-24 09:39:02 +02:00
Marijn Suijten
7ede94fec8
Replace all girs_dir with girs_directories and add gst-gir-files dir
...
The previous commit reinstantiated `girs_dir`, and this commit applies
the rename to `girs_directories` and adds the new/missing
`gst-gir-files` directory where GStreamer-specific `.gir` files live.
2021-04-23 22:01:23 +02:00
Marijn Suijten
666ea908a5
Revert "Gir.toml: Drop unused/renamed girs_dir in favour of gir -d
"
...
This reverts commit 7f9fcb09e2
.
`generator.py` is in the process of being moved to a generic place in
the `gir` repository for reuse across crates. This means `-d` cannot be
passed for our GStreamer-specific `gst-gir-files` directory anymore, and
should be configured from `Gir.toml` instead.
2021-04-23 21:59:33 +02:00
Sebastian Dröge
9d3888d294
gstreamer: Fix PromiseFuture implementation
...
We can't return a plain reference to something stored inside the future
as that would go out of scope after `await`. Instead return a struct
that wraps the `gst::Promise`, derefs to a structure and keeps the
promise alive as long as needed.
2021-04-23 11:52:02 +00:00
François Laignel
1395d773c3
manual fixes remove get prefix round 2
2021-04-20 18:18:02 +02:00
François Laignel
6ab9164dca
fix-getters-calls 0.3.0 pass
2021-04-20 18:18:02 +02:00
François Laignel
e80a29372a
fix-getters-def 0.3.0 pass
2021-04-20 18:18:02 +02:00
François Laignel
b8b944b72b
subclass: remove get prefix where applicable
2021-04-20 18:18:02 +02:00
François Laignel
f7472c82e3
regen: relaxed get fn identification
2021-04-20 18:18:02 +02:00
François Laignel
3f442d9775
prep for regen: relaxed get fn identification
2021-04-20 18:18:02 +02:00
François Laignel
172a4d47ab
regen: use type_ for glib macros
...
This also includes a new substitution for bool getters:
get_need_... -> needs_...
2021-04-20 18:18:02 +02:00
Sebastian Dröge
bf6669a9cb
gstreamer: Add TagList::remove() for removing tags
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/327
2021-04-20 10:22:14 +03:00
Marijn Suijten
9cc488db4c
gstreamer/miniobject: Make get_type function optional
...
Static typing is needed for `Value` interop, but not every type
(GLMemory in this instance) requires that.
2021-04-17 07:54:40 +00:00
François Laignel
99616ec0b4
post fix-getters manual updates
2021-04-13 17:54:40 +02:00
François Laignel
53be8e5f58
fix-getters-{def,calls} pass
2021-04-13 17:54:40 +02:00
François Laignel
08545cbefc
regen - remove get prefix for getters
2021-04-13 17:54:38 +02:00
François Laignel
d392d968f9
gir prep. for regen - remove get prefix for getters
2021-04-12 14:46:19 +02:00
Sebastian Dröge
7e7f358ba2
gstreamer/tags: Replace removed glib TypedValue with local TagValue
...
See https://github.com/gtk-rs/gtk-rs/pull/449 . This struct remains
vital in GStreamer code to tie a type to an (untyped) SendValue, so that
the underlying value can be retrieved without having to guess its type.
That type is anyway stored in a private member T::TagType.
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
2021-04-12 10:04:26 +02:00
Sebastian Dröge
a775f58753
Use glib::Error::into_raw() for passing GErrors without copying back to C
2021-04-11 10:45:56 +03:00
Sebastian Dröge
8d983066f5
gstreamer: Store ffi::GstCaps inside gst::Caps and equivalent for other miniobjects
...
Simplifies code and prepares for the next changes.
2021-04-03 17:43:50 +03:00
Sebastian Dröge
21ff418b0f
gstreamer: Store ffi::GstCapsFeatures inside gst::CapsFeatures
...
Simplifies code and prepares for the next changes.
2021-04-03 17:35:22 +03:00
Sebastian Dröge
b6f6758454
gstreamer: Store ffi::GstStructure inside gst::Structure
...
Simplifies code and prepares for the next changes.
2021-04-03 17:35:10 +03:00
Marijn Suijten
6ec0e3ac4b
Update gir and regenerate with extended gir-dirs comments
...
Gir now prints all directories and their hashes in the version file and
comments; useful now that gstreamer-rs is being generated from both
gir-files/ and gst-gir-files/ submodules.
2021-04-01 15:58:41 +02:00
Marijn Suijten
7f9fcb09e2
Gir.toml: Drop unused/renamed girs_dir in favour of gir -d
...
We were already using `gir -d` and especially now that our files are
separated across two directories that are relative to the directory
containing Gir.toml this only becomes cumbersome. Besides `gir` lacks
functionality to normalize the path, leading to ie.
gstreamer-gl/egl/sys/../../../gir-files in the version comment as a
result.
2021-04-01 15:53:23 +02:00
Marijn Suijten
a38561fbcd
Update gir and regenerate with redundant #[cfg]/#[cfg_attr] removed
...
Also ignores `clippy::upper_case_acronyms` introduced with 1.51 which
can't be adhered to in bindings.
2021-04-01 15:53:18 +02:00
Sebastian Dröge
15505cc5b8
Re-export interface ImplExt traits from the preludes
2021-03-14 14:06:30 +02:00
Sebastian Dröge
27385104d8
Update for glib interface API changes
2021-03-14 10:45:52 +02:00
Sebastian Dröge
ea239c587e
Store panic information not in a custom instance struct but in the instance data provided by the subclassing infrastructure
...
This scales better as there will only be only such data instead of two
or more when having deeper class hierarchies with multiple Rust
elements, and also makes it unnecessary to use a special instance struct
so the default works well.
2021-03-09 16:36:35 +02:00
Sebastian Dröge
6fa48890bc
Update for the subclassing glib bindings API changes
2021-03-09 16:04:32 +02:00
Sebastian Dröge
bcec97373f
gstreamer: Update to num-rational 0.4
2021-03-09 11:17:53 +02:00
Sebastian Dröge
0b61713398
gstreamer/uri_handler: Update for glib bindings API changes
2021-03-09 11:17:15 +02:00
Sebastian Dröge
a311591310
Regenerate with latest gir
2021-03-08 12:25:37 +02:00
Sebastian Dröge
0803dd411e
Update for glib subclass API cleanup
2021-03-08 12:18:24 +02:00
Sebastian Dröge
b8c20c07ce
Update for new #[glib::object_subclass] attribute macro
2021-03-07 13:08:06 +02:00
Sebastian Dröge
932b8f813d
gstreamer/pad: Add support for removing pad probes from the probe callback
...
While this allows to remove the pad probe multiple times, which would
cause a g_warning(), this is not actually making the situation worse
than before while making some code patterns easier to implement:
- Probes could already be removed twice by return
gst::PadProbeReturn::Remove and then calling pad.remove_probe()
- Probes could be removed from a different pad than where they were
added
As such let's go with the simple solution here for now and allow giving
owned access to the probe id from the probe callback.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/286
2021-02-28 19:08:59 +02:00
Sebastian Dröge
5822785191
Regenerate with latest gir
2021-02-28 18:30:54 +02:00