Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #139 from mgedmin/fix-name-error
Browse files Browse the repository at this point in the history
Fix "name 'AudioProcess' is not defined"
  • Loading branch information
mhsabbagh authored Jun 11, 2019
2 parents 7a86cbe + 4023205 commit 4fd6a86
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions green-recorder
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def RecordGnome():
if formatchooser.get_active_id() == "webm":
RecorderPipeline = "vp8enc min_quantizer=10 max_quantizer=50 cq_level=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux"

global AudioProcess
if audioswitch.get_active() == True:
AudioRecording.append("ffmpeg")
AudioRecording.append("-f")
Expand All @@ -193,9 +193,10 @@ def RecordGnome():
AudioRecording.append("/tmp/Green-recorder-tmp.mkv")
AudioRecording.append("-y")

global AudioProcess
AudioProcess = subprocess.Popen(AudioRecording)

else:
AudioProcess = None

if videoswitch.get_active() == True:
try:
areaaxis
Expand Down Expand Up @@ -241,7 +242,8 @@ def stoprecording(_):

try:
GNOMEScreencast.StopScreencast()
AudioProcess.terminate()
if AudioProcess:
AudioProcess.terminate()
except Exception as e:
print(e)

Expand Down

0 comments on commit 4fd6a86

Please sign in to comment.