[gnome] Update extensions
This commit is contained in:
@ -33,7 +33,7 @@ var debugEnabled = false;
|
||||
/**
|
||||
* @param {boolean} d Enable/Disable debug logging
|
||||
*/
|
||||
function setDebugEnabled(d) {
|
||||
export function setDebugEnabled(d) {
|
||||
debugEnabled = d;
|
||||
}
|
||||
|
||||
@ -41,9 +41,9 @@ function setDebugEnabled(d) {
|
||||
* @param {string} msg the message to log
|
||||
* @class
|
||||
*/
|
||||
function TalkativeLog(msg) {
|
||||
export function TalkativeLog(msg) {
|
||||
if (debugEnabled)
|
||||
log(`[ESC]${msg}`);
|
||||
console.log(`[ESC]${msg}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,8 +53,8 @@ function TalkativeLog(msg) {
|
||||
*
|
||||
* @returns {string} the version
|
||||
*/
|
||||
function getFullVersion() {
|
||||
return '1.9.0'; // FULL_VERSION
|
||||
export function getFullVersion() {
|
||||
return '1.10.0'; // FULL_VERSION
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@ function getFullVersion() {
|
||||
* @param {string} name filename of the image
|
||||
* @returns {Gio.FileIcon} the icon
|
||||
*/
|
||||
function loadIcon(extensionDir, name) {
|
||||
export function loadIcon(extensionDir, name) {
|
||||
return new Gio.FileIcon({
|
||||
file: Gio.File.new_for_path(
|
||||
getImagePath(extensionDir, name)
|
||||
@ -79,8 +79,6 @@ function loadIcon(extensionDir, name) {
|
||||
* @param {string} name filename of the image
|
||||
* @returns {string} the path
|
||||
*/
|
||||
function getImagePath(extensionDir, name) {
|
||||
export function getImagePath(extensionDir, name) {
|
||||
return extensionDir.get_child(`images/${name}`).get_path();
|
||||
}
|
||||
|
||||
export {TalkativeLog, getFullVersion, setDebugEnabled, loadIcon, getImagePath};
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* @type {{_display(): Meta_Display, number_of_displays(): int}}
|
||||
*/
|
||||
var DisplayApi = {
|
||||
export const DisplayApi = {
|
||||
/**
|
||||
* Returns the Wayland display or screen
|
||||
*
|
||||
@ -36,5 +36,3 @@ var DisplayApi = {
|
||||
this._display().set_cursor(cursor);
|
||||
},
|
||||
};
|
||||
|
||||
export {DisplayApi};
|
||||
|
||||
@ -5,9 +5,10 @@
|
||||
"name": "EasyScreenCast",
|
||||
"settings-schema": "org.gnome.shell.extensions.EasyScreenCast",
|
||||
"shell-version": [
|
||||
"46"
|
||||
"46",
|
||||
"47"
|
||||
],
|
||||
"url": "https://github.com/EasyScreenCast/EasyScreenCast",
|
||||
"uuid": "EasyScreenCast@iacopodeenosee.gmail.com",
|
||||
"version": 50
|
||||
"version": 51
|
||||
}
|
||||
@ -27,6 +27,7 @@ import Meta from 'gi://Meta';
|
||||
import Clutter from 'gi://Clutter';
|
||||
import St from 'gi://St';
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as Signals from 'resource:///org/gnome/shell/misc/signals.js';
|
||||
|
||||
import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js';
|
||||
|
||||
@ -38,15 +39,7 @@ import {DisplayApi} from './display_module.js';
|
||||
/**
|
||||
* @type {Capture}
|
||||
*/
|
||||
const Capture = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_Capture',
|
||||
Signals: {
|
||||
'captured-event': {
|
||||
param_types: [Clutter.Event.$gtype],
|
||||
},
|
||||
'stop': {},
|
||||
},
|
||||
}, class Capture extends GObject.Object {
|
||||
class Capture extends Signals.EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
Lib.TalkativeLog('-£-capture selection init');
|
||||
@ -183,14 +176,9 @@ const Capture = GObject.registerClass({
|
||||
toString() {
|
||||
return this.GTypeName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var SelectionArea = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_SelectionArea',
|
||||
Signals: {
|
||||
'stop': {},
|
||||
},
|
||||
}, class SelectionArea extends GObject.Object {
|
||||
export class SelectionArea extends Signals.EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
Lib.TalkativeLog('-£-area selection init');
|
||||
@ -238,14 +226,9 @@ var SelectionArea = GObject.registerClass({
|
||||
toString() {
|
||||
return this.GTypeName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var SelectionWindow = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_SelectionWindow',
|
||||
Signals: {
|
||||
'stop': {},
|
||||
},
|
||||
}, class SelectionWindow extends GObject.Object {
|
||||
export class SelectionWindow extends Signals.EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
Lib.TalkativeLog('-£-window selection init');
|
||||
@ -285,12 +268,12 @@ var SelectionWindow = GObject.registerClass({
|
||||
if (this._selectedWindow) {
|
||||
this._capture._stop();
|
||||
|
||||
var maxHeight = global.screen_height;
|
||||
var maxWidth = global.screen_width;
|
||||
let maxHeight = global.screen_height;
|
||||
let maxWidth = global.screen_width;
|
||||
Lib.TalkativeLog(`-£-global screen area H: ${maxHeight} W: ${maxWidth}`);
|
||||
|
||||
var [w, h] = this._selectedWindow.get_size();
|
||||
var [wx, wy] = this._selectedWindow.get_position();
|
||||
let [w, h] = this._selectedWindow.get_size();
|
||||
let [wx, wy] = this._selectedWindow.get_position();
|
||||
|
||||
Lib.TalkativeLog(`-£-windows pre wx: ${wx} wy: ${wy} height: ${h} width: ${w}`);
|
||||
|
||||
@ -331,22 +314,17 @@ var SelectionWindow = GObject.registerClass({
|
||||
toString() {
|
||||
return this.GTypeName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var SelectionDesktop = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_SelectionDesktop',
|
||||
Signals: {
|
||||
'stop': {},
|
||||
},
|
||||
}, class SelectionDesktop extends GObject.Object {
|
||||
export class SelectionDesktop extends Signals.EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
Lib.TalkativeLog('-£-desktop selection init');
|
||||
const displayCount = DisplayApi.number_displays();
|
||||
Lib.TalkativeLog(`-£-Number of monitor ${displayCount}`);
|
||||
|
||||
for (var i = 0; i < displayCount; i++) {
|
||||
var tmpM = DisplayApi.display_geometry_for_index(i);
|
||||
for (let i = 0; i < displayCount; i++) {
|
||||
let tmpM = DisplayApi.display_geometry_for_index(i);
|
||||
Lib.TalkativeLog(`-£-monitor ${i} geometry x=${tmpM.x} y=${tmpM.y} w=${tmpM.width} h=${tmpM.height}`);
|
||||
}
|
||||
|
||||
@ -376,10 +354,10 @@ var SelectionDesktop = GObject.registerClass({
|
||||
|
||||
let tmpM = Main.layoutManager.currentMonitor;
|
||||
|
||||
var x = tmpM.x;
|
||||
var y = tmpM.y;
|
||||
var height = tmpM.height;
|
||||
var width = tmpM.width;
|
||||
let x = tmpM.x;
|
||||
let y = tmpM.y;
|
||||
let height = tmpM.height;
|
||||
let width = tmpM.width;
|
||||
Lib.TalkativeLog(`-£-desktop x: ${x} y: ${y} height: ${height} width: ${width}`);
|
||||
|
||||
this._capture._saveRect(x, y, height, width);
|
||||
@ -389,11 +367,9 @@ var SelectionDesktop = GObject.registerClass({
|
||||
toString() {
|
||||
return this.GTypeName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var AreaRecording = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_AreaRecording',
|
||||
}, class AreaRecording extends GObject.Object {
|
||||
export class AreaRecording extends GObject.Object {
|
||||
constructor() {
|
||||
super();
|
||||
Lib.TalkativeLog('-£-area recording init');
|
||||
@ -407,9 +383,9 @@ var AreaRecording = GObject.registerClass({
|
||||
y: -10,
|
||||
});
|
||||
|
||||
var [recX, recY, recW, recH] = Ext.Indicator.getSelectedRect();
|
||||
var tmpH = Main.layoutManager.currentMonitor.height;
|
||||
var tmpW = Main.layoutManager.currentMonitor.width;
|
||||
let [recX, recY, recW, recH] = Ext.Indicator.getSelectedRect();
|
||||
let tmpH = Main.layoutManager.currentMonitor.height;
|
||||
let tmpW = Main.layoutManager.currentMonitor.width;
|
||||
|
||||
Main.uiGroup.add_child(this._areaRecording);
|
||||
|
||||
@ -463,7 +439,7 @@ var AreaRecording = GObject.registerClass({
|
||||
toString() {
|
||||
return this.GTypeName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} x1 left position
|
||||
@ -530,5 +506,3 @@ function _selectWindow(windows, x, y) {
|
||||
|
||||
return filtered[0];
|
||||
}
|
||||
|
||||
export {SelectionArea, SelectionWindow, SelectionDesktop, AreaRecording};
|
||||
|
||||
@ -15,51 +15,51 @@
|
||||
import GObject from 'gi://GObject';
|
||||
|
||||
// setting keys
|
||||
var INPUT_AUDIO_SOURCE_SETTING_KEY = 'input-audio-source';
|
||||
var ACTIVE_POST_CMD_SETTING_KEY = 'execute-post-cmd';
|
||||
var POST_CMD_SETTING_KEY = 'post-cmd';
|
||||
var ACTIVE_PRE_CMD_SETTING_KEY = 'execute-pre-cmd';
|
||||
var PRE_CMD_SETTING_KEY = 'pre-cmd';
|
||||
var ACTIVE_CUSTOM_GSP_SETTING_KEY = 'active-custom-gsp';
|
||||
var ACTIVE_SHORTCUT_SETTING_KEY = 'active-shortcut';
|
||||
var SHORTCUT_KEY_SETTING_KEY = 'shortcut-key';
|
||||
var TIME_DELAY_SETTING_KEY = 'delay-time';
|
||||
var SHOW_NOTIFY_ALERT_SETTING_KEY = 'show-notify-alert';
|
||||
var SHOW_AREA_REC_SETTING_KEY = 'show-area-rec';
|
||||
var VERBOSE_DEBUG_SETTING_KEY = 'verbose-debug';
|
||||
var PIPELINE_REC_SETTING_KEY = 'pipeline';
|
||||
var FPS_SETTING_KEY = 'fps';
|
||||
var STATUS_INDICATORS_SETTING_KEY = 'status-indicators';
|
||||
var X_POS_SETTING_KEY = 'x-pos';
|
||||
var Y_POS_SETTING_KEY = 'y-pos';
|
||||
var WIDTH_SETTING_KEY = 'width-rec';
|
||||
var HEIGHT_SETTING_KEY = 'height-rec';
|
||||
var DRAW_CURSOR_SETTING_KEY = 'draw-cursor';
|
||||
var AREA_SCREEN_SETTING_KEY = 'area-screen';
|
||||
var FILE_NAME_SETTING_KEY = 'file-name';
|
||||
var FILE_FOLDER_SETTING_KEY = 'file-folder';
|
||||
var FILE_CONTAINER_SETTING_KEY = 'file-container';
|
||||
var FILE_RESOLUTION_TYPE_SETTING_KEY = 'file-resolution-type';
|
||||
var FILE_RESOLUTION_KAR_SETTING_KEY = 'file-resolution-kar';
|
||||
var FILE_RESOLUTION_WIDTH_SETTING_KEY = 'file-resolution-width';
|
||||
var FILE_RESOLUTION_HEIGHT_SETTING_KEY = 'file-resolution-height';
|
||||
var QUALITY_SETTING_KEY = 'quality-index';
|
||||
var DEVICE_INDEX_WEBCAM_SETTING_KEY = 'device-webcam-index';
|
||||
var DEVICE_WEBCAM_SETTING_KEY = 'device-webcam';
|
||||
var QUALITY_WEBCAM_SETTING_KEY = 'quality-webcam';
|
||||
var WIDTH_WEBCAM_SETTING_KEY = 'width-webcam';
|
||||
var HEIGHT_WEBCAM_SETTING_KEY = 'height-webcam';
|
||||
var TYPE_UNIT_WEBCAM_SETTING_KEY = 'type-unit-webcam';
|
||||
var MARGIN_X_WEBCAM_SETTING_KEY = 'margin-x-webcam';
|
||||
var MARGIN_Y_WEBCAM_SETTING_KEY = 'margin-y-webcam';
|
||||
var ALPHA_CHANNEL_WEBCAM_SETTING_KEY = 'alpha-channel-webcam';
|
||||
var CORNER_POSITION_WEBCAM_SETTING_KEY = 'corner-position-webcam';
|
||||
export const INPUT_AUDIO_SOURCE_SETTING_KEY = 'input-audio-source';
|
||||
export const ACTIVE_POST_CMD_SETTING_KEY = 'execute-post-cmd';
|
||||
export const POST_CMD_SETTING_KEY = 'post-cmd';
|
||||
export const ACTIVE_PRE_CMD_SETTING_KEY = 'execute-pre-cmd';
|
||||
export const PRE_CMD_SETTING_KEY = 'pre-cmd';
|
||||
export const ACTIVE_CUSTOM_GSP_SETTING_KEY = 'active-custom-gsp';
|
||||
export const ACTIVE_SHORTCUT_SETTING_KEY = 'active-shortcut';
|
||||
export const SHORTCUT_KEY_SETTING_KEY = 'shortcut-key';
|
||||
export const TIME_DELAY_SETTING_KEY = 'delay-time';
|
||||
export const SHOW_NOTIFY_ALERT_SETTING_KEY = 'show-notify-alert';
|
||||
export const SHOW_AREA_REC_SETTING_KEY = 'show-area-rec';
|
||||
export const VERBOSE_DEBUG_SETTING_KEY = 'verbose-debug';
|
||||
export const PIPELINE_REC_SETTING_KEY = 'pipeline';
|
||||
export const FPS_SETTING_KEY = 'fps';
|
||||
export const STATUS_INDICATORS_SETTING_KEY = 'status-indicators';
|
||||
export const X_POS_SETTING_KEY = 'x-pos';
|
||||
export const Y_POS_SETTING_KEY = 'y-pos';
|
||||
export const WIDTH_SETTING_KEY = 'width-rec';
|
||||
export const HEIGHT_SETTING_KEY = 'height-rec';
|
||||
export const DRAW_CURSOR_SETTING_KEY = 'draw-cursor';
|
||||
export const AREA_SCREEN_SETTING_KEY = 'area-screen';
|
||||
export const FILE_NAME_SETTING_KEY = 'file-name';
|
||||
export const FILE_FOLDER_SETTING_KEY = 'file-folder';
|
||||
export const FILE_CONTAINER_SETTING_KEY = 'file-container';
|
||||
export const FILE_RESOLUTION_TYPE_SETTING_KEY = 'file-resolution-type';
|
||||
export const FILE_RESOLUTION_KAR_SETTING_KEY = 'file-resolution-kar';
|
||||
export const FILE_RESOLUTION_WIDTH_SETTING_KEY = 'file-resolution-width';
|
||||
export const FILE_RESOLUTION_HEIGHT_SETTING_KEY = 'file-resolution-height';
|
||||
export const QUALITY_SETTING_KEY = 'quality-index';
|
||||
export const DEVICE_INDEX_WEBCAM_SETTING_KEY = 'device-webcam-index';
|
||||
export const DEVICE_WEBCAM_SETTING_KEY = 'device-webcam';
|
||||
export const QUALITY_WEBCAM_SETTING_KEY = 'quality-webcam';
|
||||
export const WIDTH_WEBCAM_SETTING_KEY = 'width-webcam';
|
||||
export const HEIGHT_WEBCAM_SETTING_KEY = 'height-webcam';
|
||||
export const TYPE_UNIT_WEBCAM_SETTING_KEY = 'type-unit-webcam';
|
||||
export const MARGIN_X_WEBCAM_SETTING_KEY = 'margin-x-webcam';
|
||||
export const MARGIN_Y_WEBCAM_SETTING_KEY = 'margin-y-webcam';
|
||||
export const ALPHA_CHANNEL_WEBCAM_SETTING_KEY = 'alpha-channel-webcam';
|
||||
export const CORNER_POSITION_WEBCAM_SETTING_KEY = 'corner-position-webcam';
|
||||
|
||||
// shortcut tree view columns
|
||||
var SHORTCUT_COLUMN_KEY = 0;
|
||||
var SHORTCUT_COLUMN_MODS = 1;
|
||||
export const SHORTCUT_COLUMN_KEY = 0;
|
||||
export const SHORTCUT_COLUMN_MODS = 1;
|
||||
|
||||
var Settings = GObject.registerClass(class EasyScreenCastSettings extends GObject.Object {
|
||||
export const Settings = GObject.registerClass(class EasyScreenCastSettings extends GObject.Object {
|
||||
constructor(settings) {
|
||||
super();
|
||||
this._settings = settings;
|
||||
@ -137,56 +137,10 @@ var Settings = GObject.registerClass(class EasyScreenCastSettings extends GObjec
|
||||
* @param {boolean} audio with or without audio
|
||||
* @returns {string}
|
||||
*/
|
||||
function getGSPstd(audio) {
|
||||
export function getGSPstd(audio) {
|
||||
// TODO update gsp
|
||||
if (audio)
|
||||
return 'queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! videorate ! vp8enc min_quantizer=0 max_quantizer=5 cpu-used=3 deadline=1000000 threads=%T ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! mux. pulsesrc ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! audioconvert ! vorbisenc ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! mux. webmmux name=mux ';
|
||||
else
|
||||
return 'vp9enc min_quantizer=0 max_quantizer=5 cpu-used=3 deadline=1000000 threads=%T ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! webmmux';
|
||||
}
|
||||
|
||||
export {
|
||||
getGSPstd,
|
||||
Settings,
|
||||
INPUT_AUDIO_SOURCE_SETTING_KEY,
|
||||
ACTIVE_POST_CMD_SETTING_KEY,
|
||||
POST_CMD_SETTING_KEY,
|
||||
ACTIVE_PRE_CMD_SETTING_KEY,
|
||||
PRE_CMD_SETTING_KEY,
|
||||
ACTIVE_CUSTOM_GSP_SETTING_KEY,
|
||||
ACTIVE_SHORTCUT_SETTING_KEY,
|
||||
SHORTCUT_KEY_SETTING_KEY,
|
||||
TIME_DELAY_SETTING_KEY,
|
||||
SHOW_NOTIFY_ALERT_SETTING_KEY,
|
||||
SHOW_AREA_REC_SETTING_KEY,
|
||||
VERBOSE_DEBUG_SETTING_KEY,
|
||||
PIPELINE_REC_SETTING_KEY,
|
||||
FPS_SETTING_KEY,
|
||||
STATUS_INDICATORS_SETTING_KEY,
|
||||
X_POS_SETTING_KEY,
|
||||
Y_POS_SETTING_KEY,
|
||||
WIDTH_SETTING_KEY,
|
||||
HEIGHT_SETTING_KEY,
|
||||
DRAW_CURSOR_SETTING_KEY,
|
||||
AREA_SCREEN_SETTING_KEY,
|
||||
FILE_NAME_SETTING_KEY,
|
||||
FILE_FOLDER_SETTING_KEY,
|
||||
FILE_CONTAINER_SETTING_KEY,
|
||||
FILE_RESOLUTION_TYPE_SETTING_KEY,
|
||||
FILE_RESOLUTION_KAR_SETTING_KEY,
|
||||
FILE_RESOLUTION_WIDTH_SETTING_KEY,
|
||||
FILE_RESOLUTION_HEIGHT_SETTING_KEY,
|
||||
QUALITY_SETTING_KEY,
|
||||
DEVICE_INDEX_WEBCAM_SETTING_KEY,
|
||||
DEVICE_WEBCAM_SETTING_KEY,
|
||||
QUALITY_WEBCAM_SETTING_KEY,
|
||||
WIDTH_WEBCAM_SETTING_KEY,
|
||||
HEIGHT_WEBCAM_SETTING_KEY,
|
||||
TYPE_UNIT_WEBCAM_SETTING_KEY,
|
||||
MARGIN_X_WEBCAM_SETTING_KEY,
|
||||
MARGIN_Y_WEBCAM_SETTING_KEY,
|
||||
ALPHA_CHANNEL_WEBCAM_SETTING_KEY,
|
||||
CORNER_POSITION_WEBCAM_SETTING_KEY,
|
||||
SHORTCUT_COLUMN_KEY,
|
||||
SHORTCUT_COLUMN_MODS
|
||||
};
|
||||
|
||||
@ -27,7 +27,7 @@ let ElapsedSec;
|
||||
/**
|
||||
* @type {TimerDelay}
|
||||
*/
|
||||
const TimerDelay = GObject.registerClass({
|
||||
export const TimerDelay = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_TimerDelay',
|
||||
}, class TimerDelay extends GObject.Object {
|
||||
/**
|
||||
@ -145,7 +145,7 @@ let secpassed = 0;
|
||||
/**
|
||||
* @type {TimerCounting}
|
||||
*/
|
||||
var TimerCounting = GObject.registerClass({
|
||||
export const TimerCounting = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_TimerCounting',
|
||||
}, class TimerCounting extends GObject.Object {
|
||||
/**
|
||||
@ -255,5 +255,3 @@ var TimerCounting = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {TimerDelay, TimerCounting};
|
||||
|
||||
@ -27,7 +27,7 @@ import * as Ext from './extension.js';
|
||||
/**
|
||||
* @type {MixerAudio}
|
||||
*/
|
||||
var MixerAudio = GObject.registerClass({
|
||||
export const MixerAudio = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_MixerAudio',
|
||||
}, class MixerAudio extends GObject.Object {
|
||||
constructor() {
|
||||
@ -317,5 +317,3 @@ var MixerAudio = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {MixerAudio};
|
||||
|
||||
@ -20,7 +20,7 @@ import * as Lib from './convenience.js';
|
||||
/**
|
||||
* @type {ExecuteStuff}
|
||||
*/
|
||||
var ExecuteStuff = GObject.registerClass({
|
||||
export const ExecuteStuff = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_ExecuteStuff',
|
||||
}, class ExecuteStuff extends GObject.Object {
|
||||
/**
|
||||
@ -262,5 +262,3 @@ var ExecuteStuff = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {ExecuteStuff};
|
||||
|
||||
@ -321,7 +321,7 @@ const CONTAINER = [webmVP8, webmVP9, mp4, mkv, ogg, mp4Aac];
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
function composeGSP(settings, mixer) {
|
||||
export function composeGSP(settings, mixer) {
|
||||
Lib.TalkativeLog('-§-COMPOSE GSP');
|
||||
|
||||
let tmpGSP = '';
|
||||
@ -703,7 +703,7 @@ function _getWebCamDimension(settings) {
|
||||
* @param {int} container selected container format
|
||||
* @returns {string}
|
||||
*/
|
||||
function getDescr(quality, container) {
|
||||
export function getDescr(quality, container) {
|
||||
Lib.TalkativeLog(`-§-get description Q-> ${quality} C-> ${container}`);
|
||||
|
||||
return CONTAINER[container].quality[quality].descr;
|
||||
@ -716,7 +716,7 @@ function getDescr(quality, container) {
|
||||
* @param {int} container selected container format
|
||||
* @returns {number}
|
||||
*/
|
||||
function getFps(quality, container) {
|
||||
export function getFps(quality, container) {
|
||||
Lib.TalkativeLog(`-§-get fps Q-> ${quality} C-> ${container}`);
|
||||
|
||||
return CONTAINER[container].quality[quality].fps;
|
||||
@ -728,10 +728,8 @@ function getFps(quality, container) {
|
||||
* @param {int} container selected container format
|
||||
* @returns {string}
|
||||
*/
|
||||
function getFileExtension(container) {
|
||||
export function getFileExtension(container) {
|
||||
Lib.TalkativeLog(`-§-get file extension C-> ${container}`);
|
||||
|
||||
return CONTAINER[container].fileExt;
|
||||
}
|
||||
|
||||
export {composeGSP, getDescr, getFps, getFileExtension};
|
||||
|
||||
@ -27,7 +27,7 @@ import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'
|
||||
/**
|
||||
* @type {NotifyManager}
|
||||
*/
|
||||
var NotifyManager = GObject.registerClass({
|
||||
export const NotifyManager = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_NotifyManager',
|
||||
}, class NotifyManager extends GObject.Object {
|
||||
/**
|
||||
@ -143,5 +143,3 @@ var NotifyManager = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {NotifyManager};
|
||||
|
||||
@ -27,7 +27,7 @@ import * as Ext from './extension.js';
|
||||
/**
|
||||
* @type {CaptureVideo}
|
||||
*/
|
||||
var CaptureVideo = GObject.registerClass({
|
||||
export const CaptureVideo = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_CaptureVideo',
|
||||
}, class CaptureVideo extends GObject.Object {
|
||||
/**
|
||||
@ -212,5 +212,3 @@ var CaptureVideo = GObject.registerClass({
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
export {CaptureVideo};
|
||||
|
||||
@ -17,7 +17,7 @@ import GLib from 'gi://GLib';
|
||||
import Gst from 'gi://Gst?version=1.0';
|
||||
import * as Lib from './convenience.js';
|
||||
|
||||
var HelperWebcam = GObject.registerClass({
|
||||
export const HelperWebcam = GObject.registerClass({
|
||||
GTypeName: 'EasyScreenCast_HelperWebcam',
|
||||
}, class HelperWebcam extends GObject.Object {
|
||||
/**
|
||||
@ -241,10 +241,18 @@ var HelperWebcam = GObject.registerClass({
|
||||
// example, a pipewiresrc or a v4l2src. For now, we are only
|
||||
// using v4l2src.
|
||||
// See also: Gst.DeviceMonitor.get_providers: pipewiredeviceprovider,decklinkdeviceprovider,v4l2deviceprovider
|
||||
// CLI: "/usr/bin/gst-device-monitor-1.0 Video/Source"
|
||||
//
|
||||
// So, here we filter the devices, that have a device.path property, which
|
||||
// means, these are only v4l2 devices
|
||||
var filtered = list.filter(device => device.get_properties().get_string('device.path') !== null);
|
||||
|
||||
var filtered = list.filter(device => {
|
||||
let props = device.get_properties();
|
||||
let hasDevice = props != null && props.get_string('device.path') !== null;
|
||||
if (props != null)
|
||||
props.free();
|
||||
return hasDevice;
|
||||
});
|
||||
Lib.TalkativeLog(`-@-devices number after filtering for v4l2: ${filtered.length}`);
|
||||
|
||||
return filtered;
|
||||
@ -311,5 +319,3 @@ var HelperWebcam = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {HelperWebcam};
|
||||
|
||||
Reference in New Issue
Block a user