The API changed slightly in gstreamer-1.0.
This fixes audio recording.
---
 grecord.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Now that we are on gstreamer-1.0 it may be worth revisiting if the "EOS
stopped advancing" workaround is needed. I'm suspicious of that code and
in this case it was the item that was being confused by the API change.

diff --git a/grecord.py b/grecord.py
index 92a4a75..05ccacb 100644
--- a/grecord.py
+++ b/grecord.py
@@ -212,14 +212,12 @@ filesink name=audioFilesink'
         return True
 
     def _query_position(self, pipe):
-        try:
-            position, format = pipe.query_position(Gst.Format.TIME)
-        except:
+        result, position = pipe.query_position(Gst.Format.TIME)
+        if not result:
             position = Gst.CLOCK_TIME_NONE
 
-        try:
-            duration, format = pipe.query_duration(Gst.Format.TIME)
-        except:
+        result, duration = pipe.query_duration(Gst.Format.TIME)
+        if not result:
             duration = Gst.CLOCK_TIME_NONE
 
         return (position, duration)
-- 
1.8.1.4

_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to