[gnome-sound-recorder] stop recording on EOS
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] stop recording on EOS
- Date: Sat, 6 Jun 2020 07:04:01 +0000 (UTC)
commit 184b537ea24513c1ed641748052b5687f13f4168
Author: Kavan Mevada <kavanmevada gmail com>
Date: Fri Jun 5 22:21:29 2020 +0530
stop recording on EOS
src/record.js | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/record.js b/src/record.js
index 7589f13..d1fb31d 100644
--- a/src/record.js
+++ b/src/record.js
@@ -139,7 +139,7 @@ var Record = new GObject.registerClass({
}
stopRecording() {
- this.pipeline.send_event(Gst.Event.new_eos());
+ this.state = Gst.State.NULL;
if (this.timeout) {
GLib.source_remove(this.timeout);
@@ -150,9 +150,6 @@ var Record = new GObject.registerClass({
this.recordBus.remove_watch();
this.recordBus = null;
}
-
-
- this.duration = 0;
}
_onMessageReceived(message) {
@@ -204,7 +201,7 @@ var Record = new GObject.registerClass({
}
case Gst.MessageType.EOS:
- this.throwError();
+ this.stopRecording();
break;
case Gst.MessageType.WARNING:
log(message.parse_warning()[0].toString());
@@ -215,13 +212,6 @@ var Record = new GObject.registerClass({
}
}
- throwError() {
- this.state = Gst.State.NULL;
-
- if (this.recordBus)
- this.recordBus.remove_signal_watch();
- }
-
_getProfile() {
let profileIndex = Application.settings.get_enum('audio-profile');
const profile = EncodingProfiles[profileIndex];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]