Commit graph

278 commits

Author SHA1 Message Date
Sebastian Dröge
f417d68820 Remove usage of glib_floating_reference_guard!()
It's not needed anymore.
2019-12-07 23:05:14 +02:00
Sebastian Dröge
175863668d Regenerate everything with latest gir 2019-11-21 09:52:51 +02:00
Philippe Normand
80e01dbe3c video: Simplify VideoMeta::add_full()
The n_planes value can be infered from the offset and stride slices size, which
both need to match.

Fixes #224
2019-11-18 18:15:03 +00:00
Sebastian Dröge
8b687ab4a7 Remove header from the README.md about the move from github to gitlab
At this point everybody should've noticed.
2019-11-14 10:21:02 +00:00
Guillaume Gomez
9e30687d8e Fix glib reexports 2019-11-11 11:34:09 +01:00
Guillaume Gomez
457ac9118b Regenerate with latest gir 2019-11-11 11:34:09 +01:00
Sebastian Dröge
452ea45c1b video: Actually export is_video_overlay_prepare_window_handle_message() function 2019-10-29 19:40:32 +02:00
Sebastian Dröge
8dcf3fec20 gstreamer: Change Sample constructor to the builder pattern
Simplifies construction of Samples considerably.
2019-10-23 09:55:56 +03:00
Sebastian Dröge
2d2459ed52 Export traits from the crate level and ensure that all traits are in the preludes 2019-10-17 13:30:35 +03:00
Sebastian Dröge
132eb891ed Fix dox feature and docs.rs Cargo.toml metadata 2019-10-05 00:13:29 +03:00
Sebastian Dröge
991f2e1576 Update and regenerate everything with latest gir 2019-10-05 00:03:57 +03:00
Sebastian Dröge
06cfcd57fc Move to_string() methods into the Display trait or rename to to_str(), move from_string() into the FromStr trait
Fixes clippy warnings, prevents confusing errors and is more consistent.

The Display trait provides a to_string() method by itself and FromStr
provides from_str().
2019-10-04 11:01:55 +03:00
Sebastian Dröge
fc0fc99d1c audio/video: Fix some clippy warnings
warning: use of `unwrap_or` followed by a function call
   --> gstreamer-audio/src/subclass/audio_encoder.rs:360:18
    |
360 |                 .unwrap_or(element.proxy_getcaps(None, filter))
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | help: try this: `unwrap_or_else(|| element.proxy_getcaps(None, filter))`
2019-09-24 15:03:45 +03:00
Sebastian Dröge
79d3888c3d Update CHANGELOG.md for 0.14.5 2019-09-17 15:41:12 +03:00
Sebastian Dröge
c19c9b1d8a audio/video: Add decoder base class error macros 2019-09-15 11:44:08 +03:00
Sebastian Dröge
1348127ca8 audio/video: proxy_getcaps() can't return None and get_caps() vfuncs must not return None 2019-09-14 11:05:55 +03:00
Sebastian Dröge
bddb49443d audio/video: Use proxy_getcaps() function for default handling of getcaps() vfunc 2019-09-14 11:01:50 +03:00
Sebastian Dröge
ea95d1e479 video: Add support for VideoDecoder::drain() vfunc 2019-09-13 23:04:10 +03:00
Sebastian Dröge
8160521574 video: Add support for getcaps(), negotiate(), src/sink_query/event() vfuncs in VideoEncoder/Decoder 2019-09-13 22:59:31 +03:00
Sebastian Dröge
4c52996fc8 video: Return NotNegotiated if setting the output state fails 2019-09-13 22:59:31 +03:00
Sebastian Dröge
2d5b6de590 video: Add VideoEncoder/VideoDecoder::get_allocator() 2019-09-13 22:59:31 +03:00
Sebastian Dröge
52509b4b95 Remove subclassing feature and make it the default 2019-09-09 11:51:07 +03: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
Sebastian Dröge
f050750b5e Update CHANGELOG.md for 0.14.4 2019-08-14 22:48:16 +03:00
Sebastian Dröge
eddf4a61ff videoencoder/decoder: Add constants for the NEED_DATA custom flow returns 2019-08-14 20:22:55 +03:00
Sebastian Dröge
5c53f10135 videoencoder: Allow passing None to finish_frame() 2019-08-14 20:22:53 +03:00
Sebastian Dröge
1b860825ee Update feature flags of all dependencies to include the same version as for the crate itself
This improves build times as it allows cargo to reuse more previous
build results when building crates separately.

