Skip to content

Commit

Permalink
Fix Freeseer#444 Separate recording logic from the concept of a talk/…
Browse files Browse the repository at this point in the history
…presentation

- Add filename parameter to load_backend function in RecordingController.py

- Change load_backend function in record.py to use default filename instead
of creating a default presentation
  • Loading branch information
rton committed Feb 27, 2014
1 parent 83db7ee commit 310e9ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/freeseer/frontend/record/RecordingController.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def pause(self):
"""Pause Recording"""
self.media.pause()

def load_backend(self, presentation=None):
def load_backend(self, presentation=None, filename=None):
"""Prepares the backend for recording"""
initialized, filename_for_frontend = self.media.load_backend(presentation)
initialized, filename_for_frontend = self.media.load_backend(presentation, filename)
if initialized:
return True, filename_for_frontend
else:
Expand Down
11 changes: 6 additions & 5 deletions src/freeseer/frontend/record/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
except AttributeError:
_fromUtf8 = lambda s: s

from freeseer.framework.presentation import Presentation
#from freeseer.framework.presentation import Presentation
from freeseer.framework.failure import Failure
from freeseer.framework.util import get_free_space
from freeseer.frontend.qtcommon.FreeseerApp import FreeseerApp
Expand Down Expand Up @@ -412,12 +412,13 @@ def load_backend(self):
if self.current_presentation():
presentation = self.current_presentation()

# If current presentation is no existant (empty talk database)
# use a default recording name.
# If current presentation is non-existent (empty talk database)
# use a temporary filename for recording straight to file.
else:
presentation = Presentation(title=unicode("default"))
presentation = None
filename = 'temp'

initialized, self.recently_recorded_video = self.controller.load_backend(presentation)
initialized, self.recently_recorded_video = self.controller.load_backend(presentation, filename)
if initialized:
return True
else:
Expand Down

0 comments on commit 310e9ba

Please sign in to comment.