[gnome-sound-recorder] refactor start/stop recording functions



commit 2201c221536788df0be0350482ca0f7fe0cb89f1
Author: Kavan Mevada <kavanmevada gmail com>
Date:   Fri Jun 5 22:41:32 2020 +0530

    refactor start/stop recording functions

 src/mainWindow.js | 6 +++---
 src/record.js     | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 424b593..a1247f2 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -60,7 +60,7 @@ var MainWindow = GObject.registerClass({
             if (this.wave)
                 this.wave.endDrawing();
             this.player.stop();
-            this._record.stopRecording();
+            this._record.stop();
         });
 
         this._recordingList = new RecordingList();
@@ -90,13 +90,13 @@ var MainWindow = GObject.registerClass({
     onRecordStart() {
         this.player.stop();
         this._mainStack.set_visible_child_name('recorderView');
-        this._record.startRecording();
+        this._record.start();
 
         this.wave = new Waveform.WaveForm(this._recordGrid, null);
     }
 
     onRecordStop() {
-        this._record.stopRecording();
+        this._record.stop();
 
         let fileUri = this._record.initialFileName;
         let recordedFile = Gio.file_new_for_path(fileUri);
diff --git a/src/record.js b/src/record.js
index bb8c1d0..73182d0 100644
--- a/src/record.js
+++ b/src/record.js
@@ -104,7 +104,7 @@ var Record = new GObject.registerClass({
         this.level.link(this.volume);
     }
 
-    startRecording() {
+    start() {
         this.baseTime = 0;
         this._buildFileName = new BuildFileName();
         this.initialFileName = this._buildFileName.buildInitialFilename();
@@ -138,7 +138,7 @@ var Record = new GObject.registerClass({
         });
     }
 
-    stopRecording() {
+    stop() {
         this.state = Gst.State.NULL;
 
         if (this.timeout) {
@@ -201,7 +201,7 @@ var Record = new GObject.registerClass({
         }
 
         case Gst.MessageType.EOS:
-            this.stopRecording();
+            this.stop();
             break;
         case Gst.MessageType.WARNING:
             log(message.parse_warning()[0].toString());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]