Also remove the serde-pickle dependency. It was only used in a single
test and caused pulling in of quite a few dependencies.
2019-08-13 16:46:08 +03:00
François Laignel
5d012945df Regen 2019-08-11 10:43:30 +02:00
Sebastian Dröge
eb59456ae3 Update CHANGELOG.md for 0.14.3 2019-07-16 12:47:15 +03:00
Sebastian Dröge
e3282c27f1 video: Generate VideoBufferFlags and add a extension trait for setting/getting them on buffers 2019-07-16 11:51:23 +03:00
Sebastian Dröge
36b0cafc5e Update CHANGELOG.md for 0.14.2 2019-07-15 20:03:48 +03:00
Sebastian Dröge
d8325212f4 Fix various clippy warnings 2019-07-11 22:02:01 +03:00
Sebastian Dröge
424a87efbf Use MaybeUninit::zeroed() everywhere possible instead of mem::zeroed() 2019-07-11 17:56:50 +03:00
Sebastian Dröge
3a8d05075d Switch everything from mem::uninitialized() to MaybeUninit or mem::zeroed()
And also fix a few cases where mem::uninitialized() was simply wrong to
use.
2019-07-11 17:56:50 +03:00
Sebastian Dröge
bde6a04780 Regenerate everything with latest gir 2019-07-10 11:21:28 +03:00
Sebastian Dröge
dcbf68e9e7 Update CHANGELOG.md for 0.14.1 2019-07-06 23:57:28 +03:00
Guillaume Desmottes
86f7a1dd9b video: VideoInfo: display format info in Debug 2019-07-03 14:32:43 +02:00
Guillaume Desmottes
71414fe052 video: implement proper Debug on VideoFormatInfo 2019-07-03 14:23:58 +02:00
Sebastian Dröge
38f3d3eff2 video-info: Use gst_video_info_set_interlaced_format() when building for 1.16 and having an interlace-mode set
This ensures that the plane information is filled correctly.
2019-06-26 12:42:33 +03:00
Sebastian Dröge
28a24a4fc0 Update versions to 0.15.0 2019-06-24 20:53:05 +03:00
Sebastian Dröge
fa6cb789cd Update CHANGELOG.md for 0.14.0 2019-06-24 20:52:03 +03:00
Sebastian Dröge
47f0940b44 Regenerate everything with latest gir 2019-06-24 20:52:03 +03:00
Guillaume Desmottes
cd16337874 video: video-info: fix Display implementations
We were calling the blanket implementation of ToString, which is using
Display, rather than our own, resulting in an infinite recursion.

Also a couple of to_string() implementation were using the wrong
glib conversion as they actually return a 'const gchar *'.
2019-06-18 17:11:24 +05:30
Guillaume Desmottes
af65497c39 video: fix VideoFormat Display implementation
We were calling the blanket implementation of ToString, which is using
Display, rather than our own, resulting in an infinite recursion.

