From: <bi...@fr...> - 2005-11-28 16:24:12
|
CVS Root: /cvs/gstreamer Module: gst-media-test Changes by: bilboed Date: Mon Nov 28 2005 08:23:57 PST Log message: * typefindtest.py: Better handling of caps Modified files: . : ChangeLog typefindtest.py Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-media-test/ChangeLog.diff?r1=1.1&r2=1.2 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-media-test/typefindtest.py.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-media-test/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChangeLog 28 Nov 2005 13:06:56 -0000 1.1 +++ ChangeLog 28 Nov 2005 16:23:45 -0000 1.2 @@ -1,5 +1,10 @@ 2005-11-28 Edward Hervey <ed...@fl...> + * typefindtest.py: + Better handling of caps + +2005-11-28 Edward Hervey <ed...@fl...> * BeautifulSoup.py: * README: * common.py: Index: typefindtest.py RCS file: /cvs/gstreamer/gst-media-test/typefindtest.py,v --- typefindtest.py 28 Nov 2005 13:06:56 -0000 1.1 +++ typefindtest.py 28 Nov 2005 16:23:45 -0000 1.2 @@ -52,9 +52,8 @@ self.caps = caps def serialize_dict(self): - negocaps = self.pad.get_negotiated_caps() - if negocaps: - rescaps = negocaps.to_string() + if self.pad.get_negotiated_caps(): + rescaps = self.pad.get_negotiated_caps().to_string() else: rescaps = self.pad.get_caps().to_string() return {"padname":self.pad.get_name(), @@ -146,7 +145,10 @@ for stream in self.streams: if stream.raw: #if stream.pad.get_caps().is_fixed(): - stream.caps = stream.pad.get_caps() + if stream.pad.get_negotiated_caps(): + stream.caps = stream.pad.get_negotiated_caps() + else: + stream.caps = stream.pad.get_caps() gst.info("querying on pad %s" % stream.pad.get_name()) try: length, format = stream.pad.query_duration(gst.FORMAT_TIME) @@ -178,7 +180,7 @@ "Couldn't find any decoders for MimeType %s" % self.mimetype, 20) if len(notrawstreams): return (TEST_FAILURE, - "The file contains the following non-decodable streams:%s" % [stream.caps.to_string() for stream in notrawstreams], + "The file contains non-decodable streams", 40) if not len(rawstreams): |