Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Preparation for checking the existence of the media file and its size…

… (in progress).
  • Loading branch information...
commit 16fe367d4ae1e54c64d22adf05452469d79cb0d1 1 parent f25dde5
@metadirective metadirective authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 MediaCours.py
View
16 MediaCours.py
@@ -442,6 +442,7 @@ def mediaCheck():
global maxRecordingLength, recording, t0
print "In mediaCheck and duration check"
time.sleep(5) #gives some time for recording thread to begin
+ checkMediaFile=True
while recording==True:
time.sleep(5) # checking each few seconds
### checking if recording is beyond max recording time
@@ -453,6 +454,21 @@ def mediaCheck():
text="Enregistrement AVC stoppe car au dessus de la durree maximale."
dialog=wx.MessageDialog(None,message=text,caption="WARNING",style=wx.OK|wx.ICON_INFORMATION)
dialog.ShowModal()
+ if ( (time.time()-t0 > 30) and (checkMediaFile==True)):
+ print "checking the existence of a media file"
+ #if os.path.isfile (workDirectory+"\\"+fileName):
+ if 0:
+ text=" Probleme d'enregistrement, media non cree."
+ dialog=wx.MessageDialog(None,message=text,caption="WARNING",style=wx.OK|wx.ICON_INFORMATION)
+ dialog.ShowModal()
+ if 0:
+ text="L'enregistrement video ou audio semble vide."
+ dialog=wx.MessageDialog(None,message=text,caption="WARNING",style=wx.OK|wx.ICON_INFORMATION)
+ dialog.ShowModal()
+ checkMediaFile=False
+
+
+
def record():
""" Record audio only - mp3 - with pymedia"""
Please sign in to comment.
Something went wrong with that request. Please try again.