Commit graph

35 commits

Author SHA1 Message Date
Sebastian Dröge f24b38470b Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1203>
2023-01-25 10:18:33 +02:00
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 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 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 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
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 1ee4845544 video: Remove gst_video_format_info_get_tile_sizes() bindings and bind new VideoTileInfo API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1153>
2022-11-21 13:29:38 +02:00
Sebastian Dröge b50a7993de video: Add bindings for VideoFormatInfo::tile_sizes() 2022-05-03 15:41:54 +03:00
Sebastian Dröge eed648831d video: Add various VideoFormatInfo/VideoInfo/VideoFrame helper API 2022-04-04 15:50:09 +03:00
Sebastian Dröge 3fbe37a2ec video: Add VideoFormatInfo::extrapolate_stride() 2022-03-17 18:05:13 +02:00
Sebastian Dröge faa1311fcd video: Add VideoFormatInfo::has_subtiles() 2022-03-17 11:06:26 +02:00
Sebastian Dröge c2a2549b66 video: Automatically derive Copy/Clone for more structs 2021-09-25 14:32:43 +03:00
Sebastian Dröge b1afc4804a Fix various needless-borrow clippy warnings 2021-07-30 13:19:24 +03:00
Guillaume Gomez 5ba79976a9 Generate missing doc aliases for newtypes 2021-06-01 15:15:59 +02:00
Marijn Suijten 579ac6c4e4 video: Implement gst_video_color_range_offsets for Video(Format)Info 2021-04-30 16:48:31 +02:00
Marijn Suijten 28cf8434d0 video: Fix all clippy::use_self warnings 2021-04-30 10:58:35 +02:00
Bilal Elmoussaoui 890cd03632 manual renames of to_glib into into_glib 2021-04-27 19:44:41 +02:00
Guillaume Gomez ff5a36561a Fix license header situation 2020-12-15 11:53:31 +01:00
Guillaume Gomez fb56af8d84 Update from_glib calls and put them in unsafe blocks 2020-12-08 15:50:15 +01:00
Marijn Suijten d9769aeb6a audio/video: Add missing FromGlibPtrNone<*const> for FormatInfo 2020-12-07 12:09:39 +01:00
Marijn Suijten 0763d2645d video: Reuse Self::Err in from_str 2020-12-07 12:09:39 +01:00
Marijn Suijten 2447664df6 Replace Result<(), fmt::Error> with fmt::Result 2020-12-07 12:09:39 +01:00
Sebastian Dröge d31badf9ac gstreamer-video: Update manual code to 2018 edition 2020-11-22 19:15:20 +02:00
Guillaume Desmottes ae57524502 video: manually order VideoFormat and VideoFormatInfo 2020-06-09 09:26:32 +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 ea367bac14 Fix or ignore various clippy warnings
And ignore some common warnings we don't care about in general, while
also making clippy errors fail the build.
2019-09-07 19:39:19 +03:00
Guillaume Desmottes 71414fe052 video: implement proper Debug on VideoFormatInfo 2019-07-03 14:23:58 +02:00
Sebastian Dröge e5d0afee02 video: Add pack/unpack func bindings 2019-05-28 09:26:44 +02:00
Sebastian Dröge e7898c1b24 Update manual code 2019-04-15 19:19:19 +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 a0ba290d4d Fix various clippy warnings in gstreamer-video 2017-09-10 15:21:26 +03:00
Sebastian Dröge 380fb319ba Don't return &'static references from functions but give them a generic lifetime
https://github.com/rust-lang/rust/pull/42417#issue-233404573
2017-09-01 11:40:32 +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 3a50ca61e3 Add initial libgstvideo bindings
Only VideoFormat and VideoFormatInfo and related API for now.

https://github.com/sdroege/gstreamer-rs/issues/5
2017-08-11 00:41:55 +03:00