-
https://gitlab.gnome.org/snippets/19#L108
type:2 for windows type:3 for monitors and windows
multiple
to allow more than one selection -
@jadahl Thanks for this, I've created a similar snippet for screen-shots based on this in https://gitlab.gnome.org/snippets/814
-
Could this be updated for more recent versions of
python3-gi
? Or at least inform which version-range it would work with?Ref:
[2021-01-22 14:56:40] 0 x10an14@machine:~ -> $ python3 Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import gi >>> gi.repository Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'gi' has no attribute 'repository' >>> gi.Repository <class 'gi.Repository'> >>> from gi.Repository import GLib Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'gi.Repository' >>> gi.version_info (3, 36, 0) >>>
-
Could this be updated for more recent versions of
python3-gi
?Hmm,
>>> import gi >>> gi.version_info (3, 38, 0) >>> gi.repository Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'gi' has no attribute 'repository' >>> gi.Repository <class 'gi.Repository'>
but the script still works.
FWIW, I removed the deprecated
GObject.threads_init()
so that warning should no longer occur. -
@jadahl Hello. Thanks for this code. How can I record in MP4 with sound? The examples I've used before with ximagesrc don't work ...
-
@amikha1lov you need to set up your own gstreamer pipeline that combines some audio source with the pipewire stream; it's more of a gstreamer question.
-
Hi, thanks for the snippet! However, when I tried to connect
screen_cast_call(portal.CreateSession, on_create_session_response, options={ 'session_handle_token': session_token })
to a button, in the second press of the button (after ending the first pipewire stream), it gives this errorFailed to create session: 2
. I assume that it has something to do that it can only have one successful request per session?
Please register or sign in to comment