screencastService: Allow for file extensions depending on encoder used
Depending on the encoder we want to use a different container format and therefore a different file extension. Right now this file extension is forced to be webm, so shuffle things around a bit to make that more dynamic. Note that this also introduces removing for the old file created by the recorder, otherwise it would create an empty "mp4" file every time it falls back from "mp4" to "webm". To be nice to external (ie. not gnome-shell) consumers of the screencastService, let's not break the API completely, and detect the ".webm" suffix a little longer to not end up with weird file.webm.webm filenames. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3211>
This commit is contained in:

committed by
Florian Müllner

parent
be3b92ec45
commit
9a0e422a6b
@ -1998,9 +1998,9 @@ export const ScreenshotUI = GObject.registerClass({
|
||||
_('Screencasts'),
|
||||
/* Translators: this is a filename used for screencast
|
||||
* recording, where "%d" and "%t" date and time, e.g.
|
||||
* "Screencast from 07-17-2013 10:00:46 PM.webm" */
|
||||
* "Screencast from 07-17-2013 10:00:46 PM" */
|
||||
/* xgettext:no-c-format */
|
||||
_('Screencast from %d %t.webm'),
|
||||
_('Screencast from %d %t'),
|
||||
]),
|
||||
{'draw-cursor': new GLib.Variant('b', drawCursor)});
|
||||
|
||||
|
Reference in New Issue
Block a user