Description: Upstream changes introduced in version 0.11-0lliurex.lp.103 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . kazam (0.11-0lliurex.lp.103) lucid; urgency=low . * Merged lp:unstable rev 103 (2011-05-13 15:21:04). Build from tarball of the estable version. . The person named in the Author field signed this changelog entry. Author: Luis Antonio Garcia Gisbert --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Forwarded: Reviewed-By: Last-Update: --- kazam-0.11.orig/po/kazam.pot +++ kazam-0.11/po/kazam.pot @@ -1,17 +1,20 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-10-08 14:12+0100\n" +"POT-Creation-Date: 2011-06-21 23:49+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-10-24 16:04+0000\n" -"X-Generator: Launchpad (build Unknown)\n" #: ../data/ui/authenticate.ui.h:1 msgid " " @@ -48,7 +51,7 @@ msgstr "" #: ../data/ui/done-recording.ui.h:5 ../data/ui/export.ui.h:7 #: ../data/ui/start.ui.h:3 ../data/kazam.desktop.in.h:1 #: ../kazam/frontend/widgets/comboboxes.py:106 -#: ../kazam/frontend/widgets/dialogs.py:46 +#: ../kazam/frontend/widgets/dialogs.py:47 msgid "Kazam Screencaster" msgstr "" @@ -126,6 +129,7 @@ msgid "Category" msgstr "" #: ../data/ui/export_sources/youtube.ui.h:2 +#: ../data/ui/export_sources/videobin.ui.h:1 msgid "Description" msgstr "" @@ -138,9 +142,14 @@ msgid "Private" msgstr "" #: ../data/ui/export_sources/youtube.ui.h:5 +#: ../data/ui/export_sources/videobin.ui.h:3 msgid "Title" msgstr "" +#: ../data/ui/export_sources/videobin.ui.h:2 +msgid "Email" +msgstr "" + #: ../data/kazam.desktop.in.h:2 msgid "Record a video of activity on your screen" msgstr "" @@ -150,52 +159,52 @@ msgid "Screencaster" msgstr "" #. Open the save dialog -#: ../kazam/app.py:149 +#: ../kazam/app.py:150 msgid "Save screencast" msgstr "" -#: ../kazam/frontend/export.py:201 +#: ../kazam/frontend/export.py:207 msgid "Logging in..." msgstr "" -#: ../kazam/frontend/export.py:207 +#: ../kazam/frontend/export.py:213 msgid "Log-in completed." msgstr "" -#: ../kazam/frontend/export.py:209 +#: ../kazam/frontend/export.py:215 msgid "There was an error logging in." msgstr "" -#: ../kazam/frontend/export.py:214 +#: ../kazam/frontend/export.py:220 msgid "Converting screencast..." msgstr "" -#: ../kazam/frontend/export.py:218 +#: ../kazam/frontend/export.py:224 msgid "Screencast converted." msgstr "" -#: ../kazam/frontend/export.py:220 +#: ../kazam/frontend/export.py:226 msgid "There was an error converting." msgstr "" -#: ../kazam/frontend/export.py:225 +#: ../kazam/frontend/export.py:231 msgid "Uploading screencast..." msgstr "" -#: ../kazam/frontend/export.py:229 +#: ../kazam/frontend/export.py:235 msgid "Screencast uploaded." msgstr "" #. Show a dialog with the url of the uploaded file -#: ../kazam/frontend/export.py:233 +#: ../kazam/frontend/export.py:239 msgid "Your screencast has uploaded successfully." msgstr "" -#: ../kazam/frontend/export.py:234 +#: ../kazam/frontend/export.py:240 msgid "It is available at the location below:" msgstr "" -#: ../kazam/frontend/export.py:236 +#: ../kazam/frontend/export.py:242 msgid "There was an error uploading." msgstr "" @@ -207,7 +216,7 @@ msgstr "" msgid "Finish recording..." msgstr "" -#: ../kazam/frontend/window_countdown.py:98 +#: ../kazam/frontend/window_countdown.py:97 msgid "Recording will start in..." msgstr "" @@ -228,20 +237,20 @@ msgstr "" msgid "Computer" msgstr "" -#: ../kazam/frontend/widgets/dialogs.py:47 +#: ../kazam/frontend/widgets/dialogs.py:48 msgid "Record a video of activity on your screen." msgstr "" -#: ../kazam/frontend/widgets/dialogs.py:65 +#: ../kazam/frontend/widgets/dialogs.py:71 msgid "Untitled Screencast" msgstr "" -#: ../kazam/frontend/widgets/dialogs.py:150 +#: ../kazam/frontend/widgets/dialogs.py:156 #, python-format msgid "To upload a screencast to %s, you need a %s account." msgstr "" -#: ../kazam/frontend/widgets/dialogs.py:154 +#: ../kazam/frontend/widgets/dialogs.py:160 #, python-format msgid "I have a %s account:" msgstr "" --- kazam-0.11.orig/data/ui/export_sources/videobin.ui +++ kazam-0.11/data/ui/export_sources/videobin.ui @@ -1,4 +1,4 @@ - + @@ -7,7 +7,122 @@ 24 12 - + + True + 3 + + + True + 2 + 2 + + + True + 0 + Email + True + + + 1 + 2 + GTK_FILL + GTK_FILL + 6 + + + + + True + 0 + Title + True + + + GTK_FILL + GTK_FILL + 6 + + + + + True + True + + + + 1 + 2 + 1 + 2 + + 6 + 3 + + + + + True + True + + + + 1 + 2 + + 6 + 3 + + + + + + + + + + True + 0 + 3 + Description + True + + + 1 + 2 + GTK_FILL + + 6 + + + + + True + queue + + + True + True + automatic + automatic + + + True + True + word-char + 3 + 3 + + + + + + + 2 + 3 + 6 + + + --- kazam-0.11.orig/kazam/app.py +++ kazam-0.11/kazam/app.py @@ -97,11 +97,12 @@ class KazamApp(object): def cb_record_requested(self, window_countdown): self.indicator.start_recording() - self.screencast.start_recording(self.video_source, self.audio) + self.screencast.start_recording() def cb_countdown_requested(self, recording_start): - self.audio = self.recording_start.checkbutton_audio.get_active() - self.video_source = self.recording_start.get_selected_video_source() + audio_source = self.recording_start.checkbutton_audio.get_active() + video_source = self.recording_start.get_selected_video_source() + self.screencast.setup_sources(video_source, audio_source) self.window_countdown = CountdownWindow(self.datadir, self.icons) self.window_countdown.connect("count", self.on_window_countdown_count) --- kazam-0.11.orig/kazam/backend/ffmpeg.py +++ kazam-0.11/kazam/backend/ffmpeg.py @@ -31,32 +31,42 @@ class Screencast(object): def __init__(self): self.tempfile = tempfile.mktemp(suffix=".mkv") - def start_recording(self, video_source, audio=False): - self.audio = audio - x = video_source.x - y = video_source.y - width = video_source.width - height = video_source.height - display = video_source.display + def setup_sources(self, video_source, audio_source): + self.audio_source = audio_source + self.video_source = video_source # TODO: use gstreamer instead (see gstreamer.py for start) - args_list = ["ffmpeg"] + self.args_list = ["ffmpeg"] # Add the audio source if selected - if audio: - args_list += ["-f", "alsa", "-i", "pulse"] + if audio_source: + self.args_list += ["-f", "alsa", "-i", "pulse"] # Add the video source - args_list += ["-f", "x11grab", "-r", "30", "-s", - "%sx%s" % (width, height), "-i", - "%s+%s,%s" % (display, x, y)] - if audio: - args_list += ["-ac", "2", "-acodec", "flac", "-ab", "128k"] - - args_list += ["-vcodec", "libx264", "-vpre", - "lossless_ultrafast", "-threads", "0", self.tempfile] - - self.recording_command = Popen(args_list) + if video_source: + x = video_source.x + y = video_source.y + width = video_source.width + height = video_source.height + display = video_source.display + self.args_list += ["-f", "x11grab", "-r", "30", "-s", + "%sx%s" % (width, height), "-i", + "%s+%s,%s" % (display, x, y)] + if audio_source: + self.args_list += ["-ac", "2", "-acodec", "flac", "-ab", "128k"] + + if video_source: + self.args_list += ["-vcodec", "libx264", "-vpre", + "lossless_ultrafast"] + self.args_list += ["-threads", "0", self.tempfile] + + arg_string = "" + for arg in self.args_list: + arg_string += " %s" % arg + print arg_string + + def start_recording(self): + self.recording_command = Popen(self.args_list) def pause_recording(self): self.recording_command.send_signal(signal.SIGTSTP) @@ -71,9 +81,12 @@ class Screencast(object): return self.tempfile def get_audio_recorded(self): - return self.audio + return self.audio_source - def convert(self, options, converted_file_extension, video_quality, + def get_video_recorded(self): + return self.video_source + + def convert(self, options, converted_file_extension, video_quality=None, audio_quality=None): self.converted_file_extension = converted_file_extension @@ -90,7 +103,7 @@ class Screencast(object): # use the same quality option if video_quality == 6001: args_list += ["-sameq"] - else: + elif video_quality: args_list += ["-b", "%sk" % video_quality] if audio_quality: args_list += ["-ab", "%sk" % audio_quality] --- kazam-0.11.orig/kazam/backend/export_sources/videobin.py +++ kazam-0.11/kazam/backend/export_sources/videobin.py @@ -37,12 +37,16 @@ class UploadSource(UploadSuperSource): NAME = "VideoBin" REGISTER_URL = None - META = {} + META = { + "title":"entry_title", + "description":"textview_description", + "email":"entry_email", + } # FIXME: (eventually) These should be OGV options, however # Theora messes up the frame rate :( FFMPEG_OPTIONS = [] - FFMPEG_FILE_EXTENSION = "changed.mkv" + FFMPEG_FILE_EXTENSION = "changed.mp4" def __init__(self): super(UploadSource, self).__init__() @@ -59,7 +63,9 @@ class UploadSource(UploadSuperSource): pass ### - + def create_meta(self, **args): + self.video_entry = args + def upload_pre(self): self.curl = pycurl.Curl() self.curl.setopt(self.curl.URL, self.URL) @@ -67,8 +73,12 @@ class UploadSource(UploadSuperSource): self.curl.setopt(self.curl.WRITEFUNCTION, self._store) def upload_in(self, path): - self.curl.setopt(self.curl.HTTPPOST, [("api", "1"), - ("videoFile", (self.curl.FORM_FILE, path))]) + opts = [("api", "1")] + for key in ("email", "title", "description"): + if self.video_entry[key]: + opts.append((key, self.video_entry[key])) + opts.append(("videoFile", (self.curl.FORM_FILE, path))) + self.curl.setopt(self.curl.HTTPPOST, opts) self.curl.perform() def upload_post(self): --- kazam-0.11.orig/kazam/frontend/start_recording.py +++ kazam-0.11/kazam/frontend/start_recording.py @@ -105,12 +105,26 @@ class RecordingStart(KazamStage): def on_checkbutton_video_toggled(self, checkbutton): self.combobox_video.set_sensitive(checkbutton.get_active()) - + self.sensitise_record_button() + def on_checkbutton_audio_toggled(self, checkbutton): self.combobox_audio.set_sensitive(checkbutton.get_active()) + self.sensitise_record_button() + + def sensitise_record_button(self): + video_source = self.checkbutton_video.get_active() + audio_source = self.checkbutton_audio.get_active() + self.button_record.set_sensitive(video_source or audio_source) def get_selected_video_source(self): + if not self.checkbutton_video.get_active(): + return None return self.combobox_video.get_selected_video_source() + def get_selected_audio_source(self): + if not self.checkbutton_audio.get_active(): + return None + return self.combobox_audio.get_selected_audio_source() + --- kazam-0.11.orig/kazam/frontend/export.py +++ kazam-0.11/kazam/frontend/export.py @@ -87,11 +87,15 @@ class ExportFrontend(KazamStage): self.on_combobox_export_changed(None) def setup_quality_sliders(self): - # Video Quality Slider - self.adjustment_quality_video = gtk.Adjustment(3000, 200, 6001, 1) - self.hscale_quality_video = gtk.HScale(self.adjustment_quality_video) - self.hscale_quality_video.set_draw_value(False) - self.hbox_quality_video.pack_start(self.hscale_quality_video) + + if self.screencast.get_video_recorded(): + # Video Quality Slider + self.adjustment_quality_video = gtk.Adjustment(3000, 200, 6001, 1) + self.hscale_quality_video = gtk.HScale(self.adjustment_quality_video) + self.hscale_quality_video.set_draw_value(False) + self.hbox_quality_video.pack_start(self.hscale_quality_video) + else: + self.vbox_quality_video.destroy() # (If audio was recorded) Audio Quality Slider if self.screencast.get_audio_recorded(): @@ -156,7 +160,9 @@ class ExportFrontend(KazamStage): return meta def get_video_quality(self): - return self.adjustment_quality_video.get_value() + if self.screencast.get_video_recorded(): + return self.adjustment_quality_video.get_value() + return False def get_audio_quality(self): if self.screencast.get_audio_recorded(): --- kazam-0.11.orig/kazam/frontend/window_countdown.py +++ kazam-0.11/kazam/frontend/window_countdown.py @@ -132,5 +132,18 @@ class CountdownWindow(KazamStage): self.emit("record-requested") self.window.destroy() +if __name__=="__main__": + + if os.path.exists("./data/ui/export.ui"): + logging.info("Running locally") + datadir = "./data" + else: + datadir = "/usr/share/kazam/" + + icons = gtk.icon_theme_get_default() + w = CountdownWindow(datadir, icons) + w.run() + gtk.main() + --- kazam-0.11.orig/kazam/frontend/widgets/comboboxes.py +++ kazam-0.11/kazam/frontend/widgets/comboboxes.py @@ -236,5 +236,10 @@ class AudioCombobox(EasyComboBox): def _populate(self): liststore = self.get_model() liststore.append(self.SOURCES) + + def get_selected_audio_source(self): + liststore = self.get_model() + iter_ = self.get_active_iter() + return liststore.get_value(iter_, 0)