Sebastian Dröge
003554876c
Update various APIs to use glib::GStr
...
Currently only covers what is needed to keep code compiling, plus
everything caps/structure/tags related.
This avoids unnecessary heap allocations for adding the NUL-terminator
of C strings, and especially makes caps/structure handling as efficient
as in C.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1190 >
2023-01-15 21:05:57 +02:00
Sebastian Dröge
ea136515cf
Regenerate with latest gir
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1190 >
2023-01-15 20:17:11 +02:00
Sebastian Dröge
6152dd7e3b
Update gir
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1190 >
2023-01-15 20:17:10 +02:00
Sebastian Dröge
aa23ddbbdb
gstreamer: Simplify element subclass panic catching functions
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1188 >
2023-01-14 17:13:53 +02:00
Sebastian Dröge
37bfb78fdc
Change some assertions to debug assertions
...
These assertions can only trigger because of bugs in the bindings
implementation or in the C code and not because of bugs in calling code,
so using debug assertions is perfectly fine for them and reduces the
number of assertions inlined everywhere in release builds.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1188 >
2023-01-14 17:13:46 +02:00
Sebastian Dröge
f235dc987d
Inline various trivial functions
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1177 >
2023-01-11 11:33:54 +02:00
Sebastian Dröge
0fccb73eb6
gstreamer: Remove unnecessary cast in gst::element_imp_error!
and others
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1187 >
2023-01-11 09:06:38 +00:00
Sebastian Dröge
608cae3703
gstreamer: Register only a single type instead of per return value for the gst::Iterator::filter()
GValue
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1187 >
2023-01-11 09:06:38 +00:00
Sebastian Dröge
f07727ee6d
Use uninitialized stack memory for out parameters instead of zeroed memory if applicable
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1187 >
2023-01-11 09:06:38 +00:00
Sebastian Dröge
1b022a6b7c
Get rid of unnecessary option wrapping
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1187 >
2023-01-11 09:06:38 +00:00
Christian Meissl
da2eb50dd3
gstreamer-video: implement VideoBufferPoolConfig for BufferPoolConfigRef
...
implementing VideoBufferPoolConfig for BufferPoolConfigRef
instead of BufferPoolConfig allows to retrieve the VideoAlignment
from within buffer pool set_config
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1185 >
2023-01-08 19:15:46 +01:00
Sebastian Dröge
84720eee66
gstreamer: Use Value::from_type_unchecked()
where applicable
...
Gets rid of some unnecessary assertions.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184 >
2023-01-06 10:41:55 +02:00
Sebastian Dröge
89326c7e7c
Compile out GStreamer version checks if a high enough version is configured at build time
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184 >
2023-01-06 10:41:55 +02:00
Sebastian Dröge
277d63601c
gstreamer: Return glib::GString
for the error/warning/info message debug string
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184 >
2023-01-06 10:41:55 +02:00
Sebastian Dröge
ba1d8c5ce6
gstreamer: Move initialization panic into a separate function
...
This keeps the number of duplicated panics all over the codebase lower
and reduces generated code size.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184 >
2023-01-05 21:33:14 +02:00
Sebastian Dröge
7b279b9d6c
gstreamer-app: Assert that GStreamer is initialized before creating instances
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184 >
2023-01-05 21:33:14 +02:00
Sebastian Dröge
8d30bcbf4b
Use IntoGlibPtr
trait instead of to_glib_full()
where appropriate to reduce unnecessary refcounting/copying
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183 >
2023-01-05 12:09:57 +02:00
Sebastian Dröge
5e852fa0ff
gstreamer-video: Autogenerate part of the VideoDecoder
subframe API
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183 >
2023-01-05 12:09:57 +02:00
Sebastian Dröge
315704fe67
gstreamer-check: Simplify borrowing of sink/src harnesses
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183 >
2023-01-05 12:09:57 +02:00
Sebastian Dröge
1e793f3b65
gstreamer: Return some values by reference instead
...
Less refcounting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183 >
2023-01-05 12:09:57 +02:00
Sebastian Dröge
32a608b76b
examples: Fix for API changes
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:26:07 +02:00
Sebastian Dröge
b94bfe1613
gstreamer: Remove useless GstPluginExtManual
trait
...
`Plugin` is a final type.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:25:17 +02:00
Sebastian Dröge
a028e807df
gstreamer: Autogenerate some more API
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:25:17 +02:00
Sebastian Dröge
7490846309
Fix compilation due to changes in autogenerated code
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:25:17 +02:00
Sebastian Dröge
567ce0a3bf
Group and merge imports in all manual code
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:25:17 +02:00
Sebastian Dröge
45c145ad50
Regenerate with latest gir
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:25:17 +02:00
Sebastian Dröge
dce54ee237
Update gir
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:22:39 +02:00
Sebastian Dröge
0e51e70c5a
Update GStreamer gir files
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182 >
2023-01-04 13:22:39 +02:00
Sebastian Dröge
6ff5f89832
gstreamer: Fix memory leak in buffer pool subclassing test
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180 >
2023-01-03 10:41:35 +00:00
Sebastian Dröge
0ed3d95c60
gstreamer: Use glib::StrV
internally instead of a custom version of it
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180 >
2023-01-03 10:41:35 +00:00
Sebastian Dröge
81bcf5c8dd
gstreamer-video: Implement VideoTimeCode
via glib::wrapper!
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180 >
2023-01-03 10:41:35 +00:00
Sebastian Dröge
30838b6549
gstreamer-video: Implement VideoTimeCodeInterval
via glib::wrapper!
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180 >
2023-01-03 10:41:35 +00:00
Sebastian Dröge
cbd3035a5b
gstreamer: Implement gst::Segment
via glib::wrapper!
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180 >
2023-01-03 10:41:35 +00:00
Sebastian Dröge
8ed150c853
gstreamer: Add missing doc alias
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180 >
2023-01-03 10:41:35 +00:00
Sebastian Dröge
ae688406f8
gstreamer: Allocate debug messages up to 256 bytes on the stack and only then spill over into the heap
...
With this, debug logging from Rust is completely allocation-less for
short messages and string literals.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1179 >
2023-01-03 10:28:43 +00:00
Sebastian Dröge
06a0dbacba
gstreamer: Don't inline debug logging function
...
It's relatively big and increases code size and stack usage quite a bit,
and having a function call for logging is not going to make much of a
difference as it happens *after* filtering for the debug level
threshold.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1179 >
2023-01-03 10:28:43 +00:00
Sebastian Dröge
036a020b62
gstreamer: Optimize various from/to Vec
FFI translation functions
...
Use memcpys if possible instead of manual loops, and directly write into
the `Vec` memory and set the length afterwards to avoid having the
reallocate logic at every step.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1181 >
2023-01-03 12:06:29 +02:00
Sebastian Dröge
882513d33a
Make use of the new TransparentType
/ TransparentPtrType
traits
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1178 >
2023-01-02 19:07:24 +02:00
Jordan Petridis
aeca82c095
ci: Update examples features on windows
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1089 >
2022-12-28 14:37:24 +02:00
Seungha Yang
b4d3bf297e
examples: Add d3d11videosink example with Direct2D/DirectWrite interop
...
Demonstartes the use of d3d11videosink's present signal
introduced in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2923
with Direct2D/DirectWrite API interop using the windows crate.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1089 >
2022-12-28 11:20:51 +00:00
Sebastian Dröge
e6e5d25e48
Update CHANGELOG.md for 0.19.5
2022-12-27 12:53:30 +02:00
Jordan Petridis
e9ecdcdd72
ci/windows: Update base image
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1175 >
2022-12-26 16:17:19 +02:00
Sebastian Dröge
3d0f563111
Update minimum supported Rust version to 1.64
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1175 >
2022-12-25 14:54:38 +02:00
Jordan Petridis
141a71d69e
ci: Avoid building examples with --all-features
...
--all-features ends up enabling the windows and trying to compile
the d3d example, which can't be built on linux.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1175 >
2022-12-25 13:25:30 +02:00
Jordan Petridis
dfc6344f59
ci: move tests scripts to individual files
...
Instead of inling bash scripts in yaml
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1175 >
2022-12-25 13:25:30 +02:00
Sebastian Dröge
146b4fc08e
gstreamer: Fix glib::GStr
API changes
2022-12-25 00:25:42 +02:00
Sebastian Dröge
cdc7aa4846
gstreamer: Allow returning Handled
from BufferList
pad probes
...
This is handled exactly the same way as buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1174 >
2022-12-23 12:21:18 +00:00
Sebastian Dröge
dcfea9c35a
gl: Reset video frame size/stride/offset to 0 for GL mapped frames
...
The memory pointers are actually the GL texture IDs, and accessing them
like raw video memory will read random memory areas.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1173 >
2022-12-22 19:25:54 +00:00
Sebastian Dröge
d6cc452cf3
Use PhantomData
as Stash::Storage
if nothing has to be stored except for a lifetime
...
This reduces the size of all stashes from two pointers to one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1171 >
2022-12-20 17:07:39 +00:00
Sebastian Dröge
f166e80a79
gstreamer: Only use a single temporary Vec
for [T]::to_glib_none()
for miniobjects
...
The value itself is already kept alive via the stash and we only need a
temporary `Vec` to be able to append the terminating `NULL` pointer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1171 >
2022-12-20 17:07:39 +00:00