After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700098 - media-keys: Implement screencast shortcut
media-keys: Implement screencast shortcut
Status: RESOLVED DUPLICATE of bug 704435
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on: 696247
Blocks: 700099 700100
 
 
Reported: 2013-05-10 17:36 UTC by Florian Müllner
Modified: 2013-07-18 07:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
media-keys: Implement screencast shortcut (7.99 KB, patch)
2013-05-10 17:36 UTC, Florian Müllner
needs-work Details | Review

Description Florian Müllner 2013-05-10 17:36:52 UTC
See patch.
Comment 1 Florian Müllner 2013-05-10 17:36:54 UTC
Created attachment 243808 [details] [review]
media-keys: Implement screencast shortcut

GNOME Shell gained a DBus interface for screencasting, use it to
take over handling of the screencast shortcut from the shell.
Comment 2 Rui Matos 2013-05-11 17:32:27 UTC
Review of attachment 243808 [details] [review]:

The file name was translatable in the shell implementation. Also the file extension was configurable in a gsettings key.

Are we deprecating the whole org.gnome.shell.recorder gsettings schema? I don't really have an opinion on if we should or should not. But if we are keeping it we should honor it.

To keep it simple we could special case a 0 length file_template parameter in the DBus API implementation and use the same translated file name template and settings that the old implementation used.

::: plugins/media-keys/gsd-media-keys-manager.c
@@ +838,3 @@
+
+static void
+toggle_screencast (GsdMediaKeysManager *manager) {

'{' on its own line here. I know, JS <-> C switching :-)
Comment 3 Bastien Nocera 2013-05-13 07:49:27 UTC
(In reply to comment #2)
> Review of attachment 243808 [details] [review]:
> 
> The file name was translatable in the shell implementation. Also the file
> extension was configurable in a gsettings key.
> 
> Are we deprecating the whole org.gnome.shell.recorder gsettings schema? I don't
> really have an opinion on if we should or should not. But if we are keeping it
> we should honor it.

We can't have gnome-settings-daemon depend on gnome-shell schemas, so the keys would need to be migrated if that were the case.

> To keep it simple we could special case a 0 length file_template parameter in
> the DBus API implementation and use the same translated file name template and
> settings that the old implementation used.

That sounds like unnecessary code duplication to me, and a nightmare to debug.
Comment 4 Bastien Nocera 2013-05-13 07:54:09 UTC
Review of attachment 243808 [details] [review]:

::: plugins/media-keys/gsd-media-keys-manager.c
@@ +844,3 @@
+        g_return_if_fail (manager->priv->screencast_proxy != NULL);
+
+        if (manager->priv->recording) {

This won't work if g-s-d restarted while recording.

We also don't seem to try to monitor for the screencasting if it was stopped some other way (through the shell's tray for example?).

@@ +850,3 @@
+                method_name = "Screencast";
+                method_params = g_variant_new ("(sa{sv})",
+                                               "Screencast from %d %t.webm",

This needs to be translatable.

Also, why can't we pass a filename here? The code to find a free filename could be shared with the screenshot utilities.
Comment 5 Florian Müllner 2013-05-13 08:21:10 UTC
(In reply to comment #2)
> The file name was translatable in the shell implementation.

Good point, we need to keep doing that.


> Also the file extension was configurable in a gsettings key.

It was configurable because the gstreamer pipeline was - it's not really useful to allow setting a file extension to e.g. "mp4" while still recording vp8. So if we want to migrate the setting to g-s-d, we should migrate both keys. Personally I think it's overkill here - now that the shortcuts are not the only way to invoke the recorder, a small gnome-screencast CLI tool looks like a better way to expose recorder options - but the decision is really up to Bastien.


> Are we deprecating the whole org.gnome.shell.recorder gsettings schema? I don't
> really have an opinion on if we should or should not. But if we are keeping it
> we should honor it.

Good point, I need to remove the schema - if we want recorder settings to be configurable, it should be done on the consumer side. Having settings to change the behavior of an API (unless callers explicitly overwrite it again!) is just confusing for both developers and users ...
Comment 6 Bastien Nocera 2013-05-13 08:31:23 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > The file name was translatable in the shell implementation.
> 
> Good point, we need to keep doing that.
> 
> 
> > Also the file extension was configurable in a gsettings key.
> 
> It was configurable because the gstreamer pipeline was - it's not really useful
> to allow setting a file extension to e.g. "mp4" while still recording vp8. So
> if we want to migrate the setting to g-s-d, we should migrate both keys.
> Personally I think it's overkill here - now that the shortcuts are not the only
> way to invoke the recorder, a small gnome-screencast CLI tool looks like a
> better way to expose recorder options - but the decision is really up to
> Bastien.

We don't have configuration like this for the screenshots, so I'd rather not have it for screencasts.
Comment 7 Florian Müllner 2013-05-13 08:34:53 UTC
(In reply to comment #4)
> +        g_return_if_fail (manager->priv->screencast_proxy != NULL);
> +
> +        if (manager->priv->recording) {
> 
> This won't work if g-s-d restarted while recording.

Recordings are tied to a DBus connection, e.g. if g-s-d goes away, an ongoing recording will be stopped automatically.


> We also don't seem to try to monitor for the screencasting if it was stopped
> some other way (through the shell's tray for example?).

At least for now, there's no other way to stop a recording - I can add a signal or something in case some alternative way is added in the future, but I think it's fine to only do that when/if it becomes necessary.


> @@ +850,3 @@
> +                method_name = "Screencast";
> +                method_params = g_variant_new ("(sa{sv})",
> +                                               "Screencast from %d %t.webm",
> 
> This needs to be translatable.

Yes, fixed locally.


> Also, why can't we pass a filename here? The code to find a free filename could
> be shared with the screenshot utilities.

There's no reason we can't pass a filename, the template used in the patch is simply the one we currently use ...
Comment 8 Bastien Nocera 2013-07-18 07:49:25 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 704435 ***