[gnome-sound-recorder] record.js, listview.js: Use filesink instead of urisink
- From: Meg Ford (Margaret) <megford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] record.js, listview.js: Use filesink instead of urisink
- Date: Sun, 27 Apr 2014 01:03:00 +0000 (UTC)
commit b79f5b8beb9d8fd75ece6b02a764ffb1c5b2b4cd
Author: Meg Ford <megford gnome org>
Date: Sat Apr 26 19:55:44 2014 -0500
record.js, listview.js: Use filesink instead of urisink
urisink does not allow seeking.
Therefore, MP4 files are not finalized properly.
There is a fix for this in GStreamer, but it is not released yet.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727987
src/listview.js | 4 ++--
src/record.js | 18 +++++++-----------
2 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/listview.js b/src/listview.js
index 08abd85..082bcac 100644
--- a/src/listview.js
+++ b/src/listview.js
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
+ * You should have received a copy of the GNU Library General PublicGstPbutils.pb_utils_get_codec_description
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
*
@@ -39,9 +39,9 @@ const EnumeratorState = {
};
const mediaTypeMap = {
+ FLAC: "FLAC",
OGG_VORBIS: "Ogg Vorbis",
OPUS: "Opus",
- FLAC: "FLAC",
MP3: "MP3",
MP4: "MP4"
};
diff --git a/src/record.js b/src/record.js
index 8aa4891..02b4906 100644
--- a/src/record.js
+++ b/src/record.js
@@ -107,11 +107,11 @@ const Record = new Lang.Class({
let ebinProfile = this.ebin.set_property("profile", this._mediaProfile);
this.pipeline.add(this.ebin);
let srcpad = this.ebin.get_static_pad("src");
- this.giosink = Gst.ElementFactory.make("giosink", "giosink");
- this.giosink.set_property("file", this.initialFileName);
- this.pipeline.add(this.giosink);
+ this.filesink = Gst.ElementFactory.make("filesink", "filesink");
+ this.filesink.set_property("location", this.initialFileName);
+ this.pipeline.add(this.filesink);
- if (!this.pipeline || !this.giosink) {
+ if (!this.pipeline || !this.filesink) {
this._showErrorDialog(_('Not all elements could be created.'));
this.onEndOfStream();
}
@@ -119,7 +119,7 @@ const Record = new Lang.Class({
let srcLink = this.srcElement.link(this.level);
let levelLink = this.level.link(this.volume);
let volLink = this.volume.link(this.ebin);
- let ebinLink = this.ebin.link(this.giosink);
+ let ebinLink = this.ebin.link(this.filesink);
if (!srcLink || !levelLink || !ebinLink) {
this._showErrorDialog(_('Not all of the elements were linked'));
@@ -294,15 +294,11 @@ const BuildFileName = new Lang.Class({
/* Translators: ""Clip %d"" is the default name assigned to a file created
by the application (for example, "Clip 1"). */
let clipName = _("Clip %d").format(this.clipNumberString);
- let file = dir.get_child_for_display_name(clipName);
-
+ let clip = dir.get_child_for_display_name(clipName);
+ let file = clip.get_parse_name();
return file;
},
- getTitle: function() {
- return this.title;
- },
-
getOrigin: function() {
return this.dateTime;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]