Fix #208
2019-06-18 17:11:24 +05:30
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
c3ccec67eb video: turn VIDEO_MAX_PLANES to an usize
More convenient to use.
2019-06-18 13:30:59 +05:30
Guillaume Desmottes
840d1847a1 video: add VIDEO_MAX_PLANES constant 2019-06-18 10:57:58 +05:30
Guillaume Desmottes
491eaf3a73 video: VideoInfo: implement align() 2019-06-18 09:38:43 +05:30
Sebastian Dröge
d1e562b9f6 Explicitly add dyn keyword to trait objects
Trait objects without are deprecated with the latest nightly and this
makes it more clear that we're doing dynamic dispatch anyway.
2019-06-06 09:09:34 +03:00
Sebastian Dröge
d44c293753 Use TryFrom/TryInto traits where it makes sense instead of our previous ad-hoc solutions 2019-06-03 18:42:34 +03:00
Sebastian Dröge
e5d0afee02 video: Add pack/unpack func bindings 2019-05-28 09:26:44 +02:00
Sebastian Dröge
4798b4bcc9 video: Don't require the input buffers of the video codec frames to be writable 2019-05-25 14:13:06 +02:00
Sebastian Dröge
bc082ba56c video: Don't unref video codec state in set_format() 2019-05-25 13:02:41 +02:00
Sebastian Dröge
be9434e029 video: Add finish() virtual function for video encoder/decoder 2019-05-25 11:25:56 +02:00
Sebastian Dröge
7a0bc76668 video: Add VideoEncoder bindings
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/160
2019-05-25 10:11:06 +02:00
Vivia Nikolaidou
4a8e860a9e gstreamer-video: Expose VideoBufferPool
Closes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/12
2019-05-24 10:32:57 +00:00
Sebastian Dröge
6cef32a4dd Change various mini object references to references to the refcounted object
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/204
2019-05-24 10:04:16 +00:00
Guillaume Desmottes
c766f16403 video: add GST_BUFFER_POOL_OPTION_VIDEO_*_META constants 2019-05-23 15:10:42 +02:00
Guillaume Desmottes
47121fe9d6 gstreamer-video: VideoDecoder bindings
The VideoCodecFrame and VideoCodecState is C API is unfortunatelly unsafe
by design. So we workarounded it by ensuring the decoder stream lock was
hold while user has a writable reference on those objects.

Based on previous work from Thibault Saunier and Philippe Normand.

Fixes #161
2019-05-22 20:40:57 +00:00
Víctor Manuel Jáquez Leal
32d7f42d67 Remove unused extern crates
Latest versions of nightly rust compiler can detect unused extern
crates, and this commit removes those marked as unused.
2019-05-17 09:34:46 +00:00
Sebastian Dröge
6071c68ab6 video: Add support for VideoCaptionMeta 2019-05-16 00:35:19 +03:00
Sebastian Dröge
b2b8bfab52 Add manual implementations for various new 1.16 functions 2019-04-23 20:45:39 +03:00
Sebastian Dröge
88dcb82c8d Regenerate everything for 1.16.0 2019-04-23 19:15:53 +03:00
Sebastian Dröge
e7898c1b24 Update manual code 2019-04-15 19:19:19 +03:00
Sebastian Dröge
24305a19e8 Regenerate everything with latest gir 2019-04-15 18:38:05 +03:00
Sebastian Dröge
86a31b4139 Silence/fix various clippy warnings 2019-03-07 14:05:35 +02:00
Sebastian Dröge
8c39da4e5b Update to Rust 1.31 linter-specific attributes 2019-03-04 15:16:01 +02:00
Sebastian Dröge
490004d9c5 Remove empty lines from CHANGELOG.md as that breaks the GitLab rendering
... if it's between items in a list.
2019-02-22 17:50:59 +02:00
Sebastian Dröge
32e961d418 Update versions to 0.14.0 2019-02-22 13:04:56 +02:00
Sebastian Dröge
0f6850d6a9 Update CHANGELOG.md for 0.13.0 2019-02-22 11:55:16 +02:00
Sebastian Dröge
8754e4220e Regenerate everything with latest gir 2019-02-22 11:55:16 +02:00
Sebastian Dröge
95f6844702 Fix various minor clippy warnings 2019-02-21 19:56:23 +02:00
Sebastian Dröge
0a96e0a80b gstreamer-video: Don't take a &mut self in the constructor of VideoTimeCodeInterval 2019-02-21 19:29:47 +02:00
Sebastian Dröge
e6992345cc Add gst_video::convert_frame_async_local() without Send bound on the closure 2019-02-10 11:47:48 +02:00
Sebastian Dröge
42a8b9e505 Get rid of double-boxing for some other closures 2019-01-30 13:02:41 +00:00
Sebastian Dröge
00cbd49923 Regenerate with latest gir 2019-01-29 16:28:51 +02:00
Pete Johanson
b62e2f154d Add getters to VideColorimetry. 2019-01-27 00:21:50 +00:00
Sebastian Dröge
bd0cbe99b3 Add more Debug impls to everything possible 2019-01-22 17:46:08 +02:00
Sebastian Dröge
ad24ab9638 Regenerate everything with latest gir 2019-01-21 22:00:48 +02:00
Sebastian Dröge
3fcbf3fba4 Use default instead of default-features in Cargo.toml 2019-01-16 17:10:01 +02:00
Sebastian Dröge
bfcdec782e Switch to stable rustfmt and add skip annotations for the generated code to the lib.rs 2019-01-16 17:10:01 +02:00
Sebastian Dröge
931c485150 Update manual code for glib API changes 2019-01-16 13:52:56 +02:00
Sebastian Dröge
6da0a9d169 Regenerate everything with latest gir 2019-01-16 13:32:39 +02:00
François Laignel
226070d216 BoolError: update to new build macros
See https://github.com/gtk-rs/glib/pull/419
2019-01-04 16:02:40 +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
b9d3a5a852 video: Fix compilation with features=v1_10 2018-12-29 00:05:22 +02:00
Sebastian Dröge
89d69b0dea gstreamer-video: Remove unused use statement 2018-12-19 13:14:32 +02:00
Sebastian Dröge
86673009df video: Add support for VideoTimeCodeMeta 2018-12-17 17:40:41 +02:00
Sebastian Dröge
a753c65d33 video: Add VideoTimeCode bindings
There's a VideoTimeCode type that represents any kind of timecodes,
including invalid ones, and which allows to change each field
individually. And ValidVideoTimeCode that has all fields
validated and that can be used with most of the API.

