Commit graph

1140 commits

Author SHA1 Message Date
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
d2930aed0b Regenerate everything with latest gir-files 2019-10-05 00:02:07 +03:00
Sebastian Dröge
419dfd7e28 Update gir-files from GStreamer 1.16.1 release 2019-10-04 23:59:49 +03:00
Sebastian Dröge
7ab4e8dafd examples: Update gl_generator dependency to 0.14 2019-10-04 09:30:51 +00:00
Fernando Jimenez Moreno
591468f53b gstreamer/log: Use non-panicking UTF8 conversion in log handler
Make sure that `log_handler` and `DebugMessage::get` do not panic while
processing non-UTF8 characters by using lossy instead of strict UTF8
string conversion.
2019-10-04 09:03:28 +00:00
Sebastian Dröge
107ae588f2 examples: Fix various clippy warnings 2019-10-04 11:01:55 +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
861f5c1e1a Re-run cargo fmt
Minor changes in the latest version.
2019-10-04 08:19:24 +03:00
Sebastian Dröge
19b3427909 clock: Move wake_id() from ClockId to ClockImpl
This shouldn't really be called on anything outside a Clock
implementation.
2019-09-26 11:25:52 +03:00
Sebastian Dröge
6abb0d3506 gstreamer: Add support for subclassing gst::SystemClock 2019-09-25 17:22:15 +03:00
Sebastian Dröge
bacf4998ce clock: Add some more ClockId API for being able to implement clock subclasses 2019-09-25 17:22:15 +03:00
Sebastian Dröge
4e60a0aea4 clock: Add support for setting/getting/unsetting clock flags 2019-09-25 17:22:15 +03:00
Sebastian Dröge
1faf41986b gstreamer: Add bindings for ClockEntryType and ClockFlags 2019-09-25 17:22:15 +03:00
Sebastian Dröge
1c8b2c671b gstreamer: Add support for subclassing gst::Clock 2019-09-25 17:22:15 +03:00
Sebastian Dröge
74b05f0272 gstreamer: Add support for implementing gst::TagSetter interface 2019-09-25 17:22:11 +03:00
Sebastian Dröge
eda3539330 gstreamer: Add support for implementing gst::Preset interface 2019-09-25 16:11:54 +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
Jan Alexander Steffens (heftig)
29710d9970 gstreamer: Assert that FromValueOptional works as expected
Fails without the preceding patch.
2019-09-24 10:34:44 +00:00
Jan Alexander Steffens (heftig)
dca2cc1c5d gstreamer: Remove bad asserts in two impl FromValueOptional
These prevented actually getting a None out of a Value which contains a
NULL.
2019-09-24 10:34:44 +00:00
Jan Alexander Steffens (heftig)
eaacee49de
iterator: Simplify StdIterator a bit 2019-09-24 11:31:28 +02:00
Sebastian Dröge
79d3888c3d Update CHANGELOG.md for 0.14.5 2019-09-17 15:41:12 +03:00
Sebastian Dröge
0cfe6c58a6 Minor cleanup to gitlab-ci.yml
Don't special-case the features of gstreamer-base and gstreamer-video
anymore, they have the same as most other crates now.
2019-09-17 11:05:57 +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
b238d07db0 audio: Add support for subclassing AudioEncoder and AudioDecoder
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/159
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/158
2019-09-14 09:00:52 +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
Fernando Jimenez Moreno
de7a9dee1e Fix Windows build 2019-09-13 09:55:32 +02:00
Sebastian Dröge
7868018abb gstreamer/element: Add support for ElementClass::add_metadata() 2019-09-12 10:18:23 +03:00
Sebastian Dröge
6dcd255815 gstreamer/deviceprovider: Add support for subclassing gst::DeviceProvider 2019-09-12 10:18:23 +03:00
Sebastian Dröge
9df56faf48 gstreamer/device: Add support for creating gst::Device subclasses 2019-09-11 22:46:15 +03:00
Sebastian Dröge
8208ee0891 gstreamer/device: Device::create_element() is transfer floating, not transfer full
See https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/444
2019-09-11 22:41:59 +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
Jan Alexander Steffens (heftig)
105412b5a0
Iterator: Test that Iterator can be used in a for loop
`for x in foo` depends on foo implementing IntoIterator.
2019-09-05 11:01:16 +02:00
Jan Alexander Steffens (heftig)
7a12c4d5e1
Iterator: Replace ad-hoc fn iter with impl IntoIterator
std has a trait for converting things into Iterators. Make use of it.
2019-09-05 10:33:54 +02:00
Jan Alexander Steffens (heftig)
a30935ad1f
Iterator: Add a wrapper implementing std's Iterator
Transposing the item type lets us be a std-compatible Iterator.

The iterator is automatically resynced when resuming iteration after
yielding Resync. This lets some combinators like `collect` and `find`
work properly.
2019-09-04 14:34:05 +02:00
Jan Alexander Steffens (heftig)
db61ec4a6b
Iterator: Manually implement Debug
The derived implementation is restricted to `where T: Debug`, but the
iterator doesn't actually contain a value of type T.
2019-09-04 14:34:04 +02:00
Jan Alexander Steffens (heftig)
8db9926107
log_handler test: Ignore unknown categories
Tests run parallel in multiple threads. This makes the log_handler test
flaky because it may see log messages triggered by other threads. Make
the handler ignore all messages not in the category we care about.
2019-09-04 14:02:55 +02:00
Vivia Nikolaidou
6488c42890 element: Added num_pads, num_src_pads, num_sink_pads
Exposing the corresponding struct element in GstElement
2019-09-03 17:14:47 +03:00
François Laignel
8af1da1a4e Fully qualify inner macros for exported macros...
... otherwise they can't be resolved in dependent crates compiled
for edition 2018.
2019-09-02 09:06:29 +00:00
Mathieu Duponchelle
d3d503cea6 subclass/element: expose set_clock and provide_clock vmethods 2019-08-31 02:05:21 +02:00
François Laignel
1367becfaf DateTime: manual impl for PartialOrd, PartialEq and Debug
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/217
2019-08-21 12:34:15 +02:00
François Laignel
f80abb0ba9 Exclude gir from workspace so that we can run it 2019-08-19 18:46:49 +02:00
François Laignel
ced522ed08 Implement ser / de for Date Values, Structure fields and Tags 2019-08-19 15:51:42 +02:00
François Laignel
c74eef374a Fix serde for Values with optional Types
Attention: these changes induce breaking changes for the serde
representation of some types.

Serialization of `Value`s used to rely on the `get` function
followed by an `unwrap`. This means that optional types couldn't
be serialized when they were `None`.

This commit distinguishes between the optional `Value` `Types` and
the ones that always return some value.

The `Value`s, `Structure` fields and `Tag`s with following types are
now represented as `Option`s:

- `Buffer`
- `DateTime`
- `Sample` (note: this type is used for `Tag` images)
- `String` (except for `Tag`s - see the comment in `tags_serde.rs`).

The representations for these `Type`s remain unchanged when they are
used in-place (not as part of a `Value`).

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/215
2019-08-19 15:34:24 +02:00