conduit r1856 - in trunk: . conduit/utils test/python-tests test/python-tests/data
- From: jstowers svn gnome org
- To: svn-commits-list gnome org
- Subject: conduit r1856 - in trunk: . conduit/utils test/python-tests test/python-tests/data
- Date: Wed, 11 Feb 2009 10:57:14 +0000 (UTC)
Author: jstowers
Date: Wed Feb 11 10:57:14 2009
New Revision: 1856
URL: http://svn.gnome.org/viewvc/conduit?rev=1856&view=rev
Log:
2009-02-11 John Stowers <john stowers gmail com>
* conduit/utils/MediaFile.py:
* test/python-tests/TestCoreConvertAudioVideo.py:
* test/python-tests/data/video.list: Import gst.discover
which fixes the av conversion tests.
Modified:
trunk/ChangeLog
trunk/conduit/utils/MediaFile.py
trunk/test/python-tests/TestCoreConvertAudioVideo.py
trunk/test/python-tests/data/video.list
Modified: trunk/conduit/utils/MediaFile.py
==============================================================================
--- trunk/conduit/utils/MediaFile.py (original)
+++ trunk/conduit/utils/MediaFile.py Wed Feb 11 10:57:14 2009
@@ -8,6 +8,7 @@
import pygst
pygst.require('0.10')
import gst
+ import gst.extend.discoverer
GST_AVAILABLE = True
except ImportError:
GST_AVAILABLE = False
@@ -58,7 +59,7 @@
event.set()
# FIXME: Using Discoverer for now, but we should switch to utils.GstMetadata
# when we get it to work (and eventually support thumbnails).
- info = discoverer.Discoverer(self.get_local_uri())
+ info = gst.extend.discoverer.Discoverer(self.get_local_uri())
info.connect('discovered', discovered)
info.discover()
# Wait for discover to finish (which is async and emits discovered)
Modified: trunk/test/python-tests/TestCoreConvertAudioVideo.py
==============================================================================
--- trunk/test/python-tests/TestCoreConvertAudioVideo.py (original)
+++ trunk/test/python-tests/TestCoreConvertAudioVideo.py Wed Feb 11 10:57:14 2009
@@ -17,16 +17,16 @@
test = SimpleTest()
tc = test.type_converter
-ok("Video Conversion exists", tc.conversion_exists("file","file/video") == True)
-ok("Audio Conversion exists", tc.conversion_exists("file","file/audio") == True)
+ok("Video Conversion exists", tc.conversion_exists("file","file/video") == True, False)
+ok("Audio Conversion exists", tc.conversion_exists("file","file/audio") == True, False)
VIDEO_ENCODINGS = Video.PRESET_ENCODINGS
VIDEO_ENCODINGS.update(iPodModule.IPOD_VIDEO_ENCODINGS)
TEST = (
-#name.list #encodings to test #available encodings
+#name.list #encodings of source files to test #available encodings of dest file
("video", ('divx', 'flv', 'ogg', 'mp4_x264', 'mp4_xvid'), VIDEO_ENCODINGS),
-("audio", ('ogg','mp3'), Audio.PRESET_ENCODINGS ),
+("audio", ('ogg','mp3'), Audio.PRESET_ENCODINGS ),
)
mainloop = gobject.MainLoop()
@@ -35,19 +35,21 @@
files = get_external_resources(name)
for description,uri in files.items():
f = File.File(uri)
- ok("%s: File %s exists" % (name,uri), f.exists())
- for encoding in test_encodings:
- args = all_encodings[encoding]
- ok("%s: Testing encoding of %s -> %s" % (name,description,encoding), True)
-
- to_type = "file/%s?%s" % (name,Utils.encode_conversion_args(args))
- try:
- newdata = tc.convert("file",to_type, f)
- ok("%s: Conversion OK" % name, newdata != None and newdata.exists(), False)
- except Exceptions.ConversionError:
- ok("%s: Conversion Failed" % name, False, False)
- except Exception:
- ok("GENERAL CONVERSION FAILURE" % name, False, False)
+ exists = f.exists()
+ ok("%s: File %s exists" % (name,uri), exists, False)
+ if exists:
+ for encoding in test_encodings:
+ args = all_encodings[encoding]
+ ok("%s: Testing encoding of %s -> %s" % (name,description,encoding), True)
+
+ to_type = "file/%s?%s" % (name,Utils.encode_conversion_args(args))
+ try:
+ newdata = tc.convert("file",to_type, f)
+ ok("%s: Conversion OK" % name, newdata != None and newdata.exists(), False)
+ except Exceptions.ConversionError:
+ ok("%s: Conversion Failed" % name, False, False)
+ except Exception:
+ ok("GENERAL CONVERSION FAILURE" % name, False, False)
gobject.idle_add(mainloop.quit)
def idle_cb():
Modified: trunk/test/python-tests/data/video.list
==============================================================================
--- trunk/test/python-tests/data/video.list (original)
+++ trunk/test/python-tests/data/video.list Wed Feb 11 10:57:14 2009
@@ -5,8 +5,8 @@
#Note: Items in the default section should always be accessible
#Note: If two items have the same key, the one in your section replaces
#the one in the default section
-#[DEFAULT]
-#ogg=http://files.conduit-project.org/Conduit-0.3.0-screencast-small.ogg
+[DEFAULT]
+ogg=http://files.conduit-project.org/Conduit-0.3.0-screencast-small.ogg
[john nzjrs-desktop]
ogg=/home/john/testing/test-data/Conduit-0.3.0-screencast-small.ogg
@@ -15,6 +15,9 @@
mov=ftp://anonymous 192 168 1 1/Disk-1/Videos/alternativefreedomtrailer.mov
wmv=ftp://anonymous 192 168 1 1/Disk-1/Videos/Daily Show/tds-question-mark.wmv
+[john nzjrs-uni]
+ogg=/home/john/Videos/Conduit-0.3.0-screencast-small.ogg
+
[airmind gemini]
#flv=/home/airmind/Projects/gsoc08/pranks.flv
avi=/home/airmind/Projects/gsoc08/teste.avi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]