Sebastian Dröge
dbf6d1fd1a
gstreamer/promise: Return a borrowed StructureRef for the reply from the Future
...
Prevents an usually unneeded copy of the structure.
2020-05-27 14:48:48 +03:00
Sebastian Dröge
9d851bfc48
gstreamer/promise: Allow resolving the Promise with None and handle None explicitly in the change function
...
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1300
2020-05-27 13:55:51 +03:00
Sebastian Dröge
7086a754be
Add various glib::Value trait impls for borrowed versions of types
...
For SDPMessageRef, StructureRef and CapsFeatureRef this involves the
conversion from and to a glib::Value. Specifically this means that e.g.
a StructureRef can be retrieved from a glib::Value via borrowing, i.e.
without creating a copy of the structure first.
For all mini objects only retrieval from a glib::Value is implemented as
the other direction would allow to get multiple immutable references
from a mutable reference without borrowing, which is not allowed and
would make it possible to observe a mini object changing while having an
immutable reference to it.
2020-05-27 13:17:54 +03:00
Sebastian Dröge
0b3bfa7ea2
gstreamer/promise: Convert None promise replies to an empty structure in the change_func
...
webrtcbin likes to put a NULL structure into the reply under some
circumstances when the promise successfully resolved.
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1300
for details.
2020-05-27 12:24:11 +03:00
Sebastian Dröge
dfdf01b868
gstreamer/datetime_serde: Use glib::BoolError instead of a &'static str as TryFrom error type
2020-05-26 19:26:35 +03:00
Sebastian Dröge
d417656707
Use thiserror more widely for deriving Error/Display impls of error types
2020-05-26 19:26:35 +03:00
Sebastian Dröge
1b7e99938f
gstreamer/event: Add setter/getter for the gst::Stream in the stream-start event
2020-05-17 13:38:45 +03:00
Sebastian Dröge
4097c15c96
Don't include LGPL docs in the docs if both embed-lgpl-docs and purge-lgpl-docs features are selected
...
This makes usage of RLS/rust-analyzer on the repository much faster and
less annoying as the docs don't have to be included and removed on every
change.
2020-05-14 10:44:58 +03:00
Sebastian Dröge
93bc5c9324
gstreamer/gstreamer-app: Don't store strong references in futures Stream/Sink adapters
...
This applies to the ones of the appsink, appsrc and bus. If we would
store a strong reference then they would keep alive the underlying
object forever even if their pipeline disappeared in the meantime.
Like this e.g. the bus stream would start returning None once the bus
was destroyed, similar to how other channels are working in Rust.
2020-05-13 22:13:11 +03:00
Sebastian Dröge
3f495ce1da
gstreamer/plugin: Register plugins with the correct minor version when building for 1.18
2020-05-08 14:32:50 +03:00
Sebastian Dröge
781c5785b1
Regenerate
2020-05-05 17:29:14 +00:00
Vivia Nikolaidou
ec4a43be89
Regenerate
2020-05-03 16:48:35 +03:00
Vivia Nikolaidou
e986119df6
Update Cargo.toml to 1.18
2020-05-03 16:48:35 +03:00
Vivia Nikolaidou
3ac7631ea0
gstreamer/bin: Implement iterate_all_by_element_factory_name manually
2020-05-03 16:48:35 +03:00
Sebastian Dröge
3192d74389
Update CHANGELOG.md for 0.15.5
2020-05-03 10:17:18 +03:00
Vivia Nikolaidou
118c7d4ad9
Regenerate
2020-04-30 17:16:23 +03:00
Jan Alexander Steffens (heftig)
1d2609d448
gstreamer: Return any lifetime instead of 'static
...
Following https://github.com/gtk-rs/glib/pull/633
2020-04-30 09:50:00 +02:00
Guillaume Desmottes
a6c20922ff
update documentation links
2020-04-28 11:17:24 +02:00
Sebastian Dröge
6e431ce060
Run everything through rustfmt again
...
It got some improvements for applying consistent formatting to code
blocks in macros.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/468 >
2020-04-24 12:46:16 +03:00
Sebastian Dröge
834b6d8d69
gstreamer/proxypad: Convert default pad functions to plain functions on ProxyPad instead of a trait
...
This allows to use them properly when overriding these functions.
2020-04-23 15:37:18 +03:00
Guillaume Desmottes
6a72f65b3b
gstreamer: ignore cognitive_complexity warnings
...
Those are just long tests.
2020-04-21 10:17:46 +02:00
Guillaume Desmottes
a12b51abd6
gstreamer: stream_collection: ignore new_ret_no_self clippy warning
2020-04-21 09:00:35 +02:00
Guillaume Desmottes
872024c372
fix option_as_ref_deref clippy warnings
2020-04-21 09:00:35 +02:00
Guillaume Desmottes
932c940102
gstreamer: caps: add new_from_iter(_with_features)()
2020-04-20 17:12:24 +02:00
Guillaume Desmottes
97026d7f86
gstreamer: structure: add new_from_iter()
...
Allow to easily create a new Structure from an iterator.
Fix #250
2020-04-20 15:53:28 +02:00
Sebastian Dröge
caae679d6f
gstreamer: Add some API to calculate the next state convert state changes into their component states and back
2020-04-18 09:23:08 +03:00
Sebastian Dröge
ada06502b5
gstreamer: Remove redundant stream/stream collection property getters
...
There are also actual functions for these and we had both enabled
because the properties are missing the "Since: 1.10" markers.
2020-04-15 14:40:37 +03:00
Sebastian Dröge
aea43c428c
gstreamer: Add Stream::debug() and StreamCollection::debug()
...
These provide more helpful debug output than just the pointer when
printing.
2020-04-14 17:31:54 +00:00
Sebastian Dröge
2ef7d70ba3
gstreamer: Enforce that stream collections are immutable after creation by using the builder pattern
2020-04-14 17:31:54 +00:00
Sebastian Dröge
185eb188ca
Fix various signal handler trampoline usages
2020-04-13 19:24:04 +03:00
Sebastian Dröge
5021994237
Regenerate everything
2020-04-13 19:11:33 +03:00
Sebastian Dröge
76a0410d41
Replace unneeded transmute calls with a safer alternative
2020-04-12 19:47:49 +03:00
Sebastian Dröge
d1665b8114
Regenerate with latest gir
2020-04-12 18:55:06 +03:00
Guillaume Gomez
1ef3bf52d2
gstreamer: Add missing init calls in tests
2020-04-12 17:25:54 +03:00
Guillaume Gomez
c07fe14191
gstreamer*: Add missing init checks
2020-04-12 17:25:54 +03:00
Sebastian Dröge
62e9af58c6
Fix some clippy warnings
2020-04-11 21:18:18 +03:00
Sebastian Dröge
d7ed8d1e35
gstreamer: Add Element::get_current_clock_time() and ::get_current_running_time()
...
This was added in GStreamer 1.18 but we can easily implement it
ourselves here for the time being and for older versions.
2020-04-11 21:12:03 +03:00
Sebastian Dröge
94ace06883
Remove deprecated std::error::Error::description() impls
2020-04-11 19:39:04 +03:00
Sebastian Dröge
d05f8cace8
gstreamer: Add bindings for Plugin::get_plugin_name()
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/248
2020-04-11 19:33:34 +03:00
Sebastian Dröge
62c0f5ef42
Use mem::ManuallyDrop instead of mem::forget() everywhere
...
It makes the intentions clearer and potentially results in simpler
assembly, at least in debug builds.
2020-04-09 16:57:06 +03:00
Sebastian Dröge
9f96c5e573
gstreamer/buffer: Unmap memory in flush() of the Write impl of the buffer cursor
...
This makes sure that any remaining data is actually written out as part
of the unmapping, which might be necessary depending on the memory type.
2020-04-07 13:47:04 +03:00
Sebastian Dröge
2fbb10ec92
gstreamer/buffer: Only unmap memory in buffer cursor seek impl if we have to move to a different memory
...
Prevents some unnecessary unmaps.
2020-04-07 13:45:36 +03:00
Sebastian Dröge
35f7c910a9
gstreamer/buffer: Refactor buffer cursor implementation with macros to reduce code duplication
2020-04-07 13:45:36 +03:00
Sebastian Dröge
42d09c2834
gstreamer/buffer: Move BufferCursor/BufferRefCursor into its own module
...
It's quite a bit of code and can be kept nicely separate.
2020-04-07 12:59:24 +03:00
Sebastian Dröge
5fc68e252d
gstreamer: Add missing BufferCursorRef re-export
2020-04-06 21:00:42 +03:00
Sebastian Dröge
ee3a8caa7d
gstreamer/buffer: Add various tests for the BufferCursor / BufferCursorRef
2020-04-06 20:15:51 +03:00
Sebastian Dröge
a884a419db
gstreamer/buffer: Add a BufferCursor / BufferCursorRef helper structs
...
This implements Read/Seek or Write/Seek and allows to read/write/seek
into the buffer without merging the memories inside.
The writer also only maps the memory write-only as compared to all other
ways of accessing the buffer/memory data in a writable way, which have
to map it read-write.
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/425
for a similar API proposal for GStreamer core.
2020-04-06 20:15:35 +03:00
Sebastian Dröge
9b782b4dfa
gstreamer/buffer: Add tests for various memory related buffer API
2020-04-06 19:29:19 +03:00
Sebastian Dröge
9e0c980a49
gstreamer/buffer: Add iterators for iterating over the memories inside a buffer
...
With immutable, mutable and owned variant.
2020-04-06 19:28:28 +03:00
Sebastian Dröge
2b70db3a9e
gstreamer/buffer: Add BufferRef::peek_memory_mut() function
...
This gives a mutable reference to the given memory and fails if the
memory is not actually writable.
2020-04-06 19:27:40 +03:00