Sebastian Dröge
d468e1e4a6
Clean up usage of pad probes
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1361 >
2023-10-17 08:44:06 +03:00
Sebastian Dröge
bbd3d9ffe0
Remove unnecessary mut
everywhere
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1273 >
2023-07-11 10:09:35 +03:00
Bilal Elmoussaoui
dd2d7d9215
Use re-exported once_cell
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268 >
2023-07-06 17:50:49 +03:00
Seungha Yang
3406e604cd
fallbacksrc: Don't apply fallback-audio-caps to the main audio stream
...
Intended behavior is configuring audio convert/resample elements
only for the fallback stream and also fallback-audio-caps is set.
Video and image stream are doing it as intended already.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1213 >
2023-05-17 23:49:09 +09:00
François Laignel
7ba0073052
use Pad builders for optional name definition
...
Also, apply auto-naming in the following cases
* When building from a non wildcard-named template, the name of the template is
automatically assigned to the Pad. User can override with a specific name by
calling `name()` on the `PadBuilder`.
* When building with a target and no name was provided via the above, the
GhostPad is named after the target.
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/448
Auto-naming discussion: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1255#note_1891181
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1197 >
2023-05-12 12:55:31 +02:00
Sebastian Dröge
722dba1203
fallbacksrc: Don't check caps when linking to the fallbackswitch
...
Downstream might have different caps requirements and linking might
fail. Instead of having linking fail, give upstream an opportunity to
reconfigure and otherwise have a normal negotiation error during data
flow.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/334
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1156 >
2023-04-04 10:14:06 +00:00
Sebastian Dröge
fc5ed15af5
Update for gst::Element::link_many()
and related API generalization
...
Specifically, get rid of now unneeded `&`.
2023-03-09 16:46:52 +02:00
Sebastian Dröge
2c386fb792
Update for various deprecated APIs
2023-01-22 20:07:26 +02:00
Sebastian Dröge
458b2386ed
Update for glib API changes
2023-01-21 18:13:48 +02:00
Sebastian Dröge
d44a1a4245
Fix some clippy warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1035 >
2023-01-05 12:42:47 +02:00
Sebastian Dröge
27435ad82e
Update for API changes
2023-01-05 12:33:54 +02:00
Sebastian Dröge
a8250abbf1
Fix various new clippy warnings
2022-11-01 10:27:48 +02:00
Sebastian Dröge
9a68f6e221
Move from imp.instance()
to imp.obj()
...
It's doing the same thing and is shorter.
2022-10-23 23:08:46 +03:00
François Laignel
86776be58c
Remove &
for obj
in log macros
...
This is no longer necessary.
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1137
2022-10-23 21:22:31 +02:00
Sebastian Dröge
f045099fc1
Fix GObject type names, GStreamer debug category names and element factory names
...
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-23 20:46:08 +03:00
Sebastian Dröge
f058a5e229
Various minor cleanups
2022-10-22 19:50:24 +03:00
Seungha Yang
92266cb82c
fallbacksrc: Don't configure conversion elements for normal stream
...
Internal conversion element can cause unexpected format/resolution
change depending negotiated result, which didn't happen before
the recent fallbacksrc update for fallback stream support.
Configure conversion objects only for fallback streams and also
fallback-{audio,video}-caps are specified, in order to keep
previous behavior.
2022-10-20 15:06:33 +00:00
Seungha Yang
fec404f87a
fallbacksrc: Fix for imagefreeze framerate setup
...
Put imagefreeze before capsfilter so that user specified framerate
for fallback image can be applied as expected
2022-10-20 02:08:08 +09:00
Seungha Yang
1db66e5a3b
fallbacksrc: Drop QoS event while pad is blocked
...
An element which creates QoS event might reference different
GstSegment timeline (e.g., fallback testsrc's one).
Then it can cause lots of buffers are being dropped in decoder,
because of the QoS events.
Drops the QoS event before we calculate appropriate pad offsets
from blocking pad probe.
2022-10-20 01:56:36 +09:00
Sebastian Dröge
12400b6b87
Update everything for element factory builder API changes
...
And set properties as part of object construction wherever it makes
sense.
2022-10-19 19:43:29 +03:00
Seungha Yang
953ae18f1d
fallbacksrc: Configure clocksync
...
It's missed in the previous refactoring
2022-10-18 16:27:41 +00:00
Seungha Yang
3eaf29b71f
fallbacksrc: Don't use fallback caps to normal stream
...
fallback-{audio,video}-caps should be applied only to fallback
branches
2022-10-18 16:27:41 +00:00
François Laignel
8011eadfd2
Use new format constructors
...
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1128
2022-10-18 10:36:59 +00:00
Sebastian Dröge
7ee4afacf4
Change *Impl trait methods to only take &self and not Self::Type in addition
2022-10-10 15:03:25 +03:00
Sebastian Dröge
4c57a97d4d
Update for glib::Object::new() API changes
2022-10-07 23:54:53 +03:00
Sebastian Dröge
0b13bfe9dc
fallbacksrc: Always restart the fallback stream on EOS and make sure to EOS all streams if the main stream is EOS
2022-10-05 19:13:36 +03:00
Sebastian Dröge
9719b055c5
fallbacksrc: Retry fallback stream on errors too
...
It was retrying but then nonetheless handling the error as fatal.
2022-10-04 16:31:09 +00:00
Sebastian Dröge
38753b08ac
fallbacksrc: Implement support for fallback streams
2022-09-27 12:56:15 +03:00
Sebastian Dröge
1a40186485
Update for GLib ParamSpec builder API changes
2022-09-05 11:45:47 +03:00
Thibault Saunier
31a53bba8a
Generate plugins documentation using hotdoc
...
Which will automatically be integrated in gstreamer documentation
2022-08-29 18:33:22 -04:00
Vivia Nikolaidou
5606111345
plugins: Simplify code using ParamSpecBuilder
2022-08-22 17:58:43 +03:00
Sebastian Dröge
374bb8323f
Fix build after glib SignalBuilder::param_types() API change
2022-08-17 23:37:39 +03:00
Bilal Elmoussaoui
52973d975e
Update per glib::SignalBuilder changes
2022-07-21 20:03:13 +02:00
Sebastian Dröge
cb84206457
Fix a couple of new 1.62 clippy warnings
2022-06-28 14:52:20 +03:00
Seungha Yang
4072f1df34
fallbacksrc: Add fallback-{audio,video}-caps properties
...
Add new properties so that user can specify output raw audio and/or
video format of fallback stream (output of testsrc or still image)
2022-06-03 13:18:38 +00:00
Seungha Yang
930cc41aaa
fallbacksrc: Don't forward manual flush events to downstream
...
fallbackswitch might forward flush event if it's for the currently
active pad. But forwarded flush event will be problematic in various
reasons and that's not a behavior we expected.
2022-04-12 23:21:32 +09:00
Sebastian Dröge
5788837fb6
fallbacksrc: Unflush downstream pads of the source after shutting down everything
...
Otherwise the pads might still be flushing on the next try and the
source would never recover.
2022-04-12 14:40:08 +03:00
Sebastian Dröge
7233d6936c
fallbacksrc: Remove imagefreeze if it becomes unneeded
2022-04-12 14:37:29 +03:00
Sebastian Dröge
3de317b3c9
fallbacksrc: Don't panic when shutting down the source and there are source pad blocks but no actual source pads
...
This can happen if the source removed the actual source pad already but
our downstream pad that is blocked still exists.
2022-04-11 11:01:27 +00:00
Sebastian Dröge
84402f39ef
fallbacksrc: Reset state in fallbacksrc custom source also if changing the state to READY before failed
...
Otherwise it will panic on the next try because always pads are already
linked to the ghostpads.
2022-04-11 11:01:27 +00:00
Sebastian Dröge
08379ab389
fallbacksrc: Request the main pad first from fallbackswitch
...
By default the first created pad is the active one before the
fallbackswitch is actually processing data.
2022-04-08 20:24:03 +03:00
Sebastian Dröge
d3d98c73ca
fallbacksrc: Connect to notify::active-pad
after requesting pads
...
Requesting the first pad will emit the property because the first pad is
then selected. That will cause the callback to be called, which tries to
take the same mutex that is already locked during element setup and
causes a deadlock.
2022-04-08 19:53:38 +03:00
Jan Schmidt
bd2ff494c7
fallbackswitch: Replace with priorityswitch
...
fallbackswitch now supports multiple sink pads, and on a timeout of the
active pad, it will automatically switch to the next lowest priority pad
that has data available.
fallbackswitch sink pads follow the `sink_%u` template and have
`priority` as a pad property.
Co-authored-by: Vivia Nikolaidou <vivia.nikolaidou@ltnglobal.com>
2022-04-05 18:52:31 +03:00
Sebastian Dröge
4a54001aed
fallbacksrc: Flush source before restarting on errors
...
It might still be blocked downstream for a while, e.g. in the clocksync.
Flushing does not cause any problems as fallbackswitch is not going to
forward it and will only unblock everything up to there.
2022-03-17 16:12:34 +00:00
Guillaume Desmottes
73cfb357c6
fallbackswitch: export GEnum used in properties
...
Rust applications will be able to use those directly.
2022-03-01 14:44:16 +01:00
Sebastian Dröge
b38f6cc731
Remove now unnecessary Send+Sync
impls for element/etc subclasses
...
This is now automatically implemented.
2022-02-28 18:56:58 +02:00
Seungha Yang
de2ea8a1b2
fallbacksrc: Disconnect signals on ReadyToNull
...
Otherwise multiple signal handlers will be connected to the source
2022-02-25 23:12:30 +09:00
Sebastian Dröge
a1e2debde4
fallbacksrc: Changing the URI of the video fallback is supported in NULL state
...
And not just during construction.
This fixes switching from a failing video fallback to a dummy fallback,
which was added in c7fe08bf6
.
2022-02-24 12:29:53 +02:00
François Laignel
422ea740ca
Update to gst::_log_macro_
...
See the details:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
2022-02-21 20:50:01 +01:00
Sebastian Dröge
f44b86cd30
Simplify some code around event/query views
2022-01-22 12:18:02 +02:00