In C, validation of the timecodes is left to the user and most functions
assert on getting passed valid timecodes.
2018-12-17 17:40:41 +02:00
Sebastian Dröge
11db200dd6 Remove some historical cruft from the README.md 2018-12-13 19:46:57 +02:00
Sebastian Dröge
654d98b269 Update README.md to mention that this also allows writing GStreamer plugins
And clarify that gst-plugins-rs only contains various plugins.
2018-12-13 19:41:07 +02:00
Sebastian Dröge
43f5a10f9c Add API for mapping GL buffers as VideoFrameRef in addition to a full VideoFrame 2018-12-08 18:59:14 +00:00
Sebastian Dröge
36bcb5630a Remove various unused use statements 2018-12-08 14:58:14 +02:00
Sebastian Dröge
6bba3d8518 Add 'static trait bound to all ExtManual traits and get rid of trait bounds for their impls 2018-12-08 14:58:14 +02:00
Sebastian Dröge
5c93e134a7 Regenerate everything with new version of gir 2018-12-08 14:58:14 +02:00
Sebastian Dröge
e7b4bafa60 Ignore false clippy warning about casting and pointer alignment in videometa
error: casting from `*mut ffi::GstVideoOverlayComposition` to a more-strictly-aligned pointer (`*mut gst_ffi::GstMiniObject`)
   --> gstreamer-video/src/video_meta.rs:158:44
    |
158 |             gst_ffi::gst_mini_object_unref(self.0.overlay as *mut _);
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: #[deny(clippy::cast_ptr_alignment)] on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment

error: casting from `*mut ffi::GstVideoOverlayComposition` to a more-strictly-aligned pointer (`*mut gst_ffi::GstMiniObject`)
   --> gstreamer-video/src/video_meta.rs:159:59
    |
159 |             self.0.overlay = gst_ffi::gst_mini_object_ref(overlay.as_mut_ptr() as *mut _) as *mut _;
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment
2018-12-04 10:51:50 +02:00
Sebastian Dröge
12c3d1e911 Update CHANGELOG.md for 0.12.2 2018-11-26 16:16:57 +01:00
Sebastian Dröge
8c9d1abe9d Remove GitLab badge
It only works for gitlab.com currently
2018-11-26 16:16:26 +